mirror of
https://github.com/nisrulz/flutter-examples.git
synced 2025-07-15 02:46:03 +08:00
🐛 fix: theme issue #37
This commit is contained in:
@ -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),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
Reference in New Issue
Block a user