Eliminar valores innecesarios de la configuración

This commit is contained in:
2026-05-05 23:00:29 +02:00
parent 08235999d3
commit 0772ec526e
3 changed files with 1 additions and 161 deletions

View File

@@ -1,29 +0,0 @@
import 'package:flutter/services.dart';
class ServicioVersionApp {
static const _channel = MethodChannel('farolero/app_info');
static Future<String> obtenerVersion() async {
final Map<String, dynamic>? info;
try {
info = await _channel.invokeMapMethod<String, dynamic>(
'getAppVersion',
);
} on PlatformException {
return '-';
} on MissingPluginException {
return '-';
}
final versionName = info?['versionName']?.toString();
final versionCode = info?['versionCode']?.toString();
if (versionName == null || versionName.isEmpty) {
return '-';
}
if (versionCode == null || versionCode.isEmpty) {
return versionName;
}
return '$versionName+$versionCode';
}
}