CPラベルが1文字しか出ない、起動が遅い
This commit is contained in:
@ -6,7 +6,9 @@ import 'package:rogapp/model/destination.dart';
|
||||
import 'package:rogapp/pages/destination/destination_controller.dart';
|
||||
import 'package:rogapp/pages/index/index_controller.dart';
|
||||
import 'package:rogapp/pages/search/search_controller.dart';
|
||||
import 'package:rogapp/widgets/bottom_sheet_new.dart';
|
||||
import 'package:rogapp/widgets/bottom_sheets/bottom_sheet_start.dart';
|
||||
import 'package:rogapp/widgets/bottom_sheets/bottom_sheet_goal.dart';
|
||||
import 'package:rogapp/widgets/bottom_sheets/bottom_sheet_normal_point.dart';
|
||||
|
||||
class SearchPage extends StatelessWidget {
|
||||
SearchPage({Key? key}) : super(key: key);
|
||||
@ -75,15 +77,22 @@ class SearchPage extends StatelessWidget {
|
||||
Destination des =
|
||||
destinationController.festuretoDestination(suggestion);
|
||||
Get.back();
|
||||
|
||||
Widget bottomSheet;
|
||||
if (des.cp == -1 || des.cp == 0) {
|
||||
bottomSheet = BottomSheetStart(destination: des);
|
||||
} else if (des.cp == -2 || des.cp == 0) {
|
||||
bottomSheet = BottomSheetGoal(destination: des);
|
||||
} else {
|
||||
bottomSheet = BottomSheetNormalPoint(destination: des);
|
||||
}
|
||||
showModalBottomSheet(
|
||||
constraints:
|
||||
BoxConstraints.loose(Size(Get.width, Get.height * 0.75)),
|
||||
isScrollControlled: true,
|
||||
context: context,
|
||||
//builder: (context) => BottomSheetWidget(),
|
||||
builder: ((context) => BottomSheetNew(
|
||||
destination: des,
|
||||
)));
|
||||
builder: ((context) => bottomSheet)
|
||||
);
|
||||
},
|
||||
|
||||
suggestionsCallback: (pattern) async {
|
||||
@ -106,29 +115,6 @@ class SearchPage extends StatelessWidget {
|
||||
},
|
||||
),
|
||||
),
|
||||
// Obx(() =>
|
||||
// ListView.builder(
|
||||
// itemCount: searchController.searchResults.length,
|
||||
// itemBuilder: (context, index){
|
||||
// return ListTile(
|
||||
// title: searchController.searchResults[index].properties!["location_name"] != null ? Text(searchController.searchResults[index].properties!["location_name"]) : Text(""),
|
||||
// subtitle: searchController.searchResults[index].properties!["category"] != null ? Text(searchController.searchResults[index].properties!["category"]) : Text(""),
|
||||
// leading: getImage(index),
|
||||
// onTap: (){
|
||||
// indexController.currentFeature.clear();
|
||||
// indexController.currentFeature.add(searchController.searchResults[index]);
|
||||
// Get.back();
|
||||
// showModalBottomSheet(
|
||||
// isScrollControlled: true,
|
||||
// context: context,
|
||||
// //builder: (context) => BottomSheetWidget(),
|
||||
// builder:((context) => BottomSheetNew())
|
||||
// );
|
||||
// },
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
// )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user