Closed DanMossa closed 2 years ago
part 'user_store.g.dart';
class UserStore = UserStoreBase with _$UserStore;
abstract class UserStoreBase with Store {
late DatabaseService _databaseService;
@observable
UsersModel user;
UserStoreBase(this.user) {
_databaseService = getIt.get<DatabaseService>();
}
}
@fzyzcjy Right, I don't want it to be late
, I want it to be final
like a normal constructor
Hello! I have a Store title
UserStore
. I want this Store to be initialized withUserModel user
.I have this
Is this the correct way of doing this? I remember reading something weird happens with constructors and abstract classes.