🐛 fix: theme issue #37

This commit is contained in:
Nishant Srivastava
2019-07-23 03:25:56 +02:00
parent a9d2759b6e
commit e8b433c00d

View File

@ -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),
),
),
);