7/6/5
This commit is contained in:
@@ -12,6 +12,7 @@ import '../../constant/info.dart';
|
||||
Future<void> checkForUpdate(BuildContext context) async {
|
||||
final packageInfo = await PackageInfo.fromPlatform();
|
||||
final currentVersion = packageInfo.buildNumber;
|
||||
final version = packageInfo.version;
|
||||
print('currentVersion is : $currentVersion');
|
||||
// Fetch the latest version from your server
|
||||
String latestVersion = await getPackageInfo();
|
||||
@@ -24,7 +25,7 @@ Future<void> checkForUpdate(BuildContext context) async {
|
||||
Future<String> getPackageInfo() async {
|
||||
final response = await CRUD().get(link: AppLink.packageInfo, payload: {
|
||||
"platform": Platform.isAndroid ? 'android' : 'ios',
|
||||
"appName": AppInformation.appName,
|
||||
"appName": AppInformation.appVersion,
|
||||
});
|
||||
|
||||
if (response != 'failure') {
|
||||
@@ -36,7 +37,7 @@ 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/id6458734951';
|
||||
: 'https://apps.apple.com/ae/app/sefer-driver/id6502189302';
|
||||
showCupertinoDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
|
||||
Reference in New Issue
Block a user