30DaysOfFlutter
30DaysOfFlutter copied to clipboard
Please solve my Doubt
I am having problem in this file.
textTheme: Theme.of(context).textTheme,
can't understand this line
https://github.com/iampawan/30DaysOfFlutter/blob/02f7ca0a43705d89ef9836eebec74ece6e331d93/lib/widgets/themes.dart
@prabaljainn basically from this method Theme.of(context)
you can get the theme if you have defined earlier on MaterialApp.
getting this issue please help: The getter 'textTheme' isn't defined for the type 'BuildContext'. Try importing the library that defines 'textTheme', correcting the name to the name of an existing getter, or defining a getter or field named 'textTheme'.
textTheme: Theme.of(context).textTheme.copyWith( headline6: context.textTheme.headline6.copyWith(color: Colors.white), // on this line textTheme ), ));
Exception has occurred. LateError (LateInitializationError: Field '_catalog@26243600' has not been initialized.) any suggestions?
getting this issue please help: The getter 'textTheme' isn't defined for the type 'BuildContext'. Try importing the library that defines 'textTheme', correcting the name to the name of an existing getter, or defining a getter or field named 'textTheme'.
textTheme: Theme.of(context).textTheme.copyWith( headline6: context.textTheme.headline6.copyWith(color: Colors.white), // on this line textTheme ), ));
I think it is because the textTheme property is removed from the AppBarTheme constructor in later versions of flutter