diff --git a/lib/styles/theme_data.dart b/lib/styles/theme_data.dart index 4b84b4e5..cd5867d4 100644 --- a/lib/styles/theme_data.dart +++ b/lib/styles/theme_data.dart @@ -286,3 +286,13 @@ extension TextStyleExtension on TextStyle { TextStyle get italic => copyWith(fontStyle: FontStyle.italic); } + +extension ShadowsExtension on Color { + List get bottomNavShadow => [ + BoxShadow( + spreadRadius: 2, + blurRadius: 8, + color: this, + ) + ]; +} diff --git a/lib/widget/general/bottom_navigation/bottom_navigation.dart b/lib/widget/general/bottom_navigation/bottom_navigation.dart index 382cb5b7..7b9a5ff4 100644 --- a/lib/widget/general/bottom_navigation/bottom_navigation.dart +++ b/lib/widget/general/bottom_navigation/bottom_navigation.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_template/model/bottom_navigation/bottom_navigation_tab.dart'; +import 'package:flutter_template/styles/theme_data.dart'; import 'package:flutter_template/widget/general/bottom_navigation/bottom_navigation_item.dart'; import 'package:flutter_template/widget/provider/data_provider_widget.dart'; @@ -20,13 +21,7 @@ class BottomNavigation extends StatelessWidget { padding: const EdgeInsets.symmetric(horizontal: 8), decoration: BoxDecoration( color: theme.bottomNavbarBackground, - boxShadow: [ - BoxShadow( - spreadRadius: 2, - blurRadius: 8, - color: theme.shadow, - ), - ], + boxShadow: theme.shadow.bottomNavShadow, ), child: Column( mainAxisSize: MainAxisSize.min,