Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/midoshawky/autocompeletetxtfield
flutter widget used to auto compelete the input of textfied
https://github.com/midoshawky/autocompeletetxtfield
Last synced: about 2 months ago
JSON representation
flutter widget used to auto compelete the input of textfied
- Host: GitHub
- URL: https://github.com/midoshawky/autocompeletetxtfield
- Owner: midoshawky
- License: other
- Created: 2020-04-03T15:24:30.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-30T10:27:24.000Z (about 3 years ago)
- Last Synced: 2023-08-20T21:27:10.965Z (over 1 year ago)
- Language: Dart
- Size: 2.52 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# autocompeletetxtfield
New flutter widget used to complete the input in the text field automatically from the given suggestion with very easy implemention
i dont think that`s this is the first but i hoped to try to publish a custom widget created by me and share it with you guys## Getting Started
Hello devs to start using this please start with add ' autocompeletetxtfield: ^0.0.5 ' in your pubspec.yaml file
Enjoy it :)###Small Example
![Sample](images/TxtField.png)
###Full Example
you can go to EXAMPLE section to see the code
![Sample](images/out2.gif)
##Example
```dart
import 'package:flutter/material.dart';
import 'AutoCompeleteTxtField/MultiAutoCompeleteTxtField.dart';void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
List countries;
@override
Widget build(BuildContext context) {
return MaterialApp(
home: mainPage()
);
}
}
class mainPage extends StatefulWidget {
@override
_MainState createState() => _MainState();
}
class _MainState extends State {
List countries;
@override
void initState() {
countries=["Egypt","USA","UK","Russia","France","Spain","Itally","San Andrias","Estonia","Ecuador","Eran","Ethiopia","Etria","Erangle"];
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(),
body:Column(
children: [
AutoCompeleteTextField(
decoration: InputDecoration(
labelText: 'Search',
border: OutlineInputBorder()
),
suggestions: countries,
listElevation: 9.0,
collapsed: true,
onTextSubmited: (val){
},
),
AutoCompeleteTextField(
decoration: InputDecoration(
labelText: 'Search',
border: UnderlineInputBorder()
),
suggestions: countries,
listElevation: 6.0,
collapsed: false,
width: 200.0,
onTextSubmited: (val){},
),
],
)
);
}}
```