From 9a7a29a4dad0977d6b1872d9802ea672e3eb906f Mon Sep 17 00:00:00 2001 From: Valentin REVERSAT Date: Sat, 23 Mar 2024 17:04:21 +0100 Subject: [PATCH] WIP --- lib/app_theme.dart | 5 ++- lib/models/boat_forecast.dart | 11 ++++--- .../forecast_information_bottom_sheet.dart | 32 +++++++++++++++++++ 3 files changed, 42 insertions(+), 6 deletions(-) diff --git a/lib/app_theme.dart b/lib/app_theme.dart index 48c61cc9..8848ace2 100644 --- a/lib/app_theme.dart +++ b/lib/app_theme.dart @@ -8,6 +8,8 @@ class AppTheme { textTheme: GoogleFonts.josefinSansTextTheme( ThemeData.light().textTheme, ), + bottomSheetTheme: + BottomSheetThemeData(backgroundColor: ThemeData.light().cardColor), ); static final darkTheme = ThemeData.dark( @@ -16,5 +18,6 @@ class AppTheme { textTheme: GoogleFonts.josefinSansTextTheme( ThemeData.dark().textTheme, ), - ); + bottomSheetTheme: + BottomSheetThemeData(backgroundColor: ThemeData.dark().cardColor)); } diff --git a/lib/models/boat_forecast.dart b/lib/models/boat_forecast.dart index 5ebb7bb6..6da04cd7 100644 --- a/lib/models/boat_forecast.dart +++ b/lib/models/boat_forecast.dart @@ -178,17 +178,18 @@ class BoatForecast extends AbstractForecast { ), ]; for (int i = 0; i < boats.length; i++) { - icons.add( - Positioned( - right: boats[i].isLeaving ? 0 : 45, - top: boats.length == 1 ? 4 : i * 15, + icons.add(Positioned( + right: boats[i].isLeaving ? 0 : 45, + top: boats.length == 1 ? 4 : i * 15, + child: RotatedBox( + quarterTurns: boats[i].isLeaving ? 0 : 2, child: Icon( Icons.double_arrow_rounded, color: getColor(context, reversed), size: boats.length == 1 ? 19 : 15, ), ), - ); + )); } return icons; diff --git a/lib/widgets/bottom_sheets/forecast_information_bottom_sheet.dart b/lib/widgets/bottom_sheets/forecast_information_bottom_sheet.dart index bebff875..1d414fed 100644 --- a/lib/widgets/bottom_sheets/forecast_information_bottom_sheet.dart +++ b/lib/widgets/bottom_sheets/forecast_information_bottom_sheet.dart @@ -96,6 +96,38 @@ class _ForecastInformationBottomSheetState ], ), ), + Stack( + children: [ + Padding( + padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 25), + child: AnimatedContainer( + duration: const Duration( + milliseconds: CustomProperties.animationDurationMs, + ), + width: 500, + height: 10, + decoration: BoxDecoration( + color: Colors.lightBlueAccent, + borderRadius: BorderRadius.circular(35), + ), + ), + ), + Positioned( + left: 50, + top: 10, + child: Container( + height: 30, + child: VerticalDivider( + color: Theme.of(context) + .bottomSheetTheme + .backgroundColor! + .withOpacity(0.75), + thickness: 5, + ), + ), + ), + ], + ), if (widget.forecast.interferingTimeSlots.isNotEmpty) Flexible( child: Padding(