diff --git a/android/app/build.gradle b/android/app/build.gradle index 91bce0d..20a1b17 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -35,6 +35,7 @@ android { ndkVersion flutter.ndkVersion compileOptions { + // Sets Java compatibility to Java 8 sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 // Flag to enable support for the new language APIs @@ -81,4 +82,8 @@ flutter { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + // flutter_local_notifications: solve the problem that enabling desugaring + // may result in a Flutter app crashing on Android 12L and above + implementation 'androidx.window:window:1.0.0' + implementation 'androidx.window:window-java:1.0.0' } diff --git a/android/build.gradle b/android/build.gradle index 0940389..b2914a6 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -6,14 +6,10 @@ buildscript { } dependencies { - // classpath 'com.android.tools.build:gradle:7.3.0' + classpath 'com.android.tools.build:gradle:7.3.0' // flutter_local_notifications - classpath 'com.android.tools.build:gradle:4.2.2' + // classpath 'com.android.tools.build:gradle:4.2.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - // flutter_local_notifications: solve the problem that enabling desugaring - // may result in a Flutter app crashing on Android 12L and above - implementation 'androidx.window:window:1.0.0' - implementation 'androidx.window:window-java:1.0.0' } } diff --git a/lib/notification_api.dart b/lib/notification_api.dart index ac1f96f..82aeb7a 100644 --- a/lib/notification_api.dart +++ b/lib/notification_api.dart @@ -3,7 +3,7 @@ import 'dart:async'; import 'package:flutter/services.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; -/// Requesting permissions on Android13 or higher +/// Requesting permissions final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin(); diff --git a/lib/screens/common_widgets.dart b/lib/screens/signin_signup/components/common_widgets.dart similarity index 100% rename from lib/screens/common_widgets.dart rename to lib/screens/signin_signup/components/common_widgets.dart diff --git a/lib/screens/signin_signup/components/email_signin.dart b/lib/screens/signin_signup/components/email_signin.dart index f77973c..d30efc1 100644 --- a/lib/screens/signin_signup/components/email_signin.dart +++ b/lib/screens/signin_signup/components/email_signin.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:cherry_toast/cherry_toast.dart'; -import '../../common_widgets.dart'; +import 'common_widgets.dart'; import 'package:together_mobile/common/constants.dart'; import 'package:together_mobile/request/signin_signup.dart'; diff --git a/lib/screens/signin_signup/components/email_signup.dart b/lib/screens/signin_signup/components/email_signup.dart deleted file mode 100644 index 72bd970..0000000 --- a/lib/screens/signin_signup/components/email_signup.dart +++ /dev/null @@ -1,144 +0,0 @@ -import 'package:flutter/material.dart'; - -import 'package:cherry_toast/cherry_toast.dart'; - -import '../../common_widgets.dart'; -import 'package:together_mobile/common/constants.dart'; -import 'package:together_mobile/request/signin_signup.dart'; - -class EmailSignupBody extends StatefulWidget { - const EmailSignupBody({super.key}); - - @override - State createState() => _EmailSignupBodyState(); -} - -class _EmailSignupBodyState extends State { - bool _isProgressShow = false; - bool _isHttpSend = false; - - final TextEditingController emailController = TextEditingController(); - final TextEditingController codeController = TextEditingController(); - - final Map _isError = { - 'email': false, - 'code': false, - }; - - void _isInputError(String type, bool error) { - setState(() { - _isError[type] = error; - }); - } - - @override - Widget build(BuildContext context) { - return Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Stack( - alignment: Alignment.center, - children: [ - const SizedBox( - width: double.infinity, - height: 100, - ), - if (_isProgressShow) - const CircularProgressIndicator( - color: kSecondaryColor, - strokeWidth: 6.0, - ), - ], - ), - SizedBox( - width: 250, - child: SignTextField( - controller: emailController, - color: kSecondaryColor, - type: 'email', - labelText: '邮箱', - isError: _isInputError, - ), - ), - const SizedBox( - width: double.infinity, - height: kDefaultPadding, - ), - SizedBox( - width: 250, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SizedBox( - width: 120, - child: SignTextField( - controller: codeController, - color: kSecondaryColor, - type: 'code', - labelText: '验证码', - isError: _isInputError, - ), - ), - TextButton( - onPressed: () {}, - style: TextButton.styleFrom( - foregroundColor: kSecondaryColor, - // tapTargetSize: MaterialTapTargetSize.shrinkWrap, - ), - child: const Text( - '获取验证码', - style: TextStyle(color: kSecondaryColor, fontSize: 15.0), - )), - ], - ), - ), - const SizedBox( - width: double.infinity, - height: kDefaultPadding, - ), - elevatedButton( - onPressed: confirm, - text: '确定', - color: kSecondaryColor, - ), - ], - ); - } - - void confirm() async { - if (_isError['email']! || _isError['code']!) { - CherryToast.error( - title: const Text('邮箱或验证码不符合规范'), - toastDuration: const Duration(seconds: 2), - animationDuration: const Duration(seconds: 1), - ).show(context); - return; - } - - setState(() { - if (!_isProgressShow) _isProgressShow = true; - }); - - Map? result; - - if (_isProgressShow && !_isHttpSend) { - _isHttpSend = true; - result = await signup(); - } - - setState(() { - if (result!['code'] == 10000) { - _isHttpSend = false; - _isProgressShow = false; - } - }); - } - - @override - void dispose() { - emailController.dispose(); - codeController.dispose(); - super.dispose(); - } -} diff --git a/lib/screens/signin_signup/components/username_signup.dart b/lib/screens/signin_signup/components/signup.dart similarity index 62% rename from lib/screens/signin_signup/components/username_signup.dart rename to lib/screens/signin_signup/components/signup.dart index 8e5b134..5682d3d 100644 --- a/lib/screens/signin_signup/components/username_signup.dart +++ b/lib/screens/signin_signup/components/signup.dart @@ -2,24 +2,25 @@ import 'package:flutter/material.dart'; import 'package:cherry_toast/cherry_toast.dart'; -import '../../common_widgets.dart'; +import 'common_widgets.dart'; import 'package:together_mobile/common/constants.dart'; import 'package:together_mobile/request/signin_signup.dart'; -class UsernameSignupBody extends StatefulWidget { - const UsernameSignupBody({super.key}); +class SignupBody extends StatefulWidget { + const SignupBody({super.key}); @override - State createState() => _UsernameSignupBodyState(); + State createState() => _SignupBodyState(); } -class _UsernameSignupBodyState extends State { +class _SignupBodyState extends State { bool _isProgressShow = false; bool _isHttpSend = false; final TextEditingController usernameController = TextEditingController(); - final TextEditingController password1Controller = TextEditingController(); - final TextEditingController password2Controller = TextEditingController(); + final TextEditingController passwordController = TextEditingController(); + final TextEditingController phoneEmailController = TextEditingController(); + final TextEditingController codeController = TextEditingController(); final Map _isError = { 'username': false, @@ -37,13 +38,13 @@ class _UsernameSignupBodyState extends State { Widget build(BuildContext context) { return Column( crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ Stack( alignment: Alignment.center, children: [ const SizedBox( width: double.infinity, - height: 100, ), if (_isProgressShow) const CircularProgressIndicator( @@ -62,10 +63,6 @@ class _UsernameSignupBodyState extends State { isError: _isInputError, ), ), - const SizedBox( - width: double.infinity, - height: kDefaultPadding, - ), SizedBox( width: 250, child: SignTextField( @@ -73,28 +70,49 @@ class _UsernameSignupBodyState extends State { obscureText: true, labelText: '密码', type: 'password1', - controller: password1Controller, + controller: passwordController, isError: _isInputError, ), ), - const SizedBox( - width: double.infinity, - height: kDefaultPadding, - ), SizedBox( width: 250, child: SignTextField( + controller: phoneEmailController, color: kSecondaryColor, - obscureText: true, - labelText: '确认密码', - type: 'password2', - controller: password2Controller, + type: 'email', + labelText: '邮箱', isError: _isInputError, ), ), - const SizedBox( - height: kDefaultPadding, - width: double.infinity, + SizedBox( + width: 250, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + width: 120, + child: SignTextField( + controller: codeController, + color: kSecondaryColor, + type: 'code', + labelText: '验证码', + isError: _isInputError, + ), + ), + TextButton( + onPressed: () {}, + style: TextButton.styleFrom( + foregroundColor: kSecondaryColor, + // tapTargetSize: MaterialTapTargetSize.shrinkWrap, + ), + child: const Text( + '获取验证码', + style: TextStyle(color: kSecondaryColor, fontSize: 15.0), + ), + ), + ], + ), ), elevatedButton( onPressed: () { @@ -119,15 +137,6 @@ class _UsernameSignupBodyState extends State { return; } - if (password1Controller.text != password2Controller.text) { - CherryToast.error( - title: const Text('密码不一致'), - toastDuration: const Duration(seconds: 2), - animationDuration: const Duration(seconds: 1), - ).show(context); - return; - } - setState(() { if (!_isProgressShow) _isProgressShow = true; }); @@ -149,8 +158,7 @@ class _UsernameSignupBodyState extends State { @override void dispose() { usernameController.dispose(); - password1Controller.dispose(); - password2Controller.dispose(); + passwordController.dispose(); super.dispose(); } } diff --git a/lib/screens/signin_signup/components/username_signin.dart b/lib/screens/signin_signup/components/username_signin.dart index 359fb48..fc7df9a 100644 --- a/lib/screens/signin_signup/components/username_signin.dart +++ b/lib/screens/signin_signup/components/username_signin.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:cherry_toast/cherry_toast.dart'; import 'package:go_router/go_router.dart'; -import '../../common_widgets.dart'; +import 'common_widgets.dart'; import 'package:together_mobile/common/constants.dart'; import 'package:together_mobile/request/signin_signup.dart'; diff --git a/lib/screens/signin_signup/signup_screen.dart b/lib/screens/signin_signup/signup_screen.dart index ac691b6..7453978 100644 --- a/lib/screens/signin_signup/signup_screen.dart +++ b/lib/screens/signin_signup/signup_screen.dart @@ -2,8 +2,7 @@ import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; import 'package:together_mobile/common/constants.dart'; -import 'package:together_mobile/screens/signin_signup/components/email_signup.dart'; -import 'components/username_signup.dart'; +import 'components/signup.dart'; class SignupScreen extends StatefulWidget { const SignupScreen({super.key}); @@ -13,13 +12,13 @@ class SignupScreen extends StatefulWidget { } class _SignupScreenState extends State { - String _method = 'username'; + String _method = 'email'; void chageSigninMethod() { - if (_method == 'username') { + if (_method == 'email') { _method = 'email'; } else { - _method = 'username'; + _method = 'phone'; } } @@ -31,27 +30,11 @@ class _SignupScreenState extends State { icon: const Icon(Icons.arrow_back), onPressed: () => context.pop(), ), - title: _method == 'username' ? const Text('用户名注册') : const Text('邮箱注册'), + title: const Text('账号注册'), centerTitle: true, - actions: [ - TextButton( - onPressed: () { - setState(() { - chageSigninMethod(); - }); - }, - style: TextButton.styleFrom(foregroundColor: kContentColorDark), - child: Text( - _method == 'username' ? '邮箱注册' : '用户名注册', - style: const TextStyle(color: kContentColorDark), - ), - ), - ], backgroundColor: kSecondaryColor, ), - body: _method == 'username' - ? const UsernameSignupBody() - : const EmailSignupBody(), + body: const SignupBody(), ); } } diff --git a/lib/screens/welcome/welcome_screen.dart b/lib/screens/welcome/welcome_screen.dart index f4615b6..9463746 100644 --- a/lib/screens/welcome/welcome_screen.dart +++ b/lib/screens/welcome/welcome_screen.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; import 'package:together_mobile/common/constants.dart'; -import 'package:together_mobile/screens/common_widgets.dart' +import 'package:together_mobile/screens/signin_signup/components/common_widgets.dart' show elevatedButton; class WelcomeScreen extends StatelessWidget { diff --git a/lib/use_notification.dart b/lib/use_notification.dart index 014d7a7..b45116b 100644 --- a/lib/use_notification.dart +++ b/lib/use_notification.dart @@ -1,269 +1,985 @@ -import 'dart:io'; +// import 'dart:ffi'; +// import 'dart:io'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_timezone/flutter_timezone.dart'; -import 'package:flutter_local_notifications/flutter_local_notifications.dart'; -import 'package:timezone/timezone.dart' as tz; -import 'package:timezone/data/latest_all.dart' as tz; -import 'package:together_mobile/notification_api.dart'; +// import 'package:flutter/cupertino.dart'; +// import 'package:flutter/foundation.dart'; +// import 'package:flutter/material.dart'; +// import 'package:flutter_timezone/flutter_timezone.dart'; +// import 'package:flutter_local_notifications/flutter_local_notifications.dart'; +// import 'package:timezone/timezone.dart' as tz; +// import 'package:timezone/data/latest_all.dart' as tz; +// import 'package:together_mobile/notification_api.dart'; -Future main() async { - // needed if you intend to initialize in `main` function - WidgetsFlutterBinding.ensureInitialized(); +// int id = 0; - final NotificationAppLaunchDetails? notificationAppLaunchDetails = !kIsWeb && - Platform.isLinux - ? null - : await flutterLocalNotificationsPlugin.getNotificationAppLaunchDetails(); +// /// A notification action which triggers a url launch event +// const String urlLaunchActionId = 'id_1'; - const AndroidInitializationSettings initializationSettingsAndroid = - AndroidInitializationSettings('app_icon'); +// /// A notification action which triggers a App navigation event +// const String navigationActionId = 'id_3'; - final List darwinNotificationCategories = [ - DarwinNotificationCategory( - darwinNotificationCategoryText, - actions: [ - DarwinNotificationAction.text( - 'text_1', - 'Action 1', - buttonTitle: 'Send', - placeholder: 'Placeholder', - ), - ], - ), - DarwinNotificationCategory( - darwinNotificationCategoryPlain, - actions: [ - DarwinNotificationAction.plain('id_1', 'Action 1'), - DarwinNotificationAction.plain( - 'id_2', - 'Action 2 (destructive)', - options: { - DarwinNotificationActionOption.destructive, - }, - ), - DarwinNotificationAction.plain( - navigationActionId, - 'Action 3 (foreground)', - options: { - DarwinNotificationActionOption.foreground, - }, - ), - DarwinNotificationAction.plain( - 'id_4', - 'Action 4 (auth required)', - options: { - DarwinNotificationActionOption.authenticationRequired, - }, - ), - ], - options: { - DarwinNotificationCategoryOption.hiddenPreviewShowTitle, - }, - ), - ]; +// Future main() async { +// // needed if you intend to initialize in `main` function +// WidgetsFlutterBinding.ensureInitialized(); - final DarwinInitializationSettings initializationSettingsDarwin = - DarwinInitializationSettings( - requestAlertPermission: false, - requestBadgePermission: false, - requestSoundPermission: false, - onDidReceiveLocalNotification: (id, title, body, payload) async { - didReceiveLocalNotificationStream.add( - ReceivedNotification( - id: id, - title: title, - body: body, - payload: payload, - ), - ); - }, - notificationCategories: darwinNotificationCategories, - ); +// final NotificationAppLaunchDetails? notificationAppLaunchDetails = !kIsWeb && +// Platform.isLinux +// ? null +// : await flutterLocalNotificationsPlugin.getNotificationAppLaunchDetails(); - final LinuxInitializationSettings initializationSettingsLinux = - LinuxInitializationSettings( - defaultActionName: 'Open notification', - defaultIcon: AssetsLinuxIcon('icons/app_icon.png'), - ); +// // initialize android setting +// const AndroidInitializationSettings initializationSettingsAndroid = +// AndroidInitializationSettings('app_icon'); - final InitializationSettings initializationSettings = InitializationSettings( - android: initializationSettingsAndroid, - iOS: initializationSettingsDarwin, - macOS: initializationSettingsDarwin, - linux: initializationSettingsLinux, - ); +// // IOS notification category +// final List darwinNotificationCategories = [ +// DarwinNotificationCategory( +// darwinNotificationCategoryText, +// actions: [ +// DarwinNotificationAction.text( +// 'text_1', +// 'Action 1', +// buttonTitle: 'Send', +// placeholder: 'Placeholder', +// ), +// ], +// ), +// DarwinNotificationCategory( +// darwinNotificationCategoryPlain, +// actions: [ +// DarwinNotificationAction.plain('id_1', 'Action 1'), +// DarwinNotificationAction.plain( +// 'id_2', +// 'Action 2 (destructive)', +// options: { +// DarwinNotificationActionOption.destructive, +// }, +// ), +// DarwinNotificationAction.plain( +// navigationActionId, +// 'Action 3 (foreground)', +// options: { +// DarwinNotificationActionOption.foreground, +// }, +// ), +// DarwinNotificationAction.plain( +// 'id_4', +// 'Action 4 (auth required)', +// options: { +// DarwinNotificationActionOption.authenticationRequired, +// }, +// ), +// ], +// options: { +// DarwinNotificationCategoryOption.hiddenPreviewShowTitle, +// }, +// ), +// ]; - await flutterLocalNotificationsPlugin.initialize( - initializationSettings, - onDidReceiveNotificationResponse: - (NotificationResponse notificationResponse) { - switch (notificationResponse.notificationResponseType) { - case NotificationResponseType.selectedNotification: - selectNotificationStream.add(notificationResponse.payload); - break; - case NotificationResponseType.selectedNotificationAction: - if (notificationResponse.actionId == navigationActionId) { - selectNotificationStream.add(notificationResponse.payload); - } - break; - } - }, - onDidReceiveBackgroundNotificationResponse: notificationTapBackground, - ); +// // Initialize IOS setting +// final DarwinInitializationSettings initializationSettingsDarwin = +// DarwinInitializationSettings( +// requestAlertPermission: false, +// requestBadgePermission: false, +// requestSoundPermission: false, +// onDidReceiveLocalNotification: (id, title, body, payload) async { +// didReceiveLocalNotificationStream.add( +// ReceivedNotification( +// id: id, +// title: title, +// body: body, +// payload: payload, +// ), +// ); +// }, +// notificationCategories: darwinNotificationCategories, +// ); - String initialRoute = HomePage.routeName; +// final LinuxInitializationSettings initializationSettingsLinux = +// LinuxInitializationSettings( +// defaultActionName: 'Open notification', +// defaultIcon: AssetsLinuxIcon('icons/app_icon.png'), +// ); - runApp( - MaterialApp( - initialRoute: initialRoute, - routes: { - HomePage.routeName: (_) => HomePage(notificationAppLaunchDetails), - SecondPage.routeName: (_) => SecondPage(selectedNotificationPayload), - }, - ), - ); -} +// // Initialize notification setting, +// final InitializationSettings initializationSettings = InitializationSettings( +// android: initializationSettingsAndroid, +// iOS: initializationSettingsDarwin, +// macOS: initializationSettingsDarwin, +// linux: initializationSettingsLinux, +// ); -Future _configureLocalTimeZone() async { - if (kIsWeb || Platform.isLinux) { - return; - } - tz.initializeTimeZones(); - final String timeZoneName = await FlutterTimezone.getLocalTimezone(); - tz.setLocalLocation(tz.getLocation(timeZoneName)); -} +// await flutterLocalNotificationsPlugin.initialize( +// initializationSettings, +// onDidReceiveNotificationResponse: +// (NotificationResponse notificationResponse) { +// switch (notificationResponse.notificationResponseType) { +// case NotificationResponseType.selectedNotification: +// selectNotificationStream.add(notificationResponse.payload); +// break; +// case NotificationResponseType.selectedNotificationAction: +// if (notificationResponse.actionId == navigationActionId) { +// selectNotificationStream.add(notificationResponse.payload); +// } +// break; +// } +// }, +// onDidReceiveBackgroundNotificationResponse: notificationTapBackground, +// ); -class PaddedElevatedButton extends StatelessWidget { - const PaddedElevatedButton({ - required this.buttonText, - required this.onPressed, - Key? key, - }) : super(key: key); +// String initialRoute = HomePage.routeName; - final String buttonText; - final VoidCallback onPressed; +// runApp( +// MaterialApp( +// initialRoute: initialRoute, +// routes: { +// HomePage.routeName: (_) => HomePage(notificationAppLaunchDetails), +// SecondPage.routeName: (_) => SecondPage(selectedNotificationPayload), +// }, +// ), +// ); +// } - @override - Widget build(BuildContext context) => Padding( - padding: const EdgeInsets.fromLTRB(0, 0, 0, 8), - child: ElevatedButton( - onPressed: onPressed, - child: Text(buttonText), - ), - ); -} +// Future _configureLocalTimeZone() async { +// if (kIsWeb || Platform.isLinux) { +// return; +// } +// tz.initializeTimeZones(); +// final String timeZoneName = await FlutterTimezone.getLocalTimezone(); +// tz.setLocalLocation(tz.getLocation(timeZoneName)); +// } -class HomePage extends StatefulWidget { - const HomePage(this.notificationAppLaunchDetails, {Key? key}) - : super(key: key); +// class PaddedElevatedButton extends StatelessWidget { +// const PaddedElevatedButton({ +// required this.buttonText, +// required this.onPressed, +// Key? key, +// }) : super(key: key); - static String routeName = '/'; +// final String buttonText; +// final VoidCallback onPressed; - final NotificationAppLaunchDetails? notificationAppLaunchDetails; +// @override +// Widget build(BuildContext context) => Padding( +// padding: const EdgeInsets.fromLTRB(0, 0, 0, 8), +// child: ElevatedButton( +// onPressed: onPressed, +// child: Text(buttonText), +// ), +// ); +// } - bool get didNotificationLaunchApp => - notificationAppLaunchDetails?.didNotificationLaunchApp ?? false; +// class HomePage extends StatefulWidget { +// const HomePage(this.notificationAppLaunchDetails, {Key? key}) +// : super(key: key); - @override - State createState() => _HomePageState(); -} +// static String routeName = '/'; -class _HomePageState extends State { - bool _notificationsEnabled = false; +// final NotificationAppLaunchDetails? notificationAppLaunchDetails; - @override - void initState() { - super.initState(); - _isAndroidPermissionGranted(); - _requestPermissions(); - _configureDidReceivelocalNotificationSubject(); - _configureSelectNotificationSubject(); - } +// bool get didNotificationLaunchApp => +// notificationAppLaunchDetails?.didNotificationLaunchApp ?? false; - Future _isAndroidPermissionGranted() async { - if (Platform.isAndroid) { - final bool granted = await flutterLocalNotificationsPlugin - .resolvePlatformSpecificImplementation< - AndroidFlutterLocalNotificationsPlugin>() - ?.areNotificationsEnabled() ?? - false; +// @override +// State createState() => _HomePageState(); +// } - setState(() { - _notificationsEnabled = granted; - }); - } - } +// class _HomePageState extends State { +// bool _notificationsEnabled = false; - Future _requestPermissions() async { - if (Platform.isIOS || Platform.isMacOS) { - await flutterLocalNotificationsPlugin - .resolvePlatformSpecificImplementation< - IOSFlutterLocalNotificationsPlugin>() - ?.requestPermissions( - alert: true, - badge: true, - sound: true, - ); +// @override +// void initState() { +// super.initState(); +// _isAndroidPermissionGranted(); +// _requestPermissions(); +// _configureDidReceiveLocalNotificationSubject(); +// _configureSelectNotificationSubject(); +// } - await flutterLocalNotificationsPlugin - .resolvePlatformSpecificImplementation< - MacOSFlutterLocalNotificationsPlugin>() - ?.requestPermissions( - alert: true, - badge: true, - sound: true, - ); - } else if (Platform.isAndroid) { - final AndroidFlutterLocalNotificationsPlugin? androidImplementation = - flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation< - AndroidFlutterLocalNotificationsPlugin>(); +// Future _isAndroidPermissionGranted() async { +// if (Platform.isAndroid) { +// final bool granted = await flutterLocalNotificationsPlugin +// .resolvePlatformSpecificImplementation< +// AndroidFlutterLocalNotificationsPlugin>() +// ?.areNotificationsEnabled() ?? +// false; - final bool? granted = await androidImplementation?.requestPermission(); +// setState(() { +// _notificationsEnabled = granted; +// }); +// } +// } - setState(() { - _notificationsEnabled = granted ?? false; - }); - } - } +// Future _requestPermissions() async { +// if (Platform.isIOS || Platform.isMacOS) { +// await flutterLocalNotificationsPlugin +// .resolvePlatformSpecificImplementation< +// IOSFlutterLocalNotificationsPlugin>() +// ?.requestPermissions( +// alert: true, +// badge: true, +// sound: true, +// ); - void _configureDidReceiveLocalNotificationSubject() { - didReceiveLocalNotificationStream.stream - .listen((ReceivedNotification receivedNotification) async { - await showDialog( - context: context, - builder: (BuildContext context) => CupertinoAlertDialog( - title: receivedNotification.title != null - ? Text(receivedNotification.title!) - : null, - content: receivedNotification.body != null - ? Text(receivedNotification.body!) - : null, - actions: [ - CupertinoDialogAction( - isDefaultAction: true, - onPressed: () async { - Navigator.of(context, rootNavigator: true).pop(); - await Navigator.of(context).push( - MaterialPageRoute( - builder: (BuildContext context) => - SecondPage(receivedNotification.payload), - ), - ); - }, - child: const Text('Ok'), - ) - ], - ), - ); - }); - } +// await flutterLocalNotificationsPlugin +// .resolvePlatformSpecificImplementation< +// MacOSFlutterLocalNotificationsPlugin>() +// ?.requestPermissions( +// alert: true, +// badge: true, +// sound: true, +// ); +// } else if (Platform.isAndroid) { +// final AndroidFlutterLocalNotificationsPlugin? androidImplementation = +// flutterLocalNotificationsPlugin.resolvePlatformSpecificImplementation< +// AndroidFlutterLocalNotificationsPlugin>(); +// final bool? granted = await androidImplementation?.requestPermission(); - @override - Widget build(BuildContext context) { - return const Placeholder(); - } -} +// setState(() { +// _notificationsEnabled = granted ?? false; +// }); +// } +// } + +// // configure the action when a notification is tapped +// void _configureDidReceiveLocalNotificationSubject() { +// didReceiveLocalNotificationStream.stream +// .listen((ReceivedNotification receivedNotification) async { +// await showDialog( +// context: context, +// builder: (BuildContext context) => CupertinoAlertDialog( +// title: receivedNotification.title != null +// ? Text(receivedNotification.title!) +// : null, +// content: receivedNotification.body != null +// ? Text(receivedNotification.body!) +// : null, +// actions: [ +// CupertinoDialogAction( +// isDefaultAction: true, +// onPressed: () async { +// Navigator.of(context, rootNavigator: true).pop(); +// await Navigator.of(context).push( +// MaterialPageRoute( +// builder: (BuildContext context) => +// SecondPage(receivedNotification.payload), +// ), +// ); +// }, +// child: const Text('Ok'), +// ) +// ], +// ), +// ); +// }); +// } + +// void _configureSelectNotificationSubject() { +// selectNotificationStream.stream.listen((String? payload) async { +// await Navigator.of(context).push(MaterialPageRoute( +// builder: (BuildContext context) => SecondPage(payload), +// )); +// }); +// } + +// @override +// Widget build(BuildContext context) { +// return Scaffold( +// appBar: AppBar( +// title: const Text('Notifications Example'), +// ), +// body: SingleChildScrollView( +// child: Padding( +// padding: EdgeInsets.all(8), +// child: Center( +// child: Column( +// children: [ +// const Padding( +// padding: EdgeInsets.zero, +// child: Text( +// 'Tap on a Notification when it appears to trigger navigation'), +// ), +// _InfoValueString( +// title: 'Did notification launch app?', +// value: widget.didNotificationLaunchApp, +// ), +// if (widget.didNotificationLaunchApp) ...[ +// const Text('Launch notification details'), +// _InfoValueString( +// title: 'Notification id', +// value: widget +// .notificationAppLaunchDetails!.notificationResponse?.id, +// ), +// _InfoValueString( +// title: 'Action id', +// value: widget.notificationAppLaunchDetails! +// .notificationResponse?.actionId, +// ), +// _InfoValueString( +// title: 'Input', +// value: widget.notificationAppLaunchDetails! +// .notificationResponse?.input, +// ), +// _InfoValueString( +// title: 'Payload:', +// value: widget.notificationAppLaunchDetails! +// .notificationResponse?.payload, +// ), +// PaddedElevatedButton( +// buttonText: 'Show plain notification with payload', +// onPressed: () async { +// await _showNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: +// 'Show plain notification that has no title with ' +// 'payload', +// onPressed: () async { +// await _showNotificationWithNoTitle(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show plain notification that has no body with ' +// 'payload', +// onPressed: () async { +// await _showNotificationWithNoBody(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show notification with custom sound', +// onPressed: () async { +// await _showNotificationCustomSound(); +// }, +// ), +// if (kIsWeb || !Platform.isLinux) ...[ +// PaddedElevatedButton( +// buttonText: +// 'Schedule notification to appear in 5 seconds ' +// 'based on local time zone', +// onPressed: () async { +// await _zonedScheduleNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: +// 'Schedule notification to appear in 5 seconds ' +// 'based on local time zone using alarm clock', +// onPressed: () async { +// await _zonedScheduleAlarmClockNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Repeat notification every minute', +// onPressed: () async { +// await _repeatNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: +// 'Schedule daily 10:00:00 am notification in your ' +// 'local time zone', +// onPressed: () async { +// await _scheduleDailyTenAMNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: +// 'Schedule daily 10:00:00 am notification in your ' +// "local time zone using last year's date", +// onPressed: () async { +// await _scheduleDailyTenAMLastYearNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: +// 'Schedule weekly 10:00:00 am notification in your ' +// 'local time zone', +// onPressed: () async { +// await _scheduleWeeklyTenAMNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: +// 'Schedule weekly Monday 10:00:00 am notification ' +// 'in your local time zone', +// onPressed: () async { +// await _scheduleWeeklyMondayTenAMNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Check pending notifications', +// onPressed: () async { +// await _checkPendingNotificationRequests(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Get active notifications', +// onPressed: () async { +// await _getActiveNotifications(); +// }, +// ), +// ], +// PaddedElevatedButton( +// buttonText: +// 'Schedule monthly Monday 10:00:00 am notification in ' +// 'your local time zone', +// onPressed: () async { +// await _scheduleMonthlyMondayTenAMNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: +// 'Schedule yearly Monday 10:00:00 am notification in ' +// 'your local time zone', +// onPressed: () async { +// await _scheduleYearlyMondayTenAMNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show notification with no sound', +// onPressed: () async { +// await _showNotificationWithNoSound(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Cancel latest notification', +// onPressed: () async { +// await _cancelNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Cancel all notifications', +// onPressed: () async { +// await _cancelAllNotifications(); +// }, +// ), +// const Divider(), +// const Text( +// 'Notifications with actions', +// style: TextStyle(fontWeight: FontWeight.bold), +// ), +// PaddedElevatedButton( +// buttonText: 'Show notification with plain actions', +// onPressed: () async { +// await _showNotificationWithActions(); +// }, +// ), +// if (!Platform.isLinux) +// PaddedElevatedButton( +// buttonText: 'Show notification with text action', +// onPressed: () async { +// await _showNotificationWithTextAction(); +// }, +// ), +// if (!Platform.isLinux) +// PaddedElevatedButton( +// buttonText: 'Show notification with text choice', +// onPressed: () async { +// await _showNotificationWithTextChoice(); +// }, +// ), +// const Divider(), +// if (Platform.isAndroid) ...[ +// const Text( +// 'Android-specific examples', +// style: TextStyle(fontWeight: FontWeight.bold), +// ), +// Text('notifications enabled: $_notificationsEnabled'), +// PaddedElevatedButton( +// buttonText: +// 'Check if notifications are enabled for this app', +// onPressed: _areNotifcationsEnabledOnAndroid, +// ), +// PaddedElevatedButton( +// buttonText: 'Request permission (API 33+)', +// onPressed: () => _requestPermissions(), +// ), +// PaddedElevatedButton( +// buttonText: +// 'Show plain notification with payload and update ' +// 'channel description', +// onPressed: () async { +// await _showNotificationUpdateChannelDescription(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show plain notification as public on every ' +// 'lockscreen', +// onPressed: () async { +// await _showPublicNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: +// 'Show notification with custom vibration pattern, ' +// 'red LED and red icon', +// onPressed: () async { +// await _showNotificationCustomVibrationIconLed(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show notification using Android Uri sound', +// onPressed: () async { +// await _showSoundUriNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: +// 'Show notification that times out after 3 seconds', +// onPressed: () async { +// await _showTimeoutNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show insistent notification', +// onPressed: () async { +// await _showInsistentNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: +// 'Show big picture notification using local images', +// onPressed: () async { +// await _showBigPictureNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: +// 'Show big picture notification using base64 String ' +// 'for images', +// onPressed: () async { +// await _showBigPictureNotificationBase64(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: +// 'Show big picture notification using URLs for ' +// 'Images', +// onPressed: () async { +// await _showBigPictureNotificationURL(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: +// 'Show big picture notification, hide large icon ' +// 'on expand', +// onPressed: () async { +// await _showBigPictureNotificationHiddenLargeIcon(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show media notification', +// onPressed: () async { +// await _showNotificationMediaStyle(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show big text notification', +// onPressed: () async { +// await _showBigTextNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show inbox notification', +// onPressed: () async { +// await _showInboxNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show messaging notification', +// onPressed: () async { +// await _showMessagingNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show grouped notifications', +// onPressed: () async { +// await _showGroupedNotifications(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show notification with tag', +// onPressed: () async { +// await _showNotificationWithTag(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Cancel notification with tag', +// onPressed: () async { +// await _cancelNotificationWithTag(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show ongoing notification', +// onPressed: () async { +// await _showOngoingNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: +// 'Show notification with no badge, alert only once', +// onPressed: () async { +// await _showNotificationWithNoBadge(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: +// 'Show progress notification - updates every second', +// onPressed: () async { +// await _showProgressNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show indeterminate progress notification', +// onPressed: () async { +// await _showIndeterminateProgressNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show notification without timestamp', +// onPressed: () async { +// await _showNotificationWithoutTimestamp(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show notification with custom timestamp', +// onPressed: () async { +// await _showNotificationWithCustomTimestamp(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show notification with custom sub-text', +// onPressed: () async { +// await _showNotificationWithCustomSubText(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show notification with chronometer', +// onPressed: () async { +// await _showNotificationWithChronometer(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show full-screen notification', +// onPressed: () async { +// await _showFullScreenNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: +// 'Show notification with number if the launcher ' +// 'supports', +// onPressed: () async { +// await _showNotificationWithNumber(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show notification with sound controlled by ' +// 'alarm volume', +// onPressed: () async { +// await _showNotificationWithAudioAttributeAlarm(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Create grouped notification channels', +// onPressed: () async { +// await _createNotificationChannelGroup(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Delete notification channel group', +// onPressed: () async { +// await _deleteNotificationChannelGroup(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Create notification channel', +// onPressed: () async { +// await _createNotificationChannel(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Delete notification channel', +// onPressed: () async { +// await _deleteNotificationChannel(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Get notification channels', +// onPressed: () async { +// await _getNotificationChannels(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Start foreground service', +// onPressed: () async { +// await _startForegroundService(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: +// 'Start foreground service with blue background ' +// 'notification', +// onPressed: () async { +// await _startForegroundServiceWithBlueBackgroundNotification(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Stop foreground service', +// onPressed: () async { +// await _stopForegroundService(); +// }, +// ), +// ], +// if (!kIsWeb && +// (Platform.isIOS || Platform.isMacOS)) ...[ +// const Text( +// 'iOS and macOS-specific examples', +// style: TextStyle(fontWeight: FontWeight.bold), +// ), +// PaddedElevatedButton( +// buttonText: 'Request permission', +// onPressed: _requestPermissions, +// ), +// PaddedElevatedButton( +// buttonText: 'Show notification with subtitle', +// onPressed: () async { +// await _showNotificationWithSubtitle(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show notification with icon badge', +// onPressed: () async { +// await _showNotificationWithIconBadge(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: +// 'Show notification with attachment (with thumbnail)', +// onPressed: () async { +// await _showNotificationWithAttachment( +// hideThumbnail: false); +// }, +// ), +// PaddedElevatedButton( +// buttonText: +// 'Show notification with attachment (no thumbnail)', +// onPressed: () async { +// await _showNotificationWithAttachment( +// hideThumbnail: true); +// }, +// ), +// PaddedElevatedButton( +// buttonText: +// 'Show notification with attachment (clipped thumbnail)', +// onPressed: () async { +// await _showNotificationWithClippedThumbnailAttachment(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show notifications with thread identifier', +// onPressed: () async { +// await _showNotificationsWithThreadIdentifier(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: +// 'Show notification with time sensitive interruption ' +// 'level', +// onPressed: () async { +// await _showNotificationWithTimeSensitiveInterruptionLevel(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: 'Show notification with banner but not in ' +// 'notification centre', +// onPressed: () async { +// await _showNotificationWithBannerNotInNotificationCentre(); +// }, +// ), +// PaddedElevatedButton( +// buttonText: +// 'Show notification in notification centre only', +// onPressed: () async { +// await _showNotificationInNotificationCentreOnly(); +// }, +// ), +// ], +// ], +// ], +// ), +// ), +// ), +// ), +// ); +// } + +// // show single plain notification +// Future _showNotification() async { +// const AndroidNotificationDetails androidNotificationDetails = +// AndroidNotificationDetails( +// 'your channel id', +// 'your channel name', +// channelDescription: 'your channel description', +// importance: Importance.max, +// priority: Priority.high, +// ticker: 'ticker', +// ); + +// const NotificationDetails notificationDetails = +// NotificationDetails(android: androidNotificationDetails); + +// await flutterLocalNotificationsPlugin.show( +// id++, 'plain title', 'plain body', notificationDetails, +// payload: 'item x'); +// } + +// // show notification with plain actions +// Future _showNotificationWithActions() async { +// const AndroidNotificationDetails androidNotificationDetails = +// AndroidNotificationDetails( +// 'your channel id', +// 'your channel name', +// channelDescription: 'your channel description', +// importance: Importance.max, +// priority: Priority.high, +// ticker: 'ticker', +// actions: [ +// AndroidNotificationAction( +// urlLaunchActionId, +// 'Action 1', +// icon: DrawableResourceAndroidBitmap('food'), +// contextual: true, +// ), +// AndroidNotificationAction( +// 'id_2', +// 'Action 2', +// titleColor: Color.fromARGB(255, 255, 0, 0), +// icon: DrawableResourceAndroidBitmap('secondary_icon'), +// ), +// AndroidNotificationAction( +// navigationActionId, +// 'Action 3', +// icon: DrawableResourceAndroidBitmap('secondary_icon'), +// showsUserInterface: true, +// // By default, Android plugin will dismiss the notification when the +// // user tapped on a action (this mimics the behavior on iOS). +// cancelNotification: false, +// ), +// ], +// ); + +// const DarwinNotificationDetails iosNotificationDetails = +// DarwinNotificationDetails( +// categoryIdentifier: darwinNotificationCategoryPlain, +// ); + +// const DarwinNotificationDetails macOSNotificationDetails = +// DarwinNotificationDetails( +// categoryIdentifier: darwinNotificationCategoryPlain, +// ); + +// const LinuxNotificationDetails linuxNotificationDetails = +// LinuxNotificationDetails( +// actions: [ +// LinuxNotificationAction( +// key: urlLaunchActionId, +// label: 'Action 1', +// ), +// LinuxNotificationAction( +// key: navigationActionId, +// label: 'Action 2', +// ), +// ], +// ); + +// const NotificationDetails notificationDetails = NotificationDetails( +// android: androidNotificationDetails, +// iOS: iosNotificationDetails, +// macOS: macOSNotificationDetails, +// linux: linuxNotificationDetails, +// ); + +// await flutterLocalNotificationsPlugin.show( +// id++, +// 'plain title', +// 'plain body', +// notificationDetails, +// payload: 'item z', +// ); +// } + +// // show notification with text input action +// Future _showNotificationWithTextAction() async { +// const AndroidNotificationDetails androidNotificationDetails = +// AndroidNotificationDetails( +// 'your channel id', +// 'your channel name', +// channelDescription: 'your channel description', +// importance: Importance.max, +// priority: Priority.high, +// ticker: 'ticker', +// actions: [ +// AndroidNotificationAction( +// 'text_id_1', +// 'Enter Text', +// icon: DrawableResourceAndroidBitmap('food'), +// inputs: [ +// AndroidNotificationActionInput(label: 'Enter a Message'), +// ], +// ), +// ], +// ); + +// const NotificationDetails notificationDetails = +// NotificationDetails(android: androidNotificationDetails); + +// await flutterLocalNotificationsPlugin.show( +// id++, +// 'Text Input Notification', +// 'Expand to see Input action', +// notificationDetails, +// payload: 'item x', +// ); +// } + +// @override +// void dispose() { +// didReceiveLocalNotificationStream.close(); +// selectNotificationStream.close(); +// super.dispose(); +// } +// } + +// class _InfoValueString extends StatelessWidget { +// const _InfoValueString({ +// required this.title, +// required this.value, +// Key? key, +// }) : super(key: key); + +// final String title; +// final Object? value; + +// @override +// Widget build(BuildContext context) => Padding( +// padding: const EdgeInsets.fromLTRB(0, 0, 0, 8), +// child: Text.rich( +// TextSpan( +// children: [ +// TextSpan( +// text: '$title ', +// style: const TextStyle( +// fontWeight: FontWeight.bold, +// ), +// ), +// TextSpan( +// text: '$value', +// ) +// ], +// ), +// ), +// ); +// } diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index e71a16d..64a0ece 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -6,6 +6,10 @@ #include "generated_plugin_registrant.h" +#include void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) file_selector_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin"); + file_selector_plugin_register_with_registrar(file_selector_linux_registrar); } diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 2e1de87..2db3c22 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + file_selector_linux ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 90b1d29..405d3a6 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,11 +5,13 @@ import FlutterMacOS import Foundation +import file_selector_macos import flutter_local_notifications import flutter_timezone import path_provider_foundation func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin")) FlutterTimezonePlugin.register(with: registry.registrar(forPlugin: "FlutterTimezonePlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) diff --git a/pubspec.lock b/pubspec.lock index 90d2aa0..a7660d2 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -6,7 +6,7 @@ packages: description: name: args sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "2.4.2" async: @@ -14,7 +14,7 @@ packages: description: name: async sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "2.11.0" badges: @@ -22,7 +22,7 @@ packages: description: name: badges sha256: "6e7f3ec561ec08f47f912cfe349d4a1707afdc8dda271e17b046aa6d42c89e77" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "3.1.1" boolean_selector: @@ -30,7 +30,7 @@ packages: description: name: boolean_selector sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.1" characters: @@ -38,7 +38,7 @@ packages: description: name: characters sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "1.3.0" cherry_toast: @@ -46,7 +46,7 @@ packages: description: name: cherry_toast sha256: a52fe28040cc80490ebaf1dfebaf17f8c7debb4fe5bf6e84d2a57b04b9c04569 - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "1.2.1" clock: @@ -54,7 +54,7 @@ packages: description: name: clock sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "1.1.1" collection: @@ -62,7 +62,7 @@ packages: description: name: collection sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "1.17.1" cross_file: @@ -70,7 +70,7 @@ packages: description: name: cross_file sha256: "0b0036e8cccbfbe0555fd83c1d31a6f30b77a96b598b35a5d36dd41f718695e9" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "0.3.3+4" crypto: @@ -78,23 +78,23 @@ packages: description: name: crypto sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "3.0.3" csslib: dependency: transitive description: name: csslib - sha256: "831883fb353c8bdc1d71979e5b342c7d88acfbc643113c14ae51e2442ea0f20f" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" + url: "https://pub.flutter-io.cn" source: hosted - version: "0.17.3" + version: "1.0.0" dbus: dependency: transitive description: name: dbus sha256: "6f07cba3f7b3448d42d015bfd3d53fe12e5b36da2423f23838efc1d5fb31a263" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "0.7.8" fake_async: @@ -102,7 +102,7 @@ packages: description: name: fake_async sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "1.3.1" ffi: @@ -110,7 +110,7 @@ packages: description: name: ffi sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.2" file: @@ -118,9 +118,41 @@ packages: description: name: file sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "6.1.4" + file_selector_linux: + dependency: transitive + description: + name: file_selector_linux + sha256: d17c5e450192cdc40b718804dfb4eaf79a71bed60ee9530703900879ba50baa3 + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.9.1+3" + file_selector_macos: + dependency: transitive + description: + name: file_selector_macos + sha256: "6290eec24fc4cc62535fe609e0c6714d3c1306191dc8c3b0319eaecc09423a3a" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.9.2" + file_selector_platform_interface: + dependency: transitive + description: + name: file_selector_platform_interface + sha256: "412705a646a0ae90f33f37acfae6a0f7cbc02222d6cd34e479421c3e74d3853c" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.6.0" + file_selector_windows: + dependency: transitive + description: + name: file_selector_windows + sha256: ef246380b66d1fb9089fc65622c387bf3780bca79f533424c31d07f12c2c7fd8 + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.9.2" flutter: dependency: "direct main" description: flutter @@ -131,7 +163,7 @@ packages: description: name: flutter_lints sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.1" flutter_local_notifications: @@ -139,7 +171,7 @@ packages: description: name: flutter_local_notifications sha256: "812791d43ccfc1b443a0d39fa02a206fc228c597e28ff9337e09e3ca8d370391" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "14.1.1" flutter_local_notifications_linux: @@ -147,7 +179,7 @@ packages: description: name: flutter_local_notifications_linux sha256: "33f741ef47b5f63cc7f78fe75eeeac7e19f171ff3c3df054d84c1e38bedb6a03" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "4.0.0+1" flutter_local_notifications_platform_interface: @@ -155,7 +187,7 @@ packages: description: name: flutter_local_notifications_platform_interface sha256: "7cf643d6d5022f3baed0be777b0662cce5919c0a7b86e700299f22dc4ae660ef" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "7.0.0+1" flutter_plugin_android_lifecycle: @@ -163,7 +195,7 @@ packages: description: name: flutter_plugin_android_lifecycle sha256: "950e77c2bbe1692bc0874fc7fb491b96a4dc340457f4ea1641443d0a6c1ea360" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.15" flutter_slidable: @@ -171,7 +203,7 @@ packages: description: name: flutter_slidable sha256: cc4231579e3eae41ae166660df717f4bad1359c87f4a4322ad8ba1befeb3d2be - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "3.0.0" flutter_test: @@ -184,7 +216,7 @@ packages: description: name: flutter_timezone sha256: "9b179c76cbded894e3208b420d0c4286f6c9ab7178c063eba8bc4266a3ee1a3c" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.6" flutter_web_plugins: @@ -197,7 +229,7 @@ packages: description: name: go_router sha256: "00d1b67d6e9fa443331da229084dd3eb04407f5a2dff22940bd7bba6af5722c3" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "7.1.1" google_fonts: @@ -205,23 +237,23 @@ packages: description: name: google_fonts sha256: "6b6f10f0ce3c42f6552d1c70d2c28d764cf22bb487f50f66cca31dcd5194f4d6" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "4.0.4" html: dependency: transitive description: name: html - sha256: "58e3491f7bf0b6a4ea5110c0c688877460d1a6366731155c4a4580e7ded773e8" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" + url: "https://pub.flutter-io.cn" source: hosted - version: "0.15.3" + version: "0.15.4" http: dependency: "direct main" description: name: http sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "0.13.6" http_parser: @@ -229,55 +261,79 @@ packages: description: name: http_parser sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "4.0.2" image_picker: dependency: "direct main" description: name: image_picker - sha256: "9978d3510af4e6a902e545ce19229b926e6de6a1828d6134d3aab2e129a4d270" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + sha256: b6951e25b795d053a6ba03af5f710069c99349de9341af95155d52665cb4607c + url: "https://pub.flutter-io.cn" source: hosted - version: "0.8.7+5" + version: "0.8.9" image_picker_android: dependency: transitive description: name: image_picker_android - sha256: "3083c3a3245adf9f3eb7bacf0eaa6a1f087dd538fab73a13a2f7907602601692" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + sha256: d2bab152deb2547ea6f53d82ebca9b7e77386bb706e5789e815d37e08ea475bb + url: "https://pub.flutter-io.cn" source: hosted - version: "0.8.6+19" + version: "0.8.7+3" image_picker_for_web: dependency: transitive description: name: image_picker_for_web - sha256: "98f50d6b9f294c8ba35e25cc0d13b04bfddd25dbc8d32fa9d566a6572f2c081c" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + sha256: "869fe8a64771b7afbc99fc433a5f7be2fea4d1cb3d7c11a48b6b579eb9c797f0" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.12" + version: "2.2.0" image_picker_ios: dependency: transitive description: name: image_picker_ios - sha256: d779210bda268a03b57e923fb1e410f32f5c5e708ad256348bcbf1f44f558fd0 - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + sha256: b3e2f21feb28b24dd73a35d7ad6e83f568337c70afab5eabac876e23803f264b + url: "https://pub.flutter-io.cn" source: hosted - version: "0.8.7+4" + version: "0.8.8" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "02cbc21fe1706b97942b575966e5fbbeaac535e76deef70d3a242e4afb857831" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.2.1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: cee2aa86c56780c13af2c77b5f2f72973464db204569e1ba2dd744459a065af4 + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.2.1" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface - sha256: "1991219d9dbc42a99aff77e663af8ca51ced592cd6685c9485e3458302d3d4f8" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + sha256: "7c7b96bb9413a9c28229e717e6fd1e3edd1cc5569c1778fcca060ecf729b65ee" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.6.3" + version: "2.8.0" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: c3066601ea42113922232c7b7b3330a2d86f029f685bba99d82c30e799914952 + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.2.1" js: dependency: transitive description: name: js sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "0.6.7" lints: @@ -285,7 +341,7 @@ packages: description: name: lints sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.1" logging: @@ -293,7 +349,7 @@ packages: description: name: logging sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "1.2.0" matcher: @@ -301,7 +357,7 @@ packages: description: name: matcher sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "0.12.15" material_color_utilities: @@ -309,7 +365,7 @@ packages: description: name: material_color_utilities sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "0.2.0" meta: @@ -317,15 +373,23 @@ packages: description: name: meta sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "1.9.1" + mime: + dependency: transitive + description: + name: mime + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.4" nested: dependency: transitive description: name: nested sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.0" path: @@ -333,7 +397,7 @@ packages: description: name: path sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "1.8.3" path_provider: @@ -341,7 +405,7 @@ packages: description: name: path_provider sha256: "3087813781ab814e4157b172f1a11c46be20179fcc9bea043e0fba36bc0acaa2" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.15" path_provider_android: @@ -349,7 +413,7 @@ packages: description: name: path_provider_android sha256: "2cec049d282c7f13c594b4a73976b0b4f2d7a1838a6dd5aaf7bd9719196bee86" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.27" path_provider_foundation: @@ -357,7 +421,7 @@ packages: description: name: path_provider_foundation sha256: "1995d88ec2948dac43edf8fe58eb434d35d22a2940ecee1a9fefcd62beee6eb3" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "2.2.3" path_provider_linux: @@ -365,7 +429,7 @@ packages: description: name: path_provider_linux sha256: ffbb8cc9ed2c9ec0e4b7a541e56fd79b138e8f47d2fb86815f15358a349b3b57 - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.11" path_provider_platform_interface: @@ -373,23 +437,23 @@ packages: description: name: path_provider_platform_interface sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.6" path_provider_windows: dependency: transitive description: name: path_provider_windows - sha256: d3f80b32e83ec208ac95253e0cd4d298e104fbc63cb29c5c69edaed43b0c69d6 - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + sha256: "1cb68ba4cd3a795033de62ba1b7b4564dace301f952de6bfb3cd91b202b6ee96" + url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.6" + version: "2.1.7" petitparser: dependency: transitive description: name: petitparser sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "5.4.0" platform: @@ -397,7 +461,7 @@ packages: description: name: platform sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "3.1.0" plugin_platform_interface: @@ -405,7 +469,7 @@ packages: description: name: plugin_platform_interface sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.4" process: @@ -413,7 +477,7 @@ packages: description: name: process sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "4.2.4" provider: @@ -421,7 +485,7 @@ packages: description: name: provider sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "6.0.5" reorderables: @@ -429,7 +493,7 @@ packages: description: name: reorderables sha256: "004a886e4878df1ee27321831c838bc1c976311f4ca6a74ce7d561e506540a77" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "0.6.0" sky_engine: @@ -442,7 +506,7 @@ packages: description: name: source_span sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "1.9.1" stack_trace: @@ -450,7 +514,7 @@ packages: description: name: stack_trace sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "1.11.0" stream_channel: @@ -458,7 +522,7 @@ packages: description: name: stream_channel sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.1" string_scanner: @@ -466,7 +530,7 @@ packages: description: name: string_scanner sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "1.2.0" term_glyph: @@ -474,7 +538,7 @@ packages: description: name: term_glyph sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "1.2.1" test_api: @@ -482,7 +546,7 @@ packages: description: name: test_api sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "0.5.1" timezone: @@ -490,7 +554,7 @@ packages: description: name: timezone sha256: "1cfd8ddc2d1cfd836bc93e67b9be88c3adaeca6f40a00ca999104c30693cdca0" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "0.9.2" typed_data: @@ -498,7 +562,7 @@ packages: description: name: typed_data sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "1.3.2" vector_math: @@ -506,7 +570,7 @@ packages: description: name: vector_math sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "2.1.4" video_player: @@ -514,23 +578,23 @@ packages: description: name: video_player sha256: de95f0e9405f29b5582573d4166132e71f83b3158aac14e8ee5767a54f4f1fbd - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "2.6.1" video_player_android: dependency: transitive description: name: video_player_android - sha256: ae1c7d9a71c236a1bf9e567bd7ed4c90887e389a5f233b2192593f7f7395005c - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + sha256: f338a5a396c845f4632959511cad3542cdf3167e1b2a1a948ef07f7123c03608 + url: "https://pub.flutter-io.cn" source: hosted - version: "2.4.8" + version: "2.4.9" video_player_avfoundation: dependency: transitive description: name: video_player_avfoundation sha256: "4c274e439f349a0ee5cb3c42978393ede173a443b98f50de6ffe6900eaa19216" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "2.4.6" video_player_platform_interface: @@ -538,7 +602,7 @@ packages: description: name: video_player_platform_interface sha256: a8c4dcae2a7a6e7cc1d7f9808294d968eca1993af34a98e95b9bdfa959bec684 - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "6.1.0" video_player_web: @@ -546,23 +610,23 @@ packages: description: name: video_player_web sha256: "44ce41424d104dfb7cf6982cc6b84af2b007a24d126406025bf40de5d481c74c" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "2.0.16" win32: dependency: transitive description: name: win32 - sha256: "5a751eddf9db89b3e5f9d50c20ab8612296e4e8db69009788d6c8b060a84191c" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + sha256: "1414f27dd781737e51afa9711f2ac2ace6ab4498ee98e20863fa5505aa00c58c" + url: "https://pub.flutter-io.cn" source: hosted - version: "4.1.4" + version: "5.0.4" xdg_directories: dependency: transitive description: name: xdg_directories sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "1.0.0" xml: @@ -570,7 +634,7 @@ packages: description: name: xml sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84" - url: "https://mirrors.tuna.tsinghua.edu.cn/dart-pub/" + url: "https://pub.flutter-io.cn" source: hosted version: "6.3.0" sdks: diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 8b6d468..77ab7a0 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -6,6 +6,9 @@ #include "generated_plugin_registrant.h" +#include void RegisterPlugins(flutter::PluginRegistry* registry) { + FileSelectorWindowsRegisterWithRegistrar( + registry->GetRegistrarForPlugin("FileSelectorWindows")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index b93c4c3..a423a02 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + file_selector_windows ) list(APPEND FLUTTER_FFI_PLUGIN_LIST