Comments (6)
I have the same problem. How do you fix @Hosam11 ? Thanks
from multi_select_flutter.
@vcestra there is an height attribute you can give it double value
from multi_select_flutter.
Ok @Hosam11 . So you fix the height. Thanks
from multi_select_flutter.
in version 3.1.7 the dialog height is fit to content of element inside the dropdown dialog and the below code work fine
MultiSelectDialog.dart in build method inside alert dialog the content
content: Container(
height: widget.height,
child: SingleChildScrollView(
child: widget.listType == null ||
widget.listType == MultiSelectListType.LIST
? ListTileTheme(
contentPadding: EdgeInsets.fromLTRB(14.0, 0.0, 24.0, 0.0),
child: ListBody(
children: _items.map(_buildListItem).toList(),
),
)
: Wrap(
children: _items.map(_buildChipItem).toList(),
),
),
),
the new code
content: Container(
height: widget.height,
child: SingleChildScrollView(
child: widget.listType == null ||
widget.listType == MultiSelectListType.LIST
? ListTileTheme(
contentPadding: EdgeInsets.fromLTRB(14.0, 0.0, 24.0, 0.0),
child: ListBody(
children: _items.map(_buildListItem).toList(),
),
)
: Wrap(
children: _items.map(_buildChipItem).toList(),
),
),
)
here's I fix it use with v 4.0.0, wrap the Container with Column then give it MainAxisSize.min, then make ListView shrinkWrap: true
content: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
height: widget.height,
width: MediaQuery.of(context).size.width * 0.72,
child: widget.listType == null ||
widget.listType == MultiSelectListType.LIST
? ListView.builder(
shrinkWrap: true,
itemCount: _items.length,
itemBuilder: (context, index) {
return _buildListItem(_items[index]);
},
)
: SingleChildScrollView(
child: Wrap(
children: _items.map(_buildChipItem).toList(),
),
),
),
],
)
from multi_select_flutter.
@Hosam11 Hi, I use 4.1.2 ,and find content
still uses Container
instead of Column
, should i alert source code?
from multi_select_flutter.
I have tried wrap the Container with Column then give it MainAxisSize.min, then make ListView shrinkWrap: true
. If height is null, there is errors.I believe following steps will helps.
- wrap the Container with ConstrainedBox
- set minHeight: 0
- make ListView shrinkWrap: true
content: ConstrainedBox(
constraints: BoxConstraints(
minHeight: 0,
),
child: Container(
height: widget.height,
width: widget.width ?? MediaQuery.of(context).size.width * 0.73,
child: widget.listType == null ||
widget.listType == MultiSelectListType.LIST
? ListView.builder(
itemCount: _items.length,
shrinkWrap: true,
itemBuilder: (context, index) {
return _buildListItem(_items[index]);
},
)
: SingleChildScrollView(
child: Wrap(
children: _items.map(_buildChipItem).toList(),
),
),
),
),
from multi_select_flutter.
Related Issues (20)
- onSelectionChanged value issue HOT 2
- Target kernel_snapshot failed: Exception After using this package
- Can't reduce the spacing between chips
- MultiSelectChipField - selectedTextStyle fontSize not respected
- Bug: trying to setState after dispose()
- Error: The argument type 'List<V>?' can't be assigned to the parameter type 'List<V>' HOT 4
- Select only single field HOT 1
- MultiSelectChipDisplay : custom icon doesn't replace default icon(Icons.checked). HOT 5
- Transform widget to be more modular
- Drag to order selected items
- Example: compiling and runtime errors
- MultiSelectBottomSheetField runtime TypeError
- Error with MultiSelectChipField(), HOT 1
- Can't remove an item with using chipDisplay.
- items parameter ignores item order
- Can we mark items of checklist already checked at initially in MultiSelectDialogField?
- limit user selections
- Old data is common in onConfirm call back
- New fork / maintainer ? HOT 1
- Library Error
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 multi_select_flutter.