Comments (10)
@eyoeldefare @leeyisoft @Govindbetterlives It's not required by Package, it can be achieved by the user: Please See the Added Example PR #77
Thanks very much to the eyoeldefare/textfield_tags library and your @hardiklakhalani demo #77 , I have implemented the function of line wrapping
Here is the key code:
scrollDirection: Axis.vertical,
prefixIconConstraints: BoxConstraints(
maxWidth: state.distanceToField * 1.0),
prefixIcon: tags.isEmpty
? null
: SingleChildScrollView(
controller: scController,
scrollDirection: Axis.vertical,
child: Wrap(
// runSpacing: 7.0,
children: (tags.map((String tag) {
return TagItem(
Row(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
import 'package:flutter/material.dart';
///
class TagItem extends StatelessWidget {
final String tag;
final Function(String tag) onTagDelete;
final Color backgroundColor;
final Color selectedBackgroundColor;
final Color tagSelectedColor;
const TagItem({
Key? key,
required this.tag,
required this.onTagDelete,
this.backgroundColor = const Color(0xfff8f8f8),
this.selectedBackgroundColor = const Color(0xFF649BEC),
this.tagSelectedColor = const Color(0xFF649BEC),
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
borderRadius: const BorderRadius.all(
Radius.circular(20.0),
),
color: selectedBackgroundColor,
),
margin: const EdgeInsets.only(right: 10.0, top: 6, bottom: 6),
padding: const EdgeInsets.symmetric(
horizontal: 10.0,
vertical: 4.0,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
InkWell(
from textfield_tags.
Multi lines are not supported.
from textfield_tags.
same here, anybody ?
from textfield_tags.
There is no support for multi-line function, feel that support for multi-line user input experience will be better
from textfield_tags.
@eyoeldefare @leeyisoft
I'll try with my fork, if it'll work I'll add a PR.
from textfield_tags.
@eyoeldefare @leeyisoft I'll try with my fork, if it'll work I'll add a PR.
@hardiklakhalani I took a look at the textfield_tags source code, it is difficult for me to add support multilines functionality, looking forward to your results
from textfield_tags.
@eyoeldefare @leeyisoft @Govindbetterlives
It's not required by Package, it can be achieved by the user: Please See the Added Example PR #77
from textfield_tags.
@eyoeldefare @leeyisoft @Govindbetterlives It's not required by Package, it can be achieved by the user: Please See the Added Example PR #77
How do I position the cursor after the end?
from textfield_tags.
@leeyisoft I tried looking for solution but could not find a way. Chips as prefix widget & Textfield is not multiline that's why cursor stays in center. If we turn textfield to multiline, cursor can goes to top but that'll bring up tags with line-breaks
Let us know if you or anyone else can get through.
from textfield_tags.
@leeyisoft I tried looking for solution but could not find a way. Chips as prefix widget & Textfield is not multiline that's why cursor stays in center. If we turn textfield to multiline, cursor can goes to top but that'll bring up tags with line-breaks
Let us know if you or anyone else can get through.
Okay, I found a way back here to share
from textfield_tags.
Related Issues (20)
- warning after flutter 3.0 HOT 3
- Error HOT 2
- How to delete the Tag Based on Index value.[How to get the index of the Tag] HOT 1
- textSeparators issue HOT 21
- null safety error HOT 4
- How to use multiple lines in a textfield instead of one scrolling line? HOT 2
- Prevent paste long text (include free spaces) HOT 1
- Add custom data type support HOT 1
- set required validation HOT 1
- Has sign remove to search issue HOT 2
- Tags disappears when push & pop HOT 3
- Overriding setAdd and onSubmitted doesn't work HOT 2
- Add text to tag when the focus is change to next Textfield HOT 3
- Create a new tag if it does not exists already HOT 1
- How to move the focus to the TagTextField when a button is pressed HOT 1
- textfield_tags 3.0.0 has multiple issues HOT 4
- Tags not working HOT 2
- Create the last tag when field loses focus HOT 1
- Cannot run the example app (Android)
- SetState in StatefulWidget causes 'You've already registered a tag controller' crash HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from textfield_tags.