BirjuVachhani / adaptive_theme

Easiest way to add support for light and dark theme in your flutter app.
https://pub.dev/packages/adaptive_theme
Apache License 2.0
468 stars 37 forks source link

Set system theme not functioning #5

Closed othnielussher closed 3 years ago

othnielussher commented 3 years ago

Describe the bug I have three simple buttons to toggle between the various theme modes. But it seems only setLight and setDark methods work. setSystem method instead of setting to the device theme sets the theme to light even when the device is in dark mode.

To Reproduce Code to reproduce the behavior:

Container( child: Column( children: [ // light theme FlatButton( onPressed: () { AdaptiveTheme.of(context).setLight(); }, child: Text('Set light')),

          // dark theme
          FlatButton(
              onPressed: () {
                AdaptiveTheme.of(context).setDark();
              },
              child: Text('Set  dark')),

          // system theme
          FlatButton(
              onPressed: () {
                AdaptiveTheme.of(context).setSystem();
              },
              child: Text('Set  system')),
        ],
      ),

)

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

BirjuVachhani commented 3 years ago

@Othniel16 I see you closed this. It is resolved or should I look into it?

othnielussher commented 3 years ago

@Othniel16 I see you closed this. It is resolved or should I look into it?

Yes please it is resolved. Thanks for the reply