import 'package:flutter/cupertino.dart';
import 'package:permission_handler/permission_handler.dart';


class AppPermission {
  static Future<bool> askVideoCallPermission(BuildContext context) async {
    if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted)) {
      return false;
    }
    // if (Platform.isAndroid && !(await PlatformBridge.shared().isDrawOverAppsPermissionAllowed())) {
    //   await _drawOverAppsMessageDialog(context);
    //   return false;
    // }
    return true;
  }

  static Future<bool> askPenguinPermissions() async {
    if (!(await Permission.location.request().isGranted) ||
        !(await Permission.bluetooth.request().isGranted) ||
        !(await Permission.bluetoothScan.request().isGranted) ||
        !(await Permission.bluetoothConnect.request().isGranted) ||
        !(await Permission.activityRecognition.request().isGranted)) {
      return false;
    }
    return true;
  }
}
