kdsuneraavinash / theme_provider

Easy to use, customizable and pluggable Theme Provider.
https://pub.dartlang.org/packages/theme_provider
MIT License
152 stars 28 forks source link

Change Default Theme Values #6

Closed udaykhalsa closed 4 years ago

udaykhalsa commented 4 years ago

How can we change values of default dark and light themes?

Azzeccagarbugli commented 4 years ago

I would love to see this feature too!

kdsuneraavinash commented 4 years ago

Sorry for the extremely late reply.

As far as I understand your question, you want to change the look and feel of the pre-packaged themes. This is actually already possible. You can basically add new themes by providing the theme parameter. Use the updated light/dark themes there.

      themes: <AppTheme>[
        AppTheme(
          id: 'new_light',
          description: 'New light theme',
          data: ThemeData.light().copyWith(
            primaryColor: Colors.green,
            accentColor: Colors.yellow,
          ),
        ),
        AppTheme(
          id: 'new_dark',
          description: 'New dark theme',
          data: ThemeData.dark().copyWith(
            primaryColor: Colors.red,
            accentColor: Colors.yellow,
          ),
        ),
      ],
emmggi commented 1 year ago

Is there any way to change the ThemeData of the current theme and have changes apply to it immediately? I'm implementing a simple designer to my app where you could change basic things like ThemeData and ColorScheme.