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

deprecated code exists #300

Open
keilvher1 opened this issue Apr 1, 2024 · 3 comments
Open

deprecated code exists #300

keilvher1 opened this issue Apr 1, 2024 · 3 comments

Comments

@keilvher1
Copy link

Column(
children: [
Image.asset('assets/diamond.png'),
const SizedBox(height: 16.0),
Text(
'SHRINE',
style: Theme.of(context).textTheme.headline5,
),
],
)

headline5 has deprecated. So change it to headlineSmall

@keilvher1
Copy link
Author

caption: base.caption!.copyWith(
fontWeight: FontWeight.w400,
fontSize: 14.0,
),
caption is also deprecated. change it to bodySmall

@keilvher1
Copy link
Author

bodyText1: base.bodyText1!.copyWith(
fontWeight: FontWeight.w500,
fontSize: 16.0,
),
bodyText1 to bodyLarge. code will be with you.

@Amunoz-1
Copy link

Amunoz-1 commented Apr 3, 2024

Step 5 - Towards the end:

Finally, let's have the Cancel button use the secondary color rather than the primary for increased contrast.

TextButton(
  child: const Text('CANCEL'),
  onPressed: () {
    _usernameController.clear();
    _passwordController.clear();
  },
  style: TextButton.styleFrom(
    primary: Theme.of(context).colorScheme.secondary,
  ),
),

had to change 'primary' to 'foregroundColor'

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

No branches or pull requests

2 participants