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

Color error help #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

llimental
Copy link

As of February 14, 2022.
If you have a problem with changing the color of the hex code in the latest version of the Flutter, please refer to this code.
I'm confused to solve everything in ThemeData, and I just need to color the ScaffoldBackgroundColor in ThemeData, and Title and accent(now not used) respectively.

recent Flutter version error help
Copy link

@nonsocchi nonsocchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of specifically setting the FAB to purple, use

class BMICalculator extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        colorScheme: ColorScheme.fromSwatch(accentColor: Colors.purple),
        scaffoldBackgroundColor: const Color(0xFF0A0E21),
      ),
      home: InputPage(),
    );
  }

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.

2 participants