showPermissionRequestInfoDialog static method

dynamic showPermissionRequestInfoDialog(
  1. BuildContext context,
  2. dynamic value
)

Implementation

static showPermissionRequestInfoDialog(BuildContext context, value) async {
  PackageInfo packageInfo = await PackageInfo.fromPlatform();
  String appName = packageInfo.appName;
  final entry = OverlayEntry(builder: (context) {
    return PermissionRequestInfo(
      appName: appName,
      removeOverLay: () {
        _entry?.remove();
        _entry = null;
      },
      permissionType: value,
    );
  });
  _entry = entry;
  Overlay.of(context).insert(entry);
}