We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9d2759 commit e8b433cCopy full SHA for e8b433c
using_theme/lib/main.dart
@@ -39,12 +39,15 @@ class MyHome extends StatelessWidget {
39
),
40
41
42
- floatingActionButton: new Theme(
+ floatingActionButton: Theme(
43
// override the accent color of theme for this widget only
44
- data: Theme.of(context).copyWith(accentColor: Colors.pinkAccent),
45
- child: new FloatingActionButton(
+ data: Theme.of(context).copyWith(
+ colorScheme:
46
+ Theme.of(context).colorScheme.copyWith(secondary: Colors.pinkAccent),
47
+ ),
48
+ child: FloatingActionButton(
49
onPressed: null,
- child: new Icon(Icons.add),
50
+ child: Icon(Icons.add),
51
52
53
);
0 commit comments