update to 3.13
This commit is contained in:
@ -1,8 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:geojson/geojson.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get_state_manager/get_state_manager.dart';
|
||||
import 'package:rogapp/model/destination.dart';
|
||||
import 'package:rogapp/pages/index/index_controller.dart';
|
||||
|
||||
class SearchBarController extends GetxController {
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_typeahead/flutter_typeahead.dart';
|
||||
import 'package:geojson/geojson.dart';
|
||||
@ -15,7 +14,7 @@ class SearchPage extends StatelessWidget {
|
||||
|
||||
Image getImage(int index){
|
||||
if(searchController.searchResults[index].properties!["photos"] == null || searchController.searchResults[index].properties!["photos"] == ""){
|
||||
return Image(image: AssetImage('assets/images/empty_image.png'));
|
||||
return const Image(image: AssetImage('assets/images/empty_image.png'));
|
||||
}
|
||||
else{
|
||||
return Image(
|
||||
@ -39,7 +38,7 @@ class SearchPage extends StatelessWidget {
|
||||
},
|
||||
icon: const Icon(Icons.arrow_back_ios_new, color: Colors.black,)),
|
||||
title: TypeAheadField(
|
||||
textFieldConfiguration: TextFieldConfiguration(
|
||||
textFieldConfiguration: const TextFieldConfiguration(
|
||||
autofocus: true,
|
||||
),
|
||||
suggestionsCallback: (pattern) async{
|
||||
@ -49,7 +48,7 @@ class SearchPage extends StatelessWidget {
|
||||
itemBuilder: (context, GeoJsonFeature suggestion){
|
||||
return ListTile(
|
||||
title: Text(suggestion.properties!["location_name"]),
|
||||
subtitle: suggestion.properties!["category"] != null ? Text(suggestion.properties!["category"]) : Text(""),
|
||||
subtitle: suggestion.properties!["category"] != null ? Text(suggestion.properties!["category"]) : const Text(""),
|
||||
//leading: getImage(index),
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user