AppBar, Elevated Button, Background Changes after Upgrading to 3.16.0

In this example, how to restore your previous user interface when you upgrade to Flutter SDK 3.16.0. After 3.16, flutter has applied Material 3 design, which got you different background colors, elevated buttons, cards, spaces, AppBar. See the solution below to solve this issue.

After Before

Here is the issue with our app, after upgrading to Flutter SDK 3.16, our App User interface got changed. We fixed this issue by disabling Material Design 3 with the code below:

MaterialApp(
  theme: ThemeData(
    useMaterial3: false,
  ),
)

Use useMaterial3 as false on ThemeData inside MaterialApp to disable Material 3 Design on your app and restore your previous UI. 

In this way, you can restore the previous UI of your app after upgrading to Flutter SDK 3.16.

No any Comments on this Article


Please Wait...