fixed search bug
This commit is contained in:
@ -35,12 +35,33 @@ class SearchPage extends StatelessWidget {
|
|||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
onPressed:(){
|
onPressed:(){
|
||||||
Navigator.pop(context);
|
Get.back();
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.arrow_back_ios_new, color: Colors.black,)),
|
icon: const Icon(Icons.arrow_back_ios_new, color: Colors.black,)
|
||||||
title: TypeAheadField(
|
),
|
||||||
|
centerTitle: true,
|
||||||
|
//title: const CupertinoSearchTextField(),
|
||||||
|
|
||||||
|
),
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: TypeAheadField(
|
||||||
textFieldConfiguration: TextFieldConfiguration(
|
textFieldConfiguration: TextFieldConfiguration(
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
|
style: DefaultTextStyle.of(context).style.copyWith(
|
||||||
|
fontStyle: FontStyle.normal,
|
||||||
|
fontSize: 15.0,
|
||||||
|
),
|
||||||
|
decoration: InputDecoration(
|
||||||
|
border: OutlineInputBorder(),
|
||||||
|
hintText: "検索",
|
||||||
|
prefixIcon: Icon(Icons.search),
|
||||||
|
suffixIcon: IconButton(
|
||||||
|
icon: Icon(Icons.clear),
|
||||||
|
onPressed: () {
|
||||||
|
// clear the text field
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
suggestionsCallback: (pattern) async{
|
suggestionsCallback: (pattern) async{
|
||||||
return searchController.searchResults.where((GeoJsonFeature element) => element.properties!["location_name"].toString().contains(pattern));
|
return searchController.searchResults.where((GeoJsonFeature element) => element.properties!["location_name"].toString().contains(pattern));
|
||||||
@ -65,10 +86,7 @@ class SearchPage extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
//title: const CupertinoSearchTextField(),
|
|
||||||
|
|
||||||
),
|
),
|
||||||
//body:
|
|
||||||
// Obx(() =>
|
// Obx(() =>
|
||||||
// ListView.builder(
|
// ListView.builder(
|
||||||
// itemCount: searchController.searchResults.length,
|
// itemCount: searchController.searchResults.length,
|
||||||
|
|||||||
@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||||
# Read more about iOS versioning at
|
# Read more about iOS versioning at
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
version: 1.0.12+12
|
version: 1.0.13+13
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.16.0 <3.0.0"
|
sdk: ">=2.16.0 <3.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user