The default value of an optional parameter must be constant
abstract class LoginState {
const LoginState();
}
class LoginInitialState extends LoginState {
const LoginInitialState();
}
class LoginFinalState extends LoginState {
final Usuario usuario;
const LoginFinalState({this.usuario = const Usuario()});
//The default value of an optional parameter must be constant.
}
you can remove all the
const
keyword, if you don't want do this, just add a cont constructor toUsuario
like below