i want to understand complete way about this 3 methods
Calling class constructor, init, onready
i fould some users user different approch to fetch data,
sometime oninit sometime onready and sometime by class constructor
what are the differences?
class TransactionProvider extends GetxController {
List<TransactionModel> _transactions = [];
TransactionProvider() {
fetchTransaction();
}
@override
void onInit() {
// TODO: implement onInit
super.onInit();
fetchTransaction();
}
@override
void onReady() {
// TODO: implement onReady
super.onReady();
fetchTransaction();
}
}
which willl
2
Answers
onInit()
onReady()
constructor()
onInit()
onReady()