25-8-4-1
This commit is contained in:
@@ -15,13 +15,15 @@ import 'package:package_info_plus/package_info_plus.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import '../../constant/info.dart';
|
||||
import '../../main.dart';
|
||||
import '../../print.dart';
|
||||
import 'encrypt_decrypt.dart';
|
||||
|
||||
Future<void> checkForUpdate(BuildContext context) async {
|
||||
final packageInfo = await PackageInfo.fromPlatform();
|
||||
final currentVersion = packageInfo.buildNumber;
|
||||
final version = packageInfo.version;
|
||||
// print('currentVersion is : $currentVersion');
|
||||
Log.print('version: ${version}');
|
||||
print('currentVersion is : $currentVersion');
|
||||
// Fetch the latest version from your server
|
||||
String latestVersion = await getPackageInfo();
|
||||
box.write(BoxName.packagInfo, version);
|
||||
@@ -45,8 +47,8 @@ Future<String> getPackageInfo() async {
|
||||
|
||||
void showUpdateDialog(BuildContext context) {
|
||||
final String storeUrl = Platform.isAndroid
|
||||
? 'https://play.google.com/store/apps/details?id=com.sefer_driver'
|
||||
: 'https://apps.apple.com/ae/app/sefer-driver/id6502189302';
|
||||
? 'https://play.google.com/store/apps/details?id=com.intaleq_driver'
|
||||
: 'https://apps.apple.com/ae/app/intaleq-driver/id6502189302';
|
||||
|
||||
showGeneralDialog(
|
||||
context: context,
|
||||
|
||||
Reference in New Issue
Block a user