deprecated code exists
Column( children: <Widget>[ 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
caption: base.caption!.copyWith( fontWeight: FontWeight.w400, fontSize: 14.0, ), caption is also deprecated. change it to bodySmall
bodyText1: base.bodyText1!.copyWith( fontWeight: FontWeight.w500, fontSize: 16.0, ), bodyText1 to bodyLarge. code will be with you.
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'
headline5 -> headlineLarge headline6 -> titleLarge caption -> bodySmall bodyText1 -> bodyLarge