feat : apk installer
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
export 'delete_dialog.dart';
|
||||
export 'warning_dialog.dart';
|
||||
export 'warning_dialog.dart';
|
||||
export 'update_dialog.dart';
|
||||
@@ -0,0 +1,53 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
Future<void> requiredUpdateDialog({required Future<void> Function() onConfirm}) async {
|
||||
await Get.defaultDialog(
|
||||
barrierDismissible: false,
|
||||
onWillPop: () async => false,
|
||||
title: 'بروزرسانی',
|
||||
middleText: 'برای استفاده از امکانات برنامه لطفا برنامه را بروز رسانی نمایید.',
|
||||
confirm: RElevated(
|
||||
height: 40.h,
|
||||
width: 150.w,
|
||||
text: 'خروج',
|
||||
backgroundColor: AppColor.error,
|
||||
onPressed: () {
|
||||
exit(0);
|
||||
},
|
||||
),
|
||||
|
||||
cancel: RElevated(
|
||||
height: 40.h,
|
||||
width: 150.w,
|
||||
text: 'بروز رسانی',
|
||||
onPressed: onConfirm,
|
||||
backgroundColor: AppColor.greenNormal,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> optionalUpdateDialog({required Future<void> Function() onConfirm}) async {
|
||||
await Get.defaultDialog(
|
||||
barrierDismissible: false,
|
||||
onWillPop: () async => false,
|
||||
title: 'بروزرسانی',
|
||||
middleText: 'برای استفاده از امکانات جدید برنامه می توانید آن را بروزرسانی نمایید.',
|
||||
confirm: RElevated(
|
||||
height: 40.h,
|
||||
width: 150.w,
|
||||
text: 'ادامه',
|
||||
backgroundColor: AppColor.error,
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
|
||||
cancel: RElevated(
|
||||
height: 40.h,
|
||||
width: 150.w,
|
||||
text: 'بروز رسانی',
|
||||
onPressed: onConfirm,
|
||||
backgroundColor: AppColor.greenNormal,
|
||||
),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user