hi sorry i just new and still learning your package.
in provider to get value on initstate as simple like below :
initState() {
super.initState();
print(Provider.of
}
how on flutter_package to get the value?
if i have class like below
class idcompanybloc extends Bloc
@override
String get initialState => '';
@override
Stream
yield idcompany.toString();
}
}
thank you
i have put on stackoverflow : https://stackoverflow.com/questions/61043649/blocprovider-inside-initstate-that-receive-value-from-blocbuilder
Hi @kartzhai 馃憢
Thanks for opening an issue!
You can access the current state of the bloc like:
BlocProvider.of<MyBloc>(context).state;
or via the shorthand
context.bloc<MyBloc>().state;
Hope that helps 馃憤
THANKS ALOT BRO!!! you r a live saver!!
it work so good right now. thanks alot!
Most helpful comment
THANKS ALOT BRO!!! you r a live saver!!
it work so good right now. thanks alot!