I am just developing one simple Flutter application. I use Provider library to manage state in application, but I have some problems.
Application works fine, when I run it on emulator or when I run it through debug mode ("flutter run" command) on my Samsung S9 device.
As soon as I build the .app file and I try to run it on device, it doesn't work as it should. Application doesn't re-render when I change state in my Provider class (it should react and re-render as soon as some property from Provider has changed).
It doesn't make sense to me. Where can be a problem?
Provider class
class GlobalProvider with ChangeNotifier{
BuildContext context;
String _currentLang = 'SL';
String get currentLanguage => _currentLang;
set currentLanguage(String lang){
_currentLang = lang;
notifyListeners();
}
}
When I change the value of _currentLang property, all the widgets, that use that property, should be re-rendered.
As I said, it works good on emulator and on device, but when I build the .app file and install it on Samsung S9 device, it doesn't re-render.
Thanks for your help.