3

When I updated Flutter to Flutter 3.7.6, suddenly 'primarySwatch' is not reflected anymore. 'useMaterial3' works if I set it to false, but I don't know why.

return MaterialApp(
 title: 'Demo',
 theme: ThemeData(
 primarySwatch: Colors.pink,
 appBarTheme: const AppBarTheme(elevation: 0),
 useMaterial3: true,
 ),
home: const HomeScreen(),
);

I tried setting useMaterial3 to false, but could not think of any other solution.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
  • This also happen to me, the custom theme/widget is ignored, ex splashRadius on IconButton cant be setted or ignored when useMaterial3 set to true – Septian Dika May 22 '23 at 10:47

0 Answers0