Stavo lavorando su un Flutter progetto e ho provato ad aggiungere il title
parametro di AppBarTheme
ma mi ha dato un errore. Questo è il codice:
@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,
)
)
)
)
);
}
L'errore è stato: The named parameter 'title' isn't defined.
Come posso risolvere questo problema?