Skip to content

Commit

Permalink
🐛 fix: theme issue #37
Browse files Browse the repository at this point in the history
  • Loading branch information
nisrulz committed Jul 23, 2019
1 parent a9d2759 commit e8b433c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions using_theme/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,15 @@ class MyHome extends StatelessWidget {
),
),

floatingActionButton: new Theme(
floatingActionButton: Theme(
// override the accent color of theme for this widget only
data: Theme.of(context).copyWith(accentColor: Colors.pinkAccent),
child: new FloatingActionButton(
data: Theme.of(context).copyWith(
colorScheme:
Theme.of(context).colorScheme.copyWith(secondary: Colors.pinkAccent),
),
child: FloatingActionButton(
onPressed: null,
child: new Icon(Icons.add),
child: Icon(Icons.add),
),
),
);
Expand Down

0 comments on commit e8b433c

Please sign in to comment.