From d67d17e971d9e052cede58501d15955a1a08c0a3 Mon Sep 17 00:00:00 2001 From: Mohamed Nouffer Date: Mon, 11 Sep 2023 18:04:29 +0530 Subject: [PATCH] fixed popup and map scale issues --- lib/pages/history/history_page.dart | 26 ++++++++++++-------------- lib/widgets/bottom_sheet_new.dart | 16 +++++++--------- lib/widgets/map_widget.dart | 4 +++- 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/lib/pages/history/history_page.dart b/lib/pages/history/history_page.dart index 1971eb9..accc3de 100644 --- a/lib/pages/history/history_page.dart +++ b/lib/pages/history/history_page.dart @@ -42,20 +42,18 @@ class _HistoryPageState extends State { return Container( width: MediaQuery.of(context).size.width, height: 150, - child: Expanded( - child: ListView.builder( - itemCount: dests.length, - itemBuilder: (ctx, index) { - return ListTile( - title: Text(dests[index].name ?? ""), - subtitle: - Text(dests[index].address ?? ""), - leading: dests[0].photos != null - ? Container(width: 100, height: 100, child: Image.file(File(dests[0].photos!))) - : Container(), - ); - }), - )); + child: ListView.builder( + itemCount: dests.length, + itemBuilder: (ctx, index) { + return ListTile( + title: Text(dests[index].name ?? ""), + subtitle: + Text(dests[index].address ?? ""), + leading: dests[0].photos != null + ? Container(width: 100, height: 100, child: Image.file(File(dests[0].photos!))) + : Container(), + ); + })); } else { return Center(child: Text("No checkin yet")); } diff --git a/lib/widgets/bottom_sheet_new.dart b/lib/widgets/bottom_sheet_new.dart index a124cd4..a068c9f 100644 --- a/lib/widgets/bottom_sheet_new.dart +++ b/lib/widgets/bottom_sheet_new.dart @@ -108,7 +108,7 @@ class BottomSheetNew extends GetView { print('---- rog_mode ----- ${indexController.rog_mode} -----'); return indexController.rog_mode == 0 ? detailsSheet(context) - : destinationSheet(context); + : Container(width: 200, height: 250, color: Colors.purple,); //destinationSheet(context); } // Show destination detais @@ -1011,14 +1011,12 @@ class BottomSheetNew extends GetView { }, child: SizedBox( width: MediaQuery.of(context).size.width - (MediaQuery.of(context).size.width * 0.28), - child: Expanded( - child: Text( - text, - textDirection: TextDirection.ltr, - textAlign: TextAlign.justify, - style: TextStyle( - color: isurl ? Colors.blue : Colors.black, - ), + child: Text( + text, + textDirection: TextDirection.ltr, + textAlign: TextAlign.justify, + style: TextStyle( + color: isurl ? Colors.blue : Colors.black, ), ), ), diff --git a/lib/widgets/map_widget.dart b/lib/widgets/map_widget.dart index 603de1a..8c8d6f5 100644 --- a/lib/widgets/map_widget.dart +++ b/lib/widgets/map_widget.dart @@ -155,7 +155,9 @@ class MapWidget extends StatelessWidget { interactiveFlags: InteractiveFlag.pinchZoom | InteractiveFlag.drag, - onPositionChanged: (MapPosition pos, isvalue) {}, + onPositionChanged: (MapPosition pos, isvalue) { + indexController.currentBound = [pos.bounds!]; + }, onTap: (_, __) => _popupController .hideAllPopups(), // Hide popup when the map is tapped. ),