43 lines
1.0 KiB
Dart
43 lines
1.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
apiActionFullScreenPopUp({
|
|
required RxBool isLoading,
|
|
required VoidCallback onConnect,
|
|
}) {
|
|
if (!isLoading.value) {
|
|
isLoading.value = true;
|
|
|
|
Get.dialog(
|
|
PopScope(
|
|
canPop: false,
|
|
onPopInvokedWithResult: (didPop, result) {},
|
|
child: Material(
|
|
type: MaterialType.transparency,
|
|
child: Container(
|
|
width: Get.width,
|
|
height: Get.height,
|
|
color: Colors.black.withValues(alpha: 0.6),
|
|
child: Center(
|
|
child: SizedBox(
|
|
height: 30.h,
|
|
width: 30.w,
|
|
child: const CircularProgressIndicator(
|
|
color: Colors.white,
|
|
strokeWidth: 3,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
useSafeArea: false,
|
|
barrierDismissible: false,
|
|
barrierColor: Colors.transparent,
|
|
);
|
|
|
|
onConnect();
|
|
}
|
|
}
|