diff --git a/lib/constant/api_key.dart b/lib/constant/api_key.dart index b696e98..a95b020 100644 --- a/lib/constant/api_key.dart +++ b/lib/constant/api_key.dart @@ -33,7 +33,7 @@ class AK { static final String payPalSecret = Env.payPalSecret; static final String geminiApi = Env.geminiApi; static const String agoraAppId = '12994c6e707543e68d5638894d04f989'; - static const String agoraChannelName = 'seferCall'; + static const String agoraChannelName = 'sefer1'; static const String agoraToken = - '007eJxTYCjrVT009+knq6WOp9gqgx77z/CIjHtQ7PBrUdB1CZWUhUcUGAyNLC1Nks1SzQ3MTU2MU80sUkzNjC0sLE1SDEzSLC0sK4XPpjYEMjIEfg5lYWSAQBCfk6E4NS21yDkxJ4eBAQD1PiDo'; + '007eJxTYAjpCZ9yKVn8k5S5blKObpxhXtrE5vXtO0+cEjrxUnR3cZ8Cg6GRpaVJslmquYG5qYlxqplFiqmZsYWFpUmKgUmapYVlVeGF1IZARoZFOjkMjFAI4rMxFKempRYZMjAAABlgHmg='; } diff --git a/lib/controller/functions/crud.dart b/lib/controller/functions/crud.dart index 2623350..7cb266a 100644 --- a/lib/controller/functions/crud.dart +++ b/lib/controller/functions/crud.dart @@ -41,6 +41,21 @@ class CRUD { } } + Future getAgora({ + required String channelName, + }) async { + var res = await http + .get(Uri.parse('http://localhost:8080/token?channelName=$channelName')); + + if (res.statusCode == 200) { + var response = jsonDecode(res.body); + print(await response.stream.bytesToString()); + return response['token']; + } else { + print(res.reasonPhrase); + } + } + Future getLlama({ required String link, required String payload, diff --git a/lib/controller/home/captin/home_captain_controller.dart b/lib/controller/home/captin/home_captain_controller.dart index b145615..cad5855 100644 --- a/lib/controller/home/captin/home_captain_controller.dart +++ b/lib/controller/home/captin/home_captain_controller.dart @@ -24,6 +24,7 @@ class HomeCaptainController extends GetxController { Timer? activeTimer; Map data = {}; bool isLoading = true; + bool isCallOn = false; String totalMoneyToday = '0'; String totalMoneyInSEFER = '0'; String totalDurationToday = '0'; diff --git a/lib/controller/home/captin/map_driver_controller.dart b/lib/controller/home/captin/map_driver_controller.dart index f6942cb..a20b533 100644 --- a/lib/controller/home/captin/map_driver_controller.dart +++ b/lib/controller/home/captin/map_driver_controller.dart @@ -631,7 +631,7 @@ class MapDriverController extends GetxController { LatLngBounds(northeast: northeast, southwest: southwest); // Fit the camera to the bounds - var cameraUpdate = CameraUpdate.newLatLngBounds(boundsData, 130); + var cameraUpdate = CameraUpdate.newLatLngBounds(boundsData, 140); mapController!.animateCamera(cameraUpdate); update(); } diff --git a/lib/controller/home/captin/order_request_controller.dart b/lib/controller/home/captin/order_request_controller.dart index f74a28b..c4dc0d2 100644 --- a/lib/controller/home/captin/order_request_controller.dart +++ b/lib/controller/home/captin/order_request_controller.dart @@ -100,7 +100,6 @@ class OrderRequestController extends GetxController { 'order_id': orderID, 'created_at': DateTime.now().toString(), 'driver_id': box.read(BoxName.driverID).toString(), - 'rideId': orderID }, TableName.driverOrdersRefuse); getRefusedOrderByCaptain(); box.write(BoxName.statusDriverLocation, 'off'); diff --git a/lib/controller/home/captin/widget/call_page.dart b/lib/controller/home/captin/widget/call_page.dart new file mode 100644 index 0000000..e304d75 --- /dev/null +++ b/lib/controller/home/captin/widget/call_page.dart @@ -0,0 +1,97 @@ +import 'package:SEFER/constant/box_name.dart'; +import 'package:SEFER/constant/colors.dart'; +import 'package:SEFER/constant/style.dart'; +import 'package:SEFER/controller/firebase/firbase_messge.dart'; +import 'package:SEFER/controller/home/captin/map_driver_controller.dart'; +import 'package:SEFER/views/home/Captin/home_captain/call_controller.dart'; +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:SEFER/controller/home/captin/home_captain_controller.dart'; + +import '../../../../main.dart'; + +class CallPage extends StatelessWidget { + const CallPage({super.key}); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text(''), + ), + body: callPage()); + } +} + +GetBuilder callPage() { + CallController callController = Get.put(CallController()); + return GetBuilder( + builder: (controller) => controller.isCallOn == false + ? Center( + child: Container( + height: 100, + decoration: AppStyle.boxDecoration, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + GestureDetector( + onTap: () async { + // FirebaseMessagesController() + // .sendNotificationToPassengerToken( + // 'Call Income'.tr, + // 'You have call from driver ${box.read(BoxName.nameDriver)}', + // // Get.find().tokenPassenger, + // '', + // [], + // ); + await callController.initAgoraFull(); + callController.join(); + }, + child: Container( + width: 50, + height: 50, + decoration: const BoxDecoration( + shape: BoxShape.circle, color: AppColor.greenColor), + child: const Icon( + Icons.phone, + size: 35, + color: AppColor.secondaryColor, + )), + ), + Column( + children: [ + Text(callController.status), + Text( + 'passenger name'), //Get.find().passengerId.toString()), + ], + ), + GestureDetector( + onTap: () async { + FirebaseMessagesController() + .sendNotificationToPassengerToken( + 'Call End'.tr, + 'Call End', + Get.find().tokenPassenger, + [], + ); + callController.leave(); + }, + child: Container( + width: 50, + height: 50, + decoration: const BoxDecoration( + shape: BoxShape.circle, color: AppColor.redColor), + child: const Icon( + Icons.phone_disabled_sharp, + size: 35, + color: AppColor.secondaryColor, + )), + ) + ], + ), + // ignore: prefer_const_constructors + ), + ) + : const SizedBox(), + ); +} diff --git a/lib/main.dart b/lib/main.dart index 781f103..791391e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,5 +1,6 @@ import 'dart:io'; +import 'package:SEFER/views/home/Captin/home_captain/call_controller.dart'; import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/material.dart'; @@ -38,24 +39,13 @@ void main() async { } await GetStorage.init(); + // Get.put(DriverCallController()); await AC().gAK(); print( 'local is t ${WidgetsBinding.instance.platformDispatcher.locale.countryCode}'); print(Get.deviceLocale!.countryCode); Stripe.publishableKey = AK.publishableKey; - // final navigatorKey = GlobalKey(); - /// 2/5: set navigator key to ZegoUIKitPrebuiltCallInvitationService - // ZegoUIKitPrebuiltCallInvitationService().setNavigatorKey(navigatorKey); - - // ZegoUIKit().initLog().then((value) { - // ZegoUIKitPrebuiltCallInvitationService().useSystemCallingUI( - // [ZegoUIKitSignalingPlugin()], - // ); - - // runApp(MyApp(navigatorKey: navigatorKey)); - // }); - // StripeKey.publishableKey; if (Platform.isAndroid || Platform.isIOS) { await Firebase.initializeApp( options: DefaultFirebaseOptions.currentPlatform, diff --git a/lib/models/db_sql.dart b/lib/models/db_sql.dart index 77d91f8..099f236 100644 --- a/lib/models/db_sql.dart +++ b/lib/models/db_sql.dart @@ -56,8 +56,7 @@ class DbSql { ''' CREATE TABLE IF NOT EXISTS ${TableName.driverOrdersRefuse}( id INTEGER PRIMARY KEY AUTOINCREMENT, - order_id TEXT, - rideId TEXT UNIQUE, + order_id TEXT UNIQUE, created_at TEXT, driver_id TEXT ) diff --git a/lib/views/home/Captin/home_captain/call_controller.dart b/lib/views/home/Captin/home_captain/call_controller.dart new file mode 100644 index 0000000..4a132af --- /dev/null +++ b/lib/views/home/Captin/home_captain/call_controller.dart @@ -0,0 +1,127 @@ +import 'package:SEFER/constant/api_key.dart'; +import 'package:SEFER/controller/functions/crud.dart'; +import 'package:agora_rtc_engine/agora_rtc_engine.dart'; +import 'package:get/get.dart'; +import 'package:permission_handler/permission_handler.dart'; + +import '../../../../constant/box_name.dart'; +import '../../../../main.dart'; + +class CallController extends GetxController { + String channelName = + 'sefer300'; //Get.find().passengerId; + String token = + "00612994c6e707543e68d5638894d04f989IAA9fx7yHezOOXPq1l4MwrNgPVOxWj7VnirB9Ks6X37jS6MLiA8AAAAAEABXi+nQ7GjSZQEAAQAAAAAA"; + + // int uid = int.parse(box.read(BoxName.phoneDriver)); // uid of the local user + int uid = 0; + int? _remoteUid; // uid of the remote user + bool _isJoined = false; // Indicates if the local user has joined the channel + String status = ''; + late RtcEngine agoraEngine; // Agora engine instance + + @override + void onInit() { + super.onInit(); + // initAgoraFull(); + } + + initAgoraFull() async { + _remoteUid = box.read(BoxName.phone) != null + ? int.parse(box.read(BoxName.phone)) + : int.parse(box.read(BoxName.phoneDriver)); + uid = box.read(BoxName.phoneDriver) != null + ? int.parse(box.read(BoxName.phoneDriver)) + : int.parse(box.read(BoxName.phone)); + print('remoteid is $_remoteUid'); + print('uid is $uid'); + // await fetchToken(); + // Set up an instance of Agora engine + setupVoiceSDKEngine(); + } + + @override + void onClose() { + agoraEngine.leaveChannel(); + super.onClose(); + } + + Future setupVoiceSDKEngine() async { + // retrieve or request microphone permission + await [Permission.microphone].request(); + + //create an instance of the Agora engine + agoraEngine = createAgoraRtcEngine(); + await agoraEngine.initialize(const RtcEngineContext(appId: AK.agoraAppId)); + print('eeeeeeeeeeeeeeeeeeee'); + print(agoraEngine); + // Register the event handler + agoraEngine.registerEventHandler( + RtcEngineEventHandler( + onJoinChannelSuccess: (RtcConnection connection, int elapsed) { + Get.snackbar( + "Local user uid:${connection.localUid} joined the channel", ''); + status = 'joined'.tr; + _isJoined = true; + update(); + }, + onUserJoined: (RtcConnection connection, int remoteUid, int elapsed) { + Get.snackbar("Remote user uid:$remoteUid joined the channel", ''); + status = '${box.read(BoxName.nameDriver) ?? box.read(BoxName.name)}' + ' joined' + .tr; + _remoteUid = remoteUid; + update(); + }, + onUserOffline: (RtcConnection connection, int remoteUid, + UserOfflineReasonType reason) { + Get.snackbar("Remote user uid:$remoteUid left the channel", ''); + status = 'Call left'.tr; + _remoteUid = null; + update(); + }, + ), + ); + } + + void join() async { + // Set channel options including the client role and channel profile + ChannelMediaOptions options = const ChannelMediaOptions( + clientRoleType: ClientRoleType.clientRoleBroadcaster, + channelProfile: ChannelProfileType.channelProfileCommunication, + ); + + await agoraEngine.joinChannel( + token: token, + channelId: channelName, + options: options, + uid: uid, + ); + } + + void leave() { + _isJoined = false; + _remoteUid = null; + update(); + agoraEngine.leaveChannel(); + } + +// Clean up the resources when you leave + @override + void dispose() async { + await agoraEngine.leaveChannel(); + super.dispose(); + } + + fetchToken() async { + var res = await CRUD().getAgora( + channelName: 'sefer22'); //Get.find().rideId); + + print('hhhhhhhhhhhhhhhhhhhhhhh'); + print(res); + channelName = 'sefer22'; + token = res['token']; + print('token is $token'); + update(); + } +} diff --git a/lib/views/home/Captin/home_captain/driver_call_page.dart b/lib/views/home/Captin/home_captain/driver_call_page.dart new file mode 100644 index 0000000..8571c3c --- /dev/null +++ b/lib/views/home/Captin/home_captain/driver_call_page.dart @@ -0,0 +1,173 @@ +import 'dart:async'; +import 'package:SEFER/constant/box_name.dart'; +import 'package:SEFER/main.dart'; +import 'package:flutter/material.dart'; +import 'package:permission_handler/permission_handler.dart'; + +import 'package:agora_rtc_engine/agora_rtc_engine.dart'; + +import '../../../../constant/api_key.dart'; + +const String appId = AK.agoraAppId; + +class DriverCallPage extends StatefulWidget { + const DriverCallPage({super.key}); + + @override + State createState() => _DriverCallPageState(); +} + +class _DriverCallPageState extends State { + String channelName = 'sefer300'; + String token = + "00612994c6e707543e68d5638894d04f989IAACchY2SBwRcuw2mt+BocxbF+fmFKvjOS/hekkirRWfuqMLiA8AAAAAEADs3TvfbjrSZQEAAQAAAAAA"; + + // int uid = int.parse(box.read(BoxName.phoneDriver)); // uid of the local user + int uid = 0; + int? _remoteUid; // uid of the remote user + bool _isJoined = false; // Indicates if the local user has joined the channel + late RtcEngine agoraEngine; // Agora engine instance + + final GlobalKey scaffoldMessengerKey = + GlobalKey(); // Global key to access the scaffold + + showMessage(String message) { + scaffoldMessengerKey.currentState?.showSnackBar(SnackBar( + content: Text(message), + )); + } + + @override + void initState() { + super.initState(); + _remoteUid = box.read(BoxName.phone) != null + ? int.parse(box.read(BoxName.phone)) + : int.parse(box.read(BoxName.phoneDriver)); + uid = box.read(BoxName.phoneDriver) != null + ? int.parse(box.read(BoxName.phoneDriver)) + : int.parse(box.read(BoxName.phone)); + print('remoteid is $_remoteUid'); + print('uid is $uid'); + // Set up an instance of Agora engine + setupVoiceSDKEngine(); + } + + Future setupVoiceSDKEngine() async { + // retrieve or request microphone permission + await [Permission.microphone].request(); + + //create an instance of the Agora engine + agoraEngine = createAgoraRtcEngine(); + await agoraEngine.initialize(const RtcEngineContext(appId: AK.agoraAppId)); + print('eeeeeeeeeeeeeeeeeeee'); + print(agoraEngine); + // Register the event handler + agoraEngine.registerEventHandler( + RtcEngineEventHandler( + onJoinChannelSuccess: (RtcConnection connection, int elapsed) { + showMessage( + "Local user uid:${connection.localUid} joined the channel"); + setState(() { + _isJoined = true; + }); + }, + onUserJoined: (RtcConnection connection, int remoteUid, int elapsed) { + showMessage("Remote user uid:$remoteUid joined the channel"); + setState(() { + _remoteUid = remoteUid; + }); + }, + onUserOffline: (RtcConnection connection, int remoteUid, + UserOfflineReasonType reason) { + showMessage("Remote user uid:$remoteUid left the channel"); + setState(() { + _remoteUid = null; + }); + }, + ), + ); + } + + void join() async { + // Set channel options including the client role and channel profile + ChannelMediaOptions options = const ChannelMediaOptions( + clientRoleType: ClientRoleType.clientRoleBroadcaster, + channelProfile: ChannelProfileType.channelProfileCommunication, + ); + + await agoraEngine.joinChannel( + token: token, + channelId: channelName, + options: options, + uid: uid, + ); + } + //https://console.agora.io/invite?sign=5e9e22d06f22caeeada9954c9e908572%253A5ba8aed978a35eab5a5113742502ded2a41478b2a81cb19c71a30776e125b58a + + void leave() { + setState(() { + _isJoined = false; + _remoteUid = null; + }); + agoraEngine.leaveChannel(); + } + +// Clean up the resources when you leave + @override + void dispose() async { + await agoraEngine.leaveChannel(); + super.dispose(); + } + +// Build UI + @override + Widget build(BuildContext context) { + return MaterialApp( + scaffoldMessengerKey: scaffoldMessengerKey, + home: Scaffold( + appBar: AppBar( + title: const Text('Get started with Voice Calling'), + ), + body: ListView( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 4), + children: [ + // Status text + Container(height: 40, child: Center(child: _status())), + // Button Row + Row( + children: [ + Expanded( + child: ElevatedButton( + child: const Text("Join"), + onPressed: () => {join()}, + ), + ), + const SizedBox(width: 10), + Expanded( + child: ElevatedButton( + child: const Text("Leave"), + onPressed: () => {leave()}, + ), + ), + ], + ), + ], + )), + ); + } + + Widget _status() { + String statusText; + + if (!_isJoined) + statusText = 'Join a channel'; + else if (_remoteUid == null) + statusText = 'Waiting for a remote user to join...'; + else + statusText = 'Connected to remote user, uid:$_remoteUid'; + + return Text( + statusText, + ); + } +} diff --git a/lib/views/home/Captin/home_captain/home_captin.dart b/lib/views/home/Captin/home_captain/home_captin.dart index e3e07e3..26b07a8 100644 --- a/lib/views/home/Captin/home_captain/home_captin.dart +++ b/lib/views/home/Captin/home_captain/home_captin.dart @@ -1,3 +1,4 @@ +import 'package:SEFER/views/home/Captin/home_captain/driver_call_page.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; @@ -12,8 +13,10 @@ import '../../../../constant/table_names.dart'; import '../../../../controller/functions/location_controller.dart'; import '../../../../controller/home/captin/home_captain_controller.dart'; import '../../../../controller/home/captin/order_request_controller.dart'; +import '../../../../controller/home/captin/widget/call_page.dart'; import '../../../../controller/home/captin/widget/connect.dart'; import '../../../../controller/home/captin/widget/left_menu_map_captain.dart'; +import '../../../../controller/home/payment/captain_wallet_controller.dart'; import '../../../../controller/local/local_controller.dart'; import '../../../../main.dart'; import '../../../widgets/circle_container.dart'; @@ -27,7 +30,7 @@ class HomeCaptain extends StatelessWidget { Widget build(BuildContext context) { Get.put(OrderRequestController()); Get.put(HomeCaptainController()); - Get.put(LocationController()); + // Get.put(LocationController()); print('local is ${Get.find().language!.countryCode}'); return Scaffold( appBar: AppBar( @@ -143,12 +146,18 @@ class HomeCaptain extends StatelessWidget { color: AppColor.yellowColor, ), Text( - ' You Have in ${AppInformation.appName} '.tr + + ' You Have in'.tr + + ' ${AppInformation.appName} '.tr + homeCaptainController.totalMoneyInSEFER, style: AppStyle.title, ), ], ), + Text( + 'Total points is '.tr + + Get.find().totalPoints, + style: AppStyle.title, + ), ], ))), ), @@ -187,15 +196,29 @@ class HomeCaptain extends StatelessWidget { borderRadius: BorderRadius.circular(15)), child: IconButton( onPressed: () { - // Get.to( - // () => CameraWidgetCardId(), - // ); + Get.to( + () => const DriverCallPage(), + ); }, - icon: const Icon(Fontisto.history), + icon: const Icon(Fontisto.phone), ), ), ), leftMainMenuCaptainIcons(), + // callPage(), + + Positioned( + top: Get.height * .2, + // left: 20, + // right: 20, + bottom: Get.height * .4, + child: IconButton( + onPressed: () { + Get.to(() => const CallPage()); + }, + icon: const Icon(Icons.call), + ), + ), ], ), ); diff --git a/lib/views/home/Captin/mapDriverWidgets/passenger_info_window.dart b/lib/views/home/Captin/mapDriverWidgets/passenger_info_window.dart index e2f2280..23b597e 100644 --- a/lib/views/home/Captin/mapDriverWidgets/passenger_info_window.dart +++ b/lib/views/home/Captin/mapDriverWidgets/passenger_info_window.dart @@ -234,6 +234,22 @@ class PassengerInfoWindow extends StatelessWidget { controller .isArrivedSend = false; + } else { + Get.defaultDialog( + title: + 'You are not in near to passenger location' + .tr, + middleText: + 'please go to picker location exactly' + .tr, + confirm: + MyElevatedButton( + title: + 'Ok'.tr, + onPressed: + () { + Get.back(); + })); } }) : const SizedBox() diff --git a/lib/views/home/map_widget.dart/left_main_menu_icons.dart b/lib/views/home/map_widget.dart/left_main_menu_icons.dart index 5903ce2..933c612 100644 --- a/lib/views/home/map_widget.dart/left_main_menu_icons.dart +++ b/lib/views/home/map_widget.dart/left_main_menu_icons.dart @@ -10,7 +10,7 @@ import '../../../constant/colors.dart'; import '../../../controller/firebase/local_notification.dart'; import '../../../controller/functions/tts.dart'; import '../../../controller/home/map_passenger_controller.dart'; -import '../Captin/orderCaptin/call.dart'; +import '../Captin/home_captain/driver_call_page.dart'; GetBuilder leftMainMenuIcons() { final textToSpeechController = Get.put(TextToSpeechController()); @@ -110,9 +110,9 @@ GetBuilder leftMainMenuIcons() { borderRadius: BorderRadius.circular(15)), child: IconButton( onPressed: () { - NotificationController() - .showNotification('Order', 'hi this is', 'tone1'); - // Get.to(() => CallPage(callID: '111')); + // NotificationController() + // .showNotification('Order', 'hi this is', 'tone1'); + Get.to(() => DriverCallPage()); // Get.to(() => CallPage(callID: controller.rideId)); }, icon: const Icon( diff --git a/pubspec.lock b/pubspec.lock index acb84fe..c29590e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1392,6 +1392,54 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.1" + permission_handler: + dependency: "direct main" + description: + name: permission_handler + sha256: "74e962b7fad7ff75959161bb2c0ad8fe7f2568ee82621c9c2660b751146bfe44" + url: "https://pub.dev" + source: hosted + version: "11.3.0" + permission_handler_android: + dependency: transitive + description: + name: permission_handler_android + sha256: "1acac6bae58144b442f11e66621c062aead9c99841093c38f5bcdcc24c1c3474" + url: "https://pub.dev" + source: hosted + version: "12.0.5" + permission_handler_apple: + dependency: transitive + description: + name: permission_handler_apple + sha256: bdafc6db74253abb63907f4e357302e6bb786ab41465e8635f362ee71fd8707b + url: "https://pub.dev" + source: hosted + version: "9.4.0" + permission_handler_html: + dependency: transitive + description: + name: permission_handler_html + sha256: "54bf176b90f6eddd4ece307e2c06cf977fb3973719c35a93b85cc7093eb6070d" + url: "https://pub.dev" + source: hosted + version: "0.1.1" + permission_handler_platform_interface: + dependency: transitive + description: + name: permission_handler_platform_interface + sha256: "23dfba8447c076ab5be3dee9ceb66aad345c4a648f0cac292c77b1eb0e800b78" + url: "https://pub.dev" + source: hosted + version: "4.2.0" + permission_handler_windows: + dependency: transitive + description: + name: permission_handler_windows + sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" + url: "https://pub.dev" + source: hosted + version: "0.2.1" petitparser: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index c0a6dab..bc550cf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -52,8 +52,7 @@ dependencies: fl_chart: ^0.66.0 agora_rtc_engine: ^6.2.6 flutter_tts: ^3.8.5 - # zego_uikit_prebuilt_call: ^4.2.1 - # zego_uikit_signaling_plugin: ^2.7.4 + permission_handler: ^11.3.0 diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 5d16203..6a9a0c3 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -14,6 +14,7 @@ #include #include #include +#include #include void RegisterPlugins(flutter::PluginRegistry* registry) { @@ -33,6 +34,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { registry->GetRegistrarForPlugin("IrisMethodChannelPluginCApi")); LocalAuthPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("LocalAuthPlugin")); + PermissionHandlerWindowsPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); UrlLauncherWindowsRegisterWithRegistrar( registry->GetRegistrarForPlugin("UrlLauncherWindows")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 9326b89..af7f7fc 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -11,6 +11,7 @@ list(APPEND FLUTTER_PLUGIN_LIST geolocator_windows iris_method_channel local_auth_windows + permission_handler_windows url_launcher_windows )