Skip to content

Commit

Permalink
#334: added shadow to themeing
Browse files Browse the repository at this point in the history
  • Loading branch information
jorre127 committed Oct 11, 2024
1 parent e407677 commit 80894c6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
10 changes: 10 additions & 0 deletions lib/styles/theme_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -286,3 +286,13 @@ extension TextStyleExtension on TextStyle {

TextStyle get italic => copyWith(fontStyle: FontStyle.italic);
}

extension ShadowsExtension on Color {
List<BoxShadow> get bottomNavShadow => [
BoxShadow(
spreadRadius: 2,
blurRadius: 8,
color: this,
)
];
}
9 changes: 2 additions & 7 deletions lib/widget/general/bottom_navigation/bottom_navigation.dart
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -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,
Expand Down

0 comments on commit 80894c6

Please sign in to comment.