Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dark mode #246

Closed
wants to merge 9 commits into from
Closed

Dark mode #246

wants to merge 9 commits into from

Conversation

JustinBenito
Copy link
Contributor

I have now added the facility to add dark mode,
Light mode is now available seperately. So if you wish to have dark mode you may need to change only one line of code.

Related Issues:

Yes there is one issue that is, though I have made everything seemless to switch, the darkmode button is not implemented, so once you merge this, you may need to add a button which just changes true or false in the theme.dart file

I have only made the Dark mode available to develop more on, The theme is ready but the button to change is not.
/* This is the Dark mode Theme */

@rolandgeider
Copy link
Member

Can you move the files into /lib? Right now the diff is 12000 lines of code and it's not possible to see what changed :)

@rolandgeider
Copy link
Member

I have moved the files to the correct locations as far as I could tell, some of them where duplicated.

Also, instead of doing darkmode ? foo : bar in the code, we should do something like https://stackoverflow.com/questions/60232070/how-to-implement-dark-mode-and-light-mode-in-flutter so that flutter takes care of all of that

MaterialApp(
      title: 'App Title',
      theme: ThemeData(
        brightness: Brightness.light,
        /* light theme settings */
      ),
      darkTheme: ThemeData(
        brightness: Brightness.dark,
        /* dark theme settings */
      ),
      themeMode: ThemeMode.dark, 
      /* ThemeMode.system to follow system theme, 
         ThemeMode.light for light theme, 
         ThemeMode.dark for dark theme
      */
      debugShowCheckedModeBanner: false,
      home: YourAppHomepage(),
    );

Plus here are the changes from #238 as well :) And here instead of doing

Padding(
      padding: const EdgeInsets.all(8.0),
      child: Card(
        shape: RoundedRectangleBorder(
          borderRadius: BorderRadius.circular(15.0),
        ),
       .....

we should add a new widget and simply pass the child as an argument, then we don't duplicate so much code

@rolandgeider rolandgeider mentioned this pull request Oct 11, 2022
@rolandgeider rolandgeider mentioned this pull request Oct 31, 2022
3 tasks
@rileyhawk1417
Copy link

@rolandgeider just to ask have these changes been made to the PR yet?

@rolandgeider
Copy link
Member

No, don't think so

@rolandgeider
Copy link
Member

Some of the changes here have been manually moved to the feature/material3 branch, closing here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants