version
This commit is contained in:
@@ -96,7 +96,7 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
|||||||
|
|
||||||
if (settings == null) {
|
if (settings == null) {
|
||||||
SettingModel.getSettings().then(
|
SettingModel.getSettings().then(
|
||||||
(SettingModel value) => (value) {
|
(SettingModel value) {
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() {
|
setState(() {
|
||||||
settings = value.version;
|
settings = value.version;
|
||||||
@@ -104,7 +104,9 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
).catchError((error) {
|
||||||
|
print('App version Error al obtener la configuración: $error');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_ciudad == '...') {
|
if (_ciudad == '...') {
|
||||||
@@ -1010,19 +1012,23 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
|||||||
PackageInfo packageInfo = await PackageInfo.fromPlatform();
|
PackageInfo packageInfo = await PackageInfo.fromPlatform();
|
||||||
String version = packageInfo.version;
|
String version = packageInfo.version;
|
||||||
|
|
||||||
|
print('App version: $version');
|
||||||
|
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() {
|
setState(() {
|
||||||
appVersion = version;
|
appVersion = version;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print('App version: $settings');
|
||||||
|
|
||||||
if (settings != null) {
|
if (settings != null) {
|
||||||
_checkForUpdate(settings);
|
_checkForUpdate(settings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _checkForUpdate(String? settings) {
|
void _checkForUpdate(String? settings) {
|
||||||
if (appVersion == settings) {
|
if (appVersion != settings) {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
|
|||||||
Reference in New Issue
Block a user