Reputation: 3919
How to update the following code to the last Flutter version?
theme: ThemeData(
primarySwatch: Colors.purple,
accentColor: Colors.deepOrange,
fontFamily: 'Lato',
pageTransitionsTheme: PageTransitionsTheme(
builders: {
TargetPlatform.android: CustomPageTransitionBuilder(),
TargetPlatform.iOS: CustomPageTransitionBuilder(),
},
),
),
I get the following errors:
The named parameter 'fontFamily' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'fontFamily'
The named parameter 'pageTransitionsTheme' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'pageTransitionsTheme'.
Also I get another error for this line of the code:
color: Theme.of(context).primaryTextTheme.title.color,
Error:
The getter 'title' isn't defined for the type 'TextTheme'. Try importing the library that defines 'title', correcting the name to the name of an existing getter, or defining a getter or field named 'title'.
Upvotes: 0
Views: 191