Indoor-Positioning-System-using-BLE-and-Flutter icon indicating copy to clipboard operation
Indoor-Positioning-System-using-BLE-and-Flutter copied to clipboard

flutter 2.0 upgrade permission group error

Open El-Hajar opened this issue 3 years ago • 0 comments
trafficstars

The plugin flutter_ble_lib uses a deprecated version of the Android embedding. To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs. If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration. This application is not configured to build on the web. To add web support to a project, run flutter create .. Launching lib\main.dart on Chrome in debug mode... Waiting for connection from debug service on Chrome... lib/Model/AppStateModel.dart:193:34: Error: Type 'PermissionGroup' not found. Future requestPermission(PermissionGroup permission) async { ^^^^^^^^^^^^^^^ lib/Model/AppStateModel.dart:30:64: Error: Member not found: 'unknown'. PermissionStatus locationPermissionStatus = PermissionStatus.unknown; ^^^^^^^ lib/Model/AppStateModel.dart:115:56: Error: The argument type 'Object Function()' can't be assigned to the parameter type 'Map<String, dynamic>'.

  • 'Object' is from 'dart:core'.
  • 'Map' is from 'dart:core'. anchorBeacons.add(BeaconInfo.fromJson(document.data)); ^ lib/Model/AppStateModel.dart:193:34: Error: 'PermissionGroup' isn't a type. Future requestPermission(PermissionGroup permission) async { ^^^^^^^^^^^^^^^ lib/Model/AppStateModel.dart:194:11: Error: 'PermissionHandler' isn't a type. final PermissionHandler _permissionHandler = PermissionHandler(); ^^^^^^^^^^^^^^^^^ lib/Model/AppStateModel.dart:194:50: Error: The method 'PermissionHandler' isn't defined for the class 'AppStateModel'.
  • 'AppStateModel' is from 'package:umbrella/Model/AppStateModel.dart' ('lib/Model/AppStateModel.dart'). Try correcting the name to the name of an existing method, or defining a method named 'PermissionHandler'. final PermissionHandler _permissionHandler = PermissionHandler(); ^^^^^^^^^^^^^^^^^ lib/Model/AppStateModel.dart:204:43: Error: The getter 'PermissionGroup' isn't defined for the class 'AppStateModel'.
  • 'AppStateModel' is from 'package:umbrella/Model/AppStateModel.dart' ('lib/Model/AppStateModel.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'PermissionGroup'. var granted = await requestPermission(PermissionGroup.location); ^^^^^^^^^^^^^^^ lib/Model/AppStateModel.dart:216:42: Error: The getter 'PermissionGroup' isn't defined for the class 'AppStateModel'.
  • 'AppStateModel' is from 'package:umbrella/Model/AppStateModel.dart' ('lib/Model/AppStateModel.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'PermissionGroup'. gpsAllowed = await requestPermission(PermissionGroup.location); ^^^^^^^^^^^^^^^ Failed to compile application.

El-Hajar avatar Apr 14 '22 16:04 El-Hajar