liuyuqi-dellpc 11 months ago
parent
commit
c0d0b49beb

+ 3 - 3
android/app/build.gradle

@@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
 apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
 
 android {
-    compileSdkVersion 28
+    compileSdkVersion 33
 
     sourceSets {
         main.java.srcDirs += 'src/main/kotlin'
@@ -39,8 +39,8 @@ android {
     defaultConfig {
         // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
         applicationId "io.agora.agora_rtc_engine_example"
-        minSdkVersion 16
-        targetSdkVersion 28
+        minSdkVersion 21
+        targetSdkVersion 33
         versionCode flutterVersionCode.toInteger()
         versionName flutterVersionName
 

+ 2 - 1
android/app/src/main/AndroidManifest.xml

@@ -7,13 +7,14 @@
          additional functionality it is fine to subclass or reimplement
          FlutterApplication and put your custom class here. -->
     <application
-        android:name="io.flutter.app.FlutterApplication"
+        android:name="${applicationName}"
         android:label="agora_rtc_engine_example"
         android:icon="@mipmap/ic_launcher">
         <activity
             android:name=".MainActivity"
             android:launchMode="singleTop"
             android:theme="@style/LaunchTheme"
+            android:exported="true"
             android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
             android:hardwareAccelerated="true"
             android:windowSoftInputMode="adjustResize">

+ 2 - 2
android/build.gradle

@@ -1,12 +1,12 @@
 buildscript {
-    ext.kotlin_version = '1.3.72'
+    ext.kotlin_version = '1.6.0'
     repositories {
         google()
         jcenter()
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:3.5.0'
+        classpath 'com.android.tools.build:gradle:7.2.2'
         classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
     }
 }

+ 1 - 1
android/gradle/wrapper/gradle-wrapper.properties

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip

+ 35 - 35
lib/examples/config/voice_changer.config.dart → lib/config/voice_changer.config.dart

@@ -1,121 +1,121 @@
-import 'package:agora_rtc_engine/rtc_engine.dart';
+import 'package:agora_rtc_engine/agora_rtc_engine.dart';
 
 /// VoiceChangeConfig
 const VoiceChangeConfig = [
   {
     'alertTitle': 'Set Chat Beautifier',
     'options': [
-      {'text': 'Off', 'type': VoiceBeautifierPreset.VoiceBeautifierOff},
+      {'text': 'Off', 'type': VoiceBeautifierPreset.voiceBeautifierOff},
       {
         'text': 'FemaleFresh',
-        'type': VoiceBeautifierPreset.ChatBeautifierFresh
+        'type': VoiceBeautifierPreset.chatBeautifierFresh
       },
       {
         'text': 'FemaleVitality',
-        'type': VoiceBeautifierPreset.ChatBeautifierVitality,
+        'type': VoiceBeautifierPreset.chatBeautifierVitality,
       },
       {
         'text': 'Vigorous',
-        'type': VoiceBeautifierPreset.ChatBeautifierMagnetic
+        'type': VoiceBeautifierPreset.chatBeautifierMagnetic
       },
     ],
   },
   {
     'alertTitle': 'Set Timbre Transformation',
     'options': [
-      {'text': 'Off', 'type': VoiceBeautifierPreset.VoiceBeautifierOff},
+      {'text': 'Off', 'type': VoiceBeautifierPreset.voiceBeautifierOff},
       {
         'text': 'Vigorous',
-        'type': VoiceBeautifierPreset.TimbreTransformationVigorous,
+        'type': VoiceBeautifierPreset.timbreTransformationVigorous,
       },
-      {'text': 'Deep', 'type': VoiceBeautifierPreset.TimbreTransformationDeep},
+      {'text': 'Deep', 'type': VoiceBeautifierPreset.timbreTransformationDeep},
       {
         'text': 'Mellow',
-        'type': VoiceBeautifierPreset.TimbreTransformationMellow,
+        'type': VoiceBeautifierPreset.timbreTransformationMellow,
       },
       {
         'text': 'Falsetto',
-        'type': VoiceBeautifierPreset.TimbreTransformationFalsetto,
+        'type': VoiceBeautifierPreset.timbreTransformationFalsetto,
       },
-      {'text': 'Full', 'type': VoiceBeautifierPreset.TimbreTransformationFull},
+      {'text': 'Full', 'type': VoiceBeautifierPreset.timbreTransformationFull},
       {
         'text': 'Clear',
-        'type': VoiceBeautifierPreset.TimbreTransformationClear
+        'type': VoiceBeautifierPreset.timbreTransformationClear
       },
       {
         'text': 'Resounding',
-        'type': VoiceBeautifierPreset.TimbreTransformationResounding,
+        'type': VoiceBeautifierPreset.timbreTransformationResounding,
       },
       {
         'text': 'Ringing',
-        'type': VoiceBeautifierPreset.TimbreTransformationRinging,
+        'type': VoiceBeautifierPreset.timbreTransformationRinging,
       },
     ],
   },
   {
     'alertTitle': 'Set Style Transformation',
     'options': [
-      {'text': 'Off', 'type': AudioEffectPreset.AudioEffectOff},
-      {'text': 'Pop', 'type': AudioEffectPreset.StyleTransformationPopular},
-      {'text': 'R&B', 'type': AudioEffectPreset.StyleTransformationRnB},
+      {'text': 'Off', 'type': AudioEffectPreset.audioEffectOff},
+      {'text': 'Pop', 'type': AudioEffectPreset.styleTransformationPopular},
+      {'text': 'R&B', 'type': AudioEffectPreset.styleTransformationRnb},
     ],
   },
   {
     'alertTitle': 'Set Voice Changer',
     'options': [
-      {'text': 'Off', 'type': AudioEffectPreset.AudioEffectOff},
+      {'text': 'Off', 'type': AudioEffectPreset.audioEffectOff},
       {
         'text': 'FxUncle',
-        'type': AudioEffectPreset.VoiceChangerEffectUncle,
+        'type': AudioEffectPreset.voiceChangerEffectUncle,
       },
       {
         'text': 'Old Man',
-        'type': AudioEffectPreset.VoiceChangerEffectOldMan,
+        'type': AudioEffectPreset.voiceChangerEffectOldman,
       },
       {
         'text': 'Baby Boy',
-        'type': AudioEffectPreset.VoiceChangerEffectBoy,
+        'type': AudioEffectPreset.voiceChangerEffectBoy,
       },
       {
         'text': 'FxSister',
-        'type': AudioEffectPreset.VoiceChangerEffectSister,
+        'type': AudioEffectPreset.voiceChangerEffectSister,
       },
       {
         'text': 'Baby Girl',
-        'type': AudioEffectPreset.VoiceChangerEffectGirl,
+        'type': AudioEffectPreset.voiceChangerEffectGirl,
       },
       {
         'text': 'ZhuBaJie',
-        'type': AudioEffectPreset.VoiceChangerEffectPigKing,
+        'type': AudioEffectPreset.voiceChangerEffectPigking,
       },
-      {'text': 'Hulk', 'type': AudioEffectPreset.VoiceChangerEffectHulk},
+      {'text': 'Hulk', 'type': AudioEffectPreset.voiceChangerEffectHulk},
     ],
   },
   {
     'alertTitle': 'Set Room Acoustics',
     'options': [
-      {'text': 'Off', 'type': AudioEffectPreset.AudioEffectOff},
+      {'text': 'Off', 'type': AudioEffectPreset.audioEffectOff},
       {'text': 'KTV', 'type': AudioEffectPreset.RoomAcousticsKTV},
-      {'text': 'Concert', 'type': AudioEffectPreset.RoomAcousticsVocalConcert},
-      {'text': 'Studio', 'type': AudioEffectPreset.RoomAcousticsStudio},
-      {'text': 'Phonograph', 'type': AudioEffectPreset.RoomAcousticsPhonograph},
+      {'text': 'Concert', 'type': AudioEffectPreset.roomAcousticsVocalConcert},
+      {'text': 'Studio', 'type': AudioEffectPreset.roomAcousticsStudio},
+      {'text': 'Phonograph', 'type': AudioEffectPreset.roomAcousticsPhonograph},
       {
         'text': 'Virtual Stereo',
-        'type': AudioEffectPreset.RoomAcousticsVirtualStereo,
+        'type': AudioEffectPreset.roomAcousticsVirtualStereo,
       },
-      {'text': 'Spacial', 'type': AudioEffectPreset.RoomAcousticsSpacial},
-      {'text': 'Ethereal', 'type': AudioEffectPreset.RoomAcousticsEthereal},
+      {'text': 'Spacial', 'type': AudioEffectPreset.roomAcousticsSpacial},
+      {'text': 'Ethereal', 'type': AudioEffectPreset.roomAcousticsEthereal},
       {
         'text': '3D Voice',
-        'type': AudioEffectPreset.RoomAcoustics3DVoice,
+        'type': AudioEffectPreset.roomAcoustics3dVoice,
       },
     ],
   },
   {
     'alertTitle': 'Set Pitch Correction',
     'options': [
-      {'text': 'Off', 'type': AudioEffectPreset.AudioEffectOff},
-      {'text': 'Pitch Correction', 'type': AudioEffectPreset.PitchCorrection},
+      {'text': 'Off', 'type': AudioEffectPreset.audioEffectOff},
+      {'text': 'Pitch Correction', 'type': AudioEffectPreset.pitchCorrection},
     ],
   },
 ];

+ 0 - 21
lib/examples/advanced/index.dart

@@ -1,21 +0,0 @@
-import 'package:agora_rtc_engine_example/examples/advanced/create_stream_data.dart';
-import 'package:agora_rtc_engine_example/examples/advanced/live_streaming.dart';
-import 'package:agora_rtc_engine_example/examples/advanced/media_channel_relay.dart';
-import 'package:agora_rtc_engine_example/examples/advanced/multi_channel.dart';
-import 'package:agora_rtc_engine_example/examples/advanced/voice_change.dart';
-
-/// Data source for advanced examples
-final Advanced = [
-  {'name': 'Advanced'},
-  {'name': 'MultiChannel', 'widget': MultiChannel()},
-  {'name': 'LiveStreaming', 'widget': LiveStreaming()},
-  {
-    'name': 'CreateStreamData',
-    'widget': CreateStreamData(),
-  },
-  {
-    'name': 'MediaChannelRelay',
-    'widget': MediaChannelRelay(),
-  },
-  {'name': 'VoiceChange', 'widget': VoiceChange()},
-];

+ 0 - 11
lib/examples/basic/index.dart

@@ -1,11 +0,0 @@
-import 'package:agora_rtc_engine_example/examples/basic/join_channel_audio.dart';
-import 'package:agora_rtc_engine_example/examples/basic/join_channel_video.dart';
-import 'package:agora_rtc_engine_example/examples/basic/string_uid.dart';
-
-/// Data source for basic examples
-final Basic = [
-  {'name': 'Basic'},
-  {'name': 'JoinChannelAudio', 'widget': JoinChannelAudio()},
-  {'name': 'JoinChannelVideo', 'widget': JoinChannelVideo()},
-  {'name': 'StringUid', 'widget': StringUid()}
-];

+ 6 - 3
lib/main.dart

@@ -1,23 +1,26 @@
 import 'package:flutter/material.dart';
 
-import 'examples/advanced/index.dart';
-import 'examples/basic/index.dart';
+import 'pages/advanced/index.dart';
+import 'pages/basic/index.dart';
 
 void main() => runApp(MyApp());
 
 /// This widget is the root of your application.
 class MyApp extends StatelessWidget {
+
   final _DATA = [...Basic, ...Advanced];
 
   @override
   Widget build(BuildContext context) {
+
     return MaterialApp(
+      debugShowCheckedModeBanner: false,
       theme: ThemeData(
         primarySwatch: Colors.blue,
       ),
       home: Scaffold(
         appBar: AppBar(
-          title: const Text('APIExample'),
+          title: const Text('玻璃心'),
         ),
         body: ListView.builder(
           itemCount: _DATA.length,

+ 28 - 0
lib/model/user.dart

@@ -0,0 +1,28 @@
+/// User model类
+/// Time:
+/// Copyright © 2021 liuyuqi.gov@msn.cn. All Rights Reserved.
+class User {
+  String userid;
+  String userName;
+  String token;
+
+  User.fromJson(Map<String, dynamic> json) {
+    userid = json['userid'];
+    userName = json['userName'];
+    token = json['token'];
+  }
+
+  Map<String,dynamic> toJson(User user) {
+    return {
+      'userid': userid,
+      'userName': userName,
+      'token': token,
+    };
+}
+
+class Users {
+  List<User> users;
+ List<User>  fromJson(){
+   
+ }
+}

+ 1 - 1
lib/examples/advanced/create_stream_data.dart → lib/pages/advanced/create_stream_data.dart

@@ -1,10 +1,10 @@
 import 'dart:developer';
 
+import 'package:agora_rtc_engine/agora_rtc_engine.dart';
 import 'package:agora_rtc_engine/rtc_engine.dart';
 import 'package:agora_rtc_engine/rtc_local_view.dart' as RtcLocalView;
 import 'package:agora_rtc_engine/rtc_remote_view.dart' as RtcRemoteView;
 import 'package:agora_rtc_engine_example/config/agora.config.dart' as config;
-import 'package:flutter/cupertino.dart';
 import 'package:flutter/foundation.dart';
 import 'package:flutter/material.dart';
 import 'package:permission_handler/permission_handler.dart';

+ 21 - 0
lib/pages/advanced/index.dart

@@ -0,0 +1,21 @@
+import 'package:agora_rtc_engine_example/pages/advanced/create_stream_data.dart';
+import 'package:agora_rtc_engine_example/pages/advanced/live_streaming.dart';
+import 'package:agora_rtc_engine_example/pages/advanced/media_channel_relay.dart';
+import 'package:agora_rtc_engine_example/pages/advanced/multi_channel.dart';
+import 'package:agora_rtc_engine_example/pages/advanced/voice_change.dart';
+
+/// Data source for advanced examples
+final Advanced = [
+  {'name': 'Advanced'},
+  {'name': 'MultiChannel', 'widget': MultiChannel()},
+  {'name': 'LiveStreaming', 'widget': LiveStreaming()},
+  {
+    'name': 'CreateStreamData',
+    'widget': CreateStreamData(),
+  },
+  {
+    'name': 'MediaChannelRelay',
+    'widget': MediaChannelRelay(),
+  },
+  {'name': 'VoiceChange', 'widget': VoiceChange()},
+];

+ 0 - 1
lib/examples/advanced/live_streaming.dart → lib/pages/advanced/live_streaming.dart

@@ -4,7 +4,6 @@ import 'package:agora_rtc_engine/rtc_engine.dart';
 import 'package:agora_rtc_engine/rtc_local_view.dart' as RtcLocalView;
 import 'package:agora_rtc_engine/rtc_remote_view.dart' as RtcRemoteView;
 import 'package:agora_rtc_engine_example/config/agora.config.dart' as config;
-import 'package:flutter/cupertino.dart';
 import 'package:flutter/foundation.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/scheduler.dart';

+ 0 - 0
lib/examples/advanced/media_channel_relay.dart → lib/pages/advanced/media_channel_relay.dart


+ 0 - 0
lib/examples/advanced/multi_channel.dart → lib/pages/advanced/multi_channel.dart


+ 4 - 4
lib/examples/advanced/voice_change.dart → lib/pages/advanced/voice_change.dart

@@ -1,8 +1,8 @@
 import 'dart:developer';
 
-import 'package:agora_rtc_engine/rtc_engine.dart';
+import 'package:agora_rtc_engine/agora_rtc_engine.dart';
 import 'package:agora_rtc_engine_example/config/agora.config.dart' as config;
-import 'package:agora_rtc_engine_example/examples/config/voice_changer.config.dart';
+import 'package:agora_rtc_engine_example/config/voice_changer.config.dart';
 import 'package:flutter/cupertino.dart';
 import 'package:flutter/foundation.dart';
 import 'package:flutter/material.dart';
@@ -118,7 +118,7 @@ class _State extends State<VoiceChange> {
     this.setState(() {
       currentAudioEffectPreset = type;
       switch (type) {
-        case AudioEffectPreset.RoomAcoustics3DVoice:
+        case AudioEffectPreset.roomAcoustics3dVoice:
           isEnableSlider1 = true;
           isEnableSlider2 = false;
           sliderTitle1 = 'Cycle';
@@ -126,7 +126,7 @@ class _State extends State<VoiceChange> {
           sliderValue1 = 1;
           maximumValue1 = 3;
           break;
-        case AudioEffectPreset.PitchCorrection:
+        case AudioEffectPreset.pitchCorrection:
           isEnableSlider1 = true;
           isEnableSlider2 = true;
           sliderTitle1 = 'Tonic Mode';

+ 11 - 0
lib/pages/basic/index.dart

@@ -0,0 +1,11 @@
+import 'package:agora_rtc_engine_example/pages/basic/join_channel_audio.dart';
+import 'package:agora_rtc_engine_example/pages/basic/join_channel_video.dart';
+import 'package:agora_rtc_engine_example/pages/basic/string_uid.dart';
+
+/// Data source for basic examples
+final Basic = [
+  {'name': 'Basic'},
+  {'name': '语音聊天', 'widget': JoinChannelAudio()},
+  {'name': '视频聊天', 'widget': JoinChannelVideo()},
+  {'name': 'StringUid', 'widget': StringUid()}
+];

+ 2 - 3
lib/examples/basic/join_channel_audio.dart → lib/pages/basic/join_channel_audio.dart

@@ -1,9 +1,8 @@
 import 'dart:async';
 import 'dart:developer';
 
-import 'package:agora_rtc_engine/rtc_engine.dart';
+import 'package:agora_rtc_engine/agora_rtc_engine.dart';
 import 'package:agora_rtc_engine_example/config/agora.config.dart' as config;
-import 'package:flutter/cupertino.dart';
 import 'package:flutter/foundation.dart';
 import 'package:flutter/material.dart';
 import 'package:permission_handler/permission_handler.dart';
@@ -50,7 +49,7 @@ class _State extends State<JoinChannelAudio> {
   _addListeners() {
     _engine.setEventHandler(RtcEngineEventHandler(
       joinChannelSuccess: (channel, uid, elapsed) {
-        log('joinChannelSuccess ${channel} ${uid} ${elapsed}');
+        log('joinChannelSuccess $channel $uid $elapsed');
         setState(() {
           isJoined = true;
         });

+ 0 - 0
lib/examples/basic/join_channel_video.dart → lib/pages/basic/join_channel_video.dart


+ 7 - 7
lib/examples/basic/string_uid.dart → lib/pages/basic/string_uid.dart

@@ -15,9 +15,9 @@ class StringUid extends StatefulWidget {
 
 class _State extends State<StringUid> {
   late final RtcEngine _engine;
-  String channelId = config.channelId;
-  String stringUid = config.stringUid;
-  bool isJoined = false;
+  String channelId = config.channelId;// 频道id
+  String stringUid = config.stringUid;// 用户id
+  bool isJoined = false; // user 是否加入 频道
   TextEditingController? _controller0, _controller1;
 
   @override
@@ -33,7 +33,7 @@ class _State extends State<StringUid> {
     super.dispose();
     _engine.destroy();
   }
-
+/// 初始化IM
   _initEngine() async {
     _engine = await RtcEngine.createWithContext(RtcEngineContext(config.appId));
     this._addListeners();
@@ -70,7 +70,7 @@ class _State extends State<StringUid> {
   _leaveChannel() async {
     await _engine.leaveChannel();
   }
-
+  /// 获取当前用户信息
   _getUserInfo() {
     _engine.getUserInfoByUserAccount(stringUid).then((userInfo) {
       log('getUserInfoByUserAccount ${userInfo.toJson()}');
@@ -90,7 +90,7 @@ class _State extends State<StringUid> {
           children: [
             TextField(
               controller: _controller0,
-              decoration: InputDecoration(hintText: 'Channel ID'),
+              decoration: InputDecoration(hintText: '聊天室'),
               onChanged: (text) {
                 setState(() {
                   channelId = text;
@@ -99,7 +99,7 @@ class _State extends State<StringUid> {
             ),
             TextField(
               controller: _controller1,
-              decoration: InputDecoration(hintText: 'String User ID'),
+              decoration: InputDecoration(hintText: '用户名'),
               onChanged: (text) {
                 setState(() {
                   stringUid = text;

+ 8 - 0
linux/flutter/generated_plugins.cmake

@@ -5,6 +5,9 @@
 list(APPEND FLUTTER_PLUGIN_LIST
 )
 
+list(APPEND FLUTTER_FFI_PLUGIN_LIST
+)
+
 set(PLUGIN_BUNDLED_LIBRARIES)
 
 foreach(plugin ${FLUTTER_PLUGIN_LIST})
@@ -13,3 +16,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST})
   list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
   list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
 endforeach(plugin)
+
+foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
+  add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
+  list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
+endforeach(ffi_plugin)

+ 4 - 0
macos/Flutter/GeneratedPluginRegistrant.swift

@@ -5,6 +5,10 @@
 import FlutterMacOS
 import Foundation
 
+import agora_rtc_engine
+import iris_method_channel
 
 func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
+  AgoraRtcNgPlugin.register(with: registry.registrar(forPlugin: "AgoraRtcNgPlugin"))
+  IrisMethodChannelPlugin.register(with: registry.registrar(forPlugin: "IrisMethodChannelPlugin"))
 }

+ 321 - 0
pubspec.lock

@@ -0,0 +1,321 @@
+# Generated by pub
+# See https://dart.dev/tools/pub/glossary#lockfile
+packages:
+  agora_rtc_engine:
+    dependency: "direct main"
+    description:
+      name: agora_rtc_engine
+      sha256: f4ed954e859d7de0d036e17f2657f748813d1184d71de6d14cbabe43d49cfb6b
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "6.2.0"
+  async:
+    dependency: transitive
+    description:
+      name: async
+      sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "2.11.0"
+  boolean_selector:
+    dependency: transitive
+    description:
+      name: boolean_selector
+      sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "2.1.1"
+  characters:
+    dependency: transitive
+    description:
+      name: characters
+      sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "1.3.0"
+  clock:
+    dependency: transitive
+    description:
+      name: clock
+      sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "1.1.1"
+  collection:
+    dependency: transitive
+    description:
+      name: collection
+      sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "1.17.1"
+  cupertino_icons:
+    dependency: "direct main"
+    description:
+      name: cupertino_icons
+      sha256: "486b7bc707424572cdf7bd7e812a0c146de3fd47ecadf070254cc60383f21dd8"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "1.0.3"
+  fake_async:
+    dependency: transitive
+    description:
+      name: fake_async
+      sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "1.3.1"
+  ffi:
+    dependency: transitive
+    description:
+      name: ffi
+      sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "2.0.2"
+  file:
+    dependency: transitive
+    description:
+      name: file
+      sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "6.1.4"
+  flutter:
+    dependency: "direct main"
+    description: flutter
+    source: sdk
+    version: "0.0.0"
+  flutter_driver:
+    dependency: "direct dev"
+    description: flutter
+    source: sdk
+    version: "0.0.0"
+  flutter_test:
+    dependency: "direct dev"
+    description: flutter
+    source: sdk
+    version: "0.0.0"
+  flutter_web_plugins:
+    dependency: transitive
+    description: flutter
+    source: sdk
+    version: "0.0.0"
+  fuchsia_remote_debug_protocol:
+    dependency: transitive
+    description: flutter
+    source: sdk
+    version: "0.0.0"
+  integration_test:
+    dependency: "direct dev"
+    description: flutter
+    source: sdk
+    version: "0.0.0"
+  iris_method_channel:
+    dependency: transitive
+    description:
+      name: iris_method_channel
+      sha256: dce2527839b46d1d0f0573b5ae1425e23a111afb280245ea1500f16a11957ad4
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "1.1.0"
+  js:
+    dependency: transitive
+    description:
+      name: js
+      sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "0.6.7"
+  json_annotation:
+    dependency: transitive
+    description:
+      name: json_annotation
+      sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "4.8.1"
+  matcher:
+    dependency: transitive
+    description:
+      name: matcher
+      sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "0.12.15"
+  material_color_utilities:
+    dependency: transitive
+    description:
+      name: material_color_utilities
+      sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "0.2.0"
+  meta:
+    dependency: transitive
+    description:
+      name: meta
+      sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "1.9.1"
+  path:
+    dependency: transitive
+    description:
+      name: path
+      sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "1.8.3"
+  permission_handler:
+    dependency: "direct main"
+    description:
+      name: permission_handler
+      sha256: "33c6a1253d1f95fd06fa74b65b7ba907ae9811f9d5c1d3150e51417d04b8d6a8"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "10.2.0"
+  permission_handler_android:
+    dependency: transitive
+    description:
+      name: permission_handler_android
+      sha256: d8cc6a62ded6d0f49c6eac337e080b066ee3bce4d405bd9439a61e1f1927bfe8
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "10.2.1"
+  permission_handler_apple:
+    dependency: transitive
+    description:
+      name: permission_handler_apple
+      sha256: ee96ac32f5a8e6f80756e25b25b9f8e535816c8e6665a96b6d70681f8c4f7e85
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "9.0.8"
+  permission_handler_platform_interface:
+    dependency: transitive
+    description:
+      name: permission_handler_platform_interface
+      sha256: "68abbc472002b5e6dfce47fe9898c6b7d8328d58b5d2524f75e277c07a97eb84"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "3.9.0"
+  permission_handler_windows:
+    dependency: transitive
+    description:
+      name: permission_handler_windows
+      sha256: f67cab14b4328574938ecea2db3475dad7af7ead6afab6338772c5f88963e38b
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "0.1.2"
+  platform:
+    dependency: transitive
+    description:
+      name: platform
+      sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "3.1.0"
+  plugin_platform_interface:
+    dependency: transitive
+    description:
+      name: plugin_platform_interface
+      sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "2.1.4"
+  process:
+    dependency: transitive
+    description:
+      name: process
+      sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "4.2.4"
+  sky_engine:
+    dependency: transitive
+    description: flutter
+    source: sdk
+    version: "0.0.99"
+  source_span:
+    dependency: transitive
+    description:
+      name: source_span
+      sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "1.9.1"
+  stack_trace:
+    dependency: transitive
+    description:
+      name: stack_trace
+      sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "1.11.0"
+  stream_channel:
+    dependency: transitive
+    description:
+      name: stream_channel
+      sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "2.1.1"
+  string_scanner:
+    dependency: transitive
+    description:
+      name: string_scanner
+      sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "1.2.0"
+  sync_http:
+    dependency: transitive
+    description:
+      name: sync_http
+      sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "0.3.1"
+  term_glyph:
+    dependency: transitive
+    description:
+      name: term_glyph
+      sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "1.2.1"
+  test_api:
+    dependency: transitive
+    description:
+      name: test_api
+      sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "0.5.1"
+  vector_math:
+    dependency: transitive
+    description:
+      name: vector_math
+      sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "2.1.4"
+  vm_service:
+    dependency: transitive
+    description:
+      name: vm_service
+      sha256: f6deed8ed625c52864792459709183da231ebf66ff0cf09e69b573227c377efe
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "11.3.0"
+  webdriver:
+    dependency: transitive
+    description:
+      name: webdriver
+      sha256: "3c923e918918feeb90c4c9fdf1fe39220fa4c0e8e2c0fffaded174498ef86c49"
+      url: "https://pub.flutter-io.cn"
+    source: hosted
+    version: "3.0.2"
+sdks:
+  dart: ">=3.0.0-0 <4.0.0"
+  flutter: ">=2.8.0"

+ 3 - 2
pubspec.yaml

@@ -8,9 +8,9 @@ environment:
 dependencies:
   flutter:
     sdk: flutter
-  agora_rtc_engine: ^4.0.6
+  agora_rtc_engine: ^6.2.0
   cupertino_icons: ^1.0.2
-  permission_handler: ^6.0.1
+  permission_handler: ^10.1.0
 
 dev_dependencies:
   integration_test:
@@ -19,6 +19,7 @@ dev_dependencies:
     sdk: flutter
   flutter_driver:
     sdk: flutter
+
 flutter:
   uses-material-design: true
   assets:

+ 9 - 0
windows/flutter/generated_plugin_registrant.cc

@@ -6,6 +6,15 @@
 
 #include "generated_plugin_registrant.h"
 
+#include <agora_rtc_engine/agora_rtc_engine_plugin.h>
+#include <iris_method_channel/iris_method_channel_plugin_c_api.h>
+#include <permission_handler_windows/permission_handler_windows_plugin.h>
 
 void RegisterPlugins(flutter::PluginRegistry* registry) {
+  AgoraRtcEnginePluginRegisterWithRegistrar(
+      registry->GetRegistrarForPlugin("AgoraRtcEnginePlugin"));
+  IrisMethodChannelPluginCApiRegisterWithRegistrar(
+      registry->GetRegistrarForPlugin("IrisMethodChannelPluginCApi"));
+  PermissionHandlerWindowsPluginRegisterWithRegistrar(
+      registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
 }

+ 11 - 0
windows/flutter/generated_plugins.cmake

@@ -3,6 +3,12 @@
 #
 
 list(APPEND FLUTTER_PLUGIN_LIST
+  agora_rtc_engine
+  iris_method_channel
+  permission_handler_windows
+)
+
+list(APPEND FLUTTER_FFI_PLUGIN_LIST
 )
 
 set(PLUGIN_BUNDLED_LIBRARIES)
@@ -13,3 +19,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST})
   list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
   list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
 endforeach(plugin)
+
+foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
+  add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
+  list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
+endforeach(ffi_plugin)