Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Align(
- alignment: Alignment.topLeft,
- child: Container(
- child: Material(
- child: Container(
- height: 8,
- child: RawAutocomplete<String>(
- key: _autocompleteKey,
- focusNode: focusNode,
- textEditingController: search,
- optionsBuilder: (TextEditingValue textEditingValue) => _options,
- optionsViewBuilder: (BuildContext context,
- AutocompleteOnSelected<String> onSelected,
- Iterable<String> options) {
- return SizedBox(
- child: Align(
- alignment: Alignment.topLeft,
- child: Container(
- decoration: BoxDecoration(
- color: Colors.white,
- boxShadow: [
- BoxShadow(
- color: Colors.grey.withOpacity(0.3),
- blurRadius: 34,
- spreadRadius: 3,
- offset: Offset(0, 10),
- )
- ],
- border: Border.all(color: Colors.black12),
- borderRadius: BorderRadius.circular(8),
- ),
- height: 250,
- child: ListView(
- physics: AlwaysScrollableScrollPhysics(),
- shrinkWrap:true ,
- padding: const EdgeInsets.only(top: 10),
- children:[
- Column(
- children: _options.map((String option) =>
- ElevatedButton(
- style: ElevatedButton.styleFrom(
- primary: Colors.transparent,
- elevation: 0,
- shadowColor: Colors.transparent,
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(8),
- )),
- onPressed: () {
- focusNode.unfocus();
- // address.text = option;
- // currentAddress.value = option;
- onSelected(option);
- debugPrint("5555555555");
- setState(() {
- });
- },
- child: Container(
- width: MediaQuery.of(context).size.width / 1.2,
- alignment: Alignment.topLeft,
- child: FittedBox(
- fit: BoxFit.fitWidth,
- child: Text("${option}",
- style: TextStyle(
- fontFamily: 'Gilroy-bold',
- fontWeight: FontWeight.w500,
- fontSize: 16,
- color: Colors.black54)),
- ),
- ),
- )).toList(),
- ),]
- )
- ),
- ),
- );
- },
- ),
- ),
- ),
- ),
- ),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement