Skip to content

Commit 4d8bf2a

Browse files
committed
Increment an option to show itens as dropdown or dialog with search
1 parent 0a4b774 commit 4d8bf2a

File tree

6 files changed

+345
-61
lines changed

6 files changed

+345
-61
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.1.0 - 2020-12-07
2+
3+
* Increment an option to show itens as dropdown or dialog with search
4+
* Exemple update
5+
16
## 1.0.1 - 2020-08-05
27

38
* Fixed issue #1 - text render overflowed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ In the `pubspec.yaml` of your flutter project, add the following dependency:
1212
```yaml
1313
dependencies:
1414
...
15-
select_form_field: "^1.0.1"
15+
select_form_field: "^1.1.0"
1616
```
1717
1818
In your library add the following import:
@@ -56,6 +56,7 @@ final List<Map<String, dynamic>> _items = [
5656

5757
``` dart
5858
SelectFormField(
59+
type: SelectFormField.dropdown, // or can be dialog
5960
initialValue: 'circle',
6061
icon: Icon(Icons.format_shapes),
6162
labelText: 'Shape',

example/lib/main.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,16 @@ class _MyHomePageState extends State<MyHomePage> {
8282
child: Column(
8383
children: <Widget>[
8484
SelectFormField(
85+
//type: SelectFormFieldType.dialog,
8586
controller: _controller,
8687
//initialValue: _initialValue,
8788
icon: Icon(Icons.format_shapes),
8889
labelText: 'Shape',
90+
changeIcon: true,
91+
dialogTitle: 'Pick a item',
92+
dialogCancelBtn: 'CANCEL',
93+
enableSearch: true,
94+
dialogSearchHint: 'Search item',
8995
items: _items,
9096
onChanged: (val) => setState(() => _valueChanged = val),
9197
validator: (val) {

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ dependencies:
2828
# The following adds the Cupertino Icons font to your application.
2929
# Use with the CupertinoIcons class for iOS style icons.
3030
cupertino_icons: ^0.1.3
31-
select_form_field: ^1.0.0
31+
select_form_field: 1.1.0
3232

3333
dev_dependencies:
3434
flutter_test:

0 commit comments

Comments
 (0)