Answer the question
In order to leave comments, you need to log in
How to change flutter class property?
Hello! There is a Nomenclature class, I'm trying to change the value of the count property in the controller, and the log tells me
I / flutter (20083): LateInitializationError: Field 'count' has already been initialized.
Please tell me what am I doing wrong?
Future add(Nomenclature nomenclature) async {
try {
nomenclature.count = 55;
var box = await Hive.openBox('nomenclaturesInCart2');
box.put(nomenclature.vendorCode, nomenclature);
box.close();
} catch (e) {
print(e);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question