Pracowałem nad projektem Flutter i próbował dodać title
parametr dla AppBarTheme
ale to dało mi błąd. To jest kod:
@override
Widget build(BuildContext context){
return MaterialApp(
theme: ThemeData(
primarySwatch: Colors.green,
accentColor: Colors.pinkAccent,
fontFamily: 'Quicksand',
appBarTheme:
AppBarTheme(textTheme: ThemeData.light().textTheme.copyWith(
title: const TextStyle(
fontFamily: 'Quicksand',
fontSize: 20,
)
)
)
)
);
}
Błąd polegał na: The named parameter 'title' isn't defined.
Jak mogę to rozwiązać?