field_suggestion 0.1.6 copy "field_suggestion: ^0.1.6" to clipboard
field_suggestion: ^0.1.6 copied to clipboard

outdated

Create highly customizable, simple, and controllable autocomplete fields.

[v0.1.6] - 19/06/21 #

News: #

  • Logo was redesigned 🎉 New logo: Field Suggesion's Logo

  • Resolved: #20 Now users are able to customize suggestion item much more than v0.1.5

    See the readme to get more info.

[v0.1.5] - 8/06/21 #

News: #

  • FieldSuggestion logo is ready! 🎉

    Field Suggesion's Logo
  • Resolved: #19 New feature: A model class suggestions.

UserModel class, we would use it into suggestionList. Note: You must have toJson method in your model class.

class UserModel {
  final String? email;
  final String? password;

  const UserModel({this.email, this.password});

  // If we wanna use this model class into FieldSuggestion.
  // Then we must have toJson method, like this:
  Map<String, dynamic> toJson() => {
        'email': this.email,
        'password': this.password,
      };
}

If we gave a userSuggestions which is List<UserModel>. Then we must add the searchBy property. Our model has just email and password, right? So then we can implement it like: searchBy: 'email' or searchBy: 'password'.

FieldSuggestion(
  hint: 'Email',
  textController: textEditingController,
  suggestionList: userSuggestions,
  searchBy: 'email' // Or 'password'
),

[v0.1.4] - 5/06/21 #

  • Resolved #17 And now the suggestionList property can be List<String>, List<int>, List<double>. See the README.md for more.

[v0.1.3] - 30/05/21 #

  • Enabled null safety

[v0.1.2] - 30/05/21 #

News: #

  • Tests were improved. current coverage: codecov

  • Resolved: #13 New feature: External control. now users can control the suggestion boxes externally.

Example of external control: #

Here we just wrapped our Scaffold with GestureDetector to handle gestures on the screen. And now we can close box when we tap on the screen. (You can do it everywhere, where you used FieldSuggestion with BoxController).

 class Example extends StatelessWidget {
   final _textController = TextEditingController();
   final _boxController = BoxController();
 
   @override
   Widget build(BuildContext context) {
     return GestureDetector(
       onTap: () => _boxController.close(),
       child: Scaffold(
         body: Center(
           child: FieldSuggestion(
             hint: 'test',
             suggestionList: [], // Your suggestions list here...
             boxController: _boxController,
             textController: _textController,
           ),
         ),
       ),
     );
   }
 }

[v0.1.0] and [v0.1.1] - 30/04/21 #

  • First release
44
likes
0
pub points
86%
popularity

Publisher

verified publisherinsolite.io

Create highly customizable, simple, and controllable autocomplete fields.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on field_suggestion