Yo estaba trabajando en un Aleteo de proyecto y he intentado añadir el title
parámetro AppBarTheme
pero me dio un error. Este es el código:
@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,
)
)
)
)
);
}
El error fue: The named parameter 'title' isn't defined.
¿Cómo puedo solucionar esto?