I could not use a list as for some reason indexing with a list did not work. The state was always at null. Instead had to use five variables and reused them for all the platforms.
Added a controller for the CupertinoTabScaffold as I need to get the value of index in onWillPop. I initially used a temporary variable and updated its value each time a tab bar item was clicked but because of using await in onWillPop it created trouble. And a controller inherently seems like a better option.
Let me know if there are any changes to be made. Thanks!
Fixes #57 and #54
null
. Instead had to use five variables and reused them for all the platforms.CupertinoTabScaffold
as I need to get the value ofindex
inonWillPop
. I initially used a temporary variable and updated its value each time a tab bar item was clicked but because of usingawait
inonWillPop
it created trouble. And a controller inherently seems like a better option.Let me know if there are any changes to be made. Thanks!