From fe968ef8eed020670abdc8b8554a766eee15e5ed Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Thu, 13 Apr 2023 20:15:32 +0200 Subject: improvements --- lib/pages/navigation_page.dart | 114 +++++++++++++++++++---------------------- 1 file changed, 54 insertions(+), 60 deletions(-) (limited to 'lib/pages/navigation_page.dart') diff --git a/lib/pages/navigation_page.dart b/lib/pages/navigation_page.dart index 96a5ef2..178c9f3 100644 --- a/lib/pages/navigation_page.dart +++ b/lib/pages/navigation_page.dart @@ -112,59 +112,59 @@ class _NavigationPageState extends State { } return Scaffold( - floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, - floatingActionButton: Padding( - padding: const EdgeInsets.all(8.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - InkWell( - splashColor: Colors.blue, - onLongPress: () => _mockStopInComplete(), - child: FloatingActionButton( - onPressed: () => _mockStopComplete(), - child: Icon(Icons.check_circle), - ), - ), - Visibility( - visible: - navigation == null ? false : navigation!.isLookingAround, - child: FloatingActionButton( - backgroundColor: Colors.green, - child: const Icon(Icons.center_focus_strong), - onPressed: () => { - changeIsLookingAround(false), - eventBus.fire(FlyToEvent(navigation!.lastPosition)) - }, - ), + floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, + floatingActionButton: Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + InkWell( + splashColor: Colors.blue, + onLongPress: () => _mockStopInComplete(), + child: FloatingActionButton( + onPressed: () => _mockStopComplete(), + child: Icon(Icons.check_circle), ), - Padding(padding: EdgeInsets.all(5)), - FloatingActionButton( - onPressed: () => _zoomOut(), - child: Icon(Icons.zoom_out), - ), - Padding(padding: EdgeInsets.all(2)), - FloatingActionButton( - onPressed: () => _zoomIn(), - child: Icon(Icons.zoom_in), - ) - ], - ), - ), - body: Column( - children: [ - _createNextDropInfoWidget(), - Container( - decoration: BoxDecoration(color: Colors.black), - height: 2, ), - Expanded( - child: Stack( - children: [navigation!], + Visibility( + visible: navigation == null ? false : navigation!.isLookingAround, + child: FloatingActionButton( + backgroundColor: Colors.green, + child: const Icon(Icons.center_focus_strong), + onPressed: () => { + changeIsLookingAround(false), + eventBus.fire(FlyToEvent(navigation!.lastPosition)) + }, ), ), + Padding(padding: EdgeInsets.all(5)), + FloatingActionButton( + onPressed: () => _zoomOut(), + child: Icon(Icons.zoom_out), + ), + Padding(padding: EdgeInsets.all(2)), + FloatingActionButton( + onPressed: () => _zoomIn(), + child: Icon(Icons.zoom_in), + ) ], - )); + ), + ), + body: Column( + children: [ + _createNextDropInfoWidget(), + Container( + decoration: BoxDecoration(color: Colors.black), + height: 2, + ), + Expanded( + child: Stack( + children: [navigation!], + ), + ), + ], + ), + ); } Widget getLoadingScreen() { @@ -180,11 +180,11 @@ class _NavigationPageState extends State { return Container( decoration: BoxDecoration(color: Colors.white), - height: 80, + height: 60, child: Column( children: [ SizedBox( - height: 10, + height: 5, ), Container( height: 50, @@ -207,11 +207,8 @@ class _NavigationPageState extends State { ), ), TextSpan( - text: ' ' + - (activeTask!.lastParcelNumber - - activeTask!.firstParcelNumber + - 1) - .toString(), + text: + ' ' + (activeTask!.getNumberOfPercels()).toString(), style: TextStyle( color: Color.fromARGB(150, 0, 0, 0), fontSize: 12, @@ -231,6 +228,8 @@ class _NavigationPageState extends State { Expanded( child: Text( activeTask!.fullAddress, + overflow: TextOverflow.ellipsis, + maxLines: 2, style: TextStyle( color: Color.fromARGB(255, 0, 0, 0), fontSize: 15, @@ -240,11 +239,6 @@ class _NavigationPageState extends State { ], ), ), - Container( - height: 20, - padding: EdgeInsets.only(left: 10, right: 10), - child: Row(children: [Text(activeTask!.deliveryTimeBlock)]), - ), ], ), ); -- cgit v1.2.3-70-g09d2