From 22f2fbdcd5da6cae925cf29329d87e72b737ae90 Mon Sep 17 00:00:00 2001 From: Phan An Date: Fri, 19 Apr 2024 16:17:28 +0200 Subject: [PATCH] feat: login via OTP --- android/app/src/debug/AndroidManifest.xml | 2 +- android/app/src/main/AndroidManifest.xml | 5 + ios/Flutter/AppFrameworkInfo.plist | 2 +- ios/Podfile | 2 +- ios/Podfile.lock | 42 ++- ios/Runner.xcodeproj/project.pbxproj | 18 +- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- ios/Runner/Base.lproj/Main.storyboard | 13 +- ios/Runner/Info.plist | 2 + lib/providers/auth_provider.dart | 15 + lib/ui/screens/info_sheet/info_sheet.dart | 27 +- lib/ui/screens/info_sheet/lyrics_pane.dart | 3 +- lib/ui/screens/library.dart | 2 +- lib/ui/screens/login.dart | 51 ++- lib/ui/theme_data.dart | 12 +- lib/ui/widgets/qr_login_button.dart | 38 +++ lib/ui/widgets/song_cache_icon.dart | 2 +- lib/ui/widgets/song_row.dart | 3 +- macos/Flutter/GeneratedPluginRegistrant.swift | 2 - .../ephemeral/Flutter-Generated.xcconfig | 6 +- .../ephemeral/flutter_export_environment.sh | 6 +- pubspec.lock | 320 +++++------------- pubspec.yaml | 9 +- .../connectivity_plus_windows | 1 - .../.plugin_symlinks/path_provider_windows | 1 - 25 files changed, 276 insertions(+), 310 deletions(-) create mode 100644 lib/ui/widgets/qr_login_button.dart delete mode 120000 windows/flutter/ephemeral/.plugin_symlinks/connectivity_plus_windows delete mode 120000 windows/flutter/ephemeral/.plugin_symlinks/path_provider_windows diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 7bbe252..312bff6 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -3,6 +3,6 @@ - + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 467a85b..9b4b120 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -49,6 +49,11 @@ + + + diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist index 9625e10..7c56964 100644 --- a/ios/Flutter/AppFrameworkInfo.plist +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 12.0 diff --git a/ios/Podfile b/ios/Podfile index ef2adcc..16df2b6 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -platform :ios, '11.0' +platform :ios, '12.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 5b585af..0077372 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -12,19 +12,19 @@ PODS: - FMDB/standard (2.7.5) - just_audio (0.0.1): - Flutter + - MTBBarcodeScanner (5.0.11) + - native_qr (0.0.1): + - Flutter - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS + - qr_code_scanner (0.2.0): + - Flutter + - MTBBarcodeScanner - ReachabilitySwift (5.0.0) - sqflite (0.0.2): - Flutter - FMDB (>= 2.7.5) - - video_player_avfoundation (0.0.1): - - Flutter - - wakelock (0.0.1): - - Flutter - - webview_flutter_wkwebview (0.0.1): - - Flutter DEPENDENCIES: - audio_service (from `.symlinks/plugins/audio_service/ios`) @@ -32,15 +32,15 @@ DEPENDENCIES: - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) - Flutter (from `Flutter`) - just_audio (from `.symlinks/plugins/just_audio/ios`) - - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`) + - native_qr (from `.symlinks/plugins/native_qr/ios`) + - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) + - qr_code_scanner (from `.symlinks/plugins/qr_code_scanner/ios`) - sqflite (from `.symlinks/plugins/sqflite/ios`) - - video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/ios`) - - wakelock (from `.symlinks/plugins/wakelock/ios`) - - webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`) SPEC REPOS: trunk: - FMDB + - MTBBarcodeScanner - ReachabilitySwift EXTERNAL SOURCES: @@ -54,31 +54,29 @@ EXTERNAL SOURCES: :path: Flutter just_audio: :path: ".symlinks/plugins/just_audio/ios" + native_qr: + :path: ".symlinks/plugins/native_qr/ios" path_provider_foundation: - :path: ".symlinks/plugins/path_provider_foundation/ios" + :path: ".symlinks/plugins/path_provider_foundation/darwin" + qr_code_scanner: + :path: ".symlinks/plugins/qr_code_scanner/ios" sqflite: :path: ".symlinks/plugins/sqflite/ios" - video_player_avfoundation: - :path: ".symlinks/plugins/video_player_avfoundation/ios" - wakelock: - :path: ".symlinks/plugins/wakelock/ios" - webview_flutter_wkwebview: - :path: ".symlinks/plugins/webview_flutter_wkwebview/ios" SPEC CHECKSUMS: audio_service: f509d65da41b9521a61f1c404dd58651f265a567 audio_session: 4f3e461722055d21515cf3261b64c973c062f345 connectivity_plus: 413a8857dd5d9f1c399a39130850d02fe0feaf7e - Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 + Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa + MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb + native_qr: 2a3151f33e6c69d4320fc5c5f24848200c1aa4fa path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9 + qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 - video_player_avfoundation: 81e49bb3d9fb63dccf9fa0f6d877dc3ddbeac126 - wakelock: d0fc7c864128eac40eba1617cb5264d9c940b46f - webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f -PODFILE CHECKSUM: ca5588cf6dfd563245937ea51517ea6f225e6f5e +PODFILE CHECKSUM: e3f29c7ff5542cfd5274ac2c7e8374a7eab80a0c COCOAPODS: 1.12.0 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 9d69e8c..959a9dc 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -158,7 +158,7 @@ isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = YES; - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -207,6 +207,7 @@ files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( @@ -364,7 +365,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 22; + CURRENT_PROJECT_VERSION = 23; DEVELOPMENT_TEAM = PTBU9CDS3L; ENABLE_BITCODE = NO; FLUTTER_BUILD_NAME = 2.1.0; @@ -372,11 +373,12 @@ INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "Koel Player"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.music"; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = "$(FLUTTER_BUILD_NAME)"; + MARKETING_VERSION = 2.2.0; PRODUCT_BUNDLE_IDENTIFIER = dev.koel.koel; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -508,7 +510,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 22; + CURRENT_PROJECT_VERSION = 23; DEVELOPMENT_TEAM = PTBU9CDS3L; ENABLE_BITCODE = NO; FLUTTER_BUILD_NAME = 2.1.0; @@ -516,11 +518,12 @@ INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "Koel Player Test"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.music"; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = "$(FLUTTER_BUILD_NAME)"; + MARKETING_VERSION = 2.2.0; PRODUCT_BUNDLE_IDENTIFIER = debug.dev.koel.koel; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -541,7 +544,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 22; + CURRENT_PROJECT_VERSION = 23; DEVELOPMENT_TEAM = PTBU9CDS3L; ENABLE_BITCODE = NO; FLUTTER_BUILD_NAME = 2.1.0; @@ -549,11 +552,12 @@ INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "Koel Player"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.music"; + IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = "$(FLUTTER_BUILD_NAME)"; + MARKETING_VERSION = 2.2.0; PRODUCT_BUNDLE_IDENTIFIER = dev.koel.koel; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index c87d15a..5e31d3d 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ - + + + - + + @@ -14,13 +16,14 @@ - + - + + diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index ec312ad..287124f 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -53,5 +53,7 @@ UIViewControllerBasedStatusBarAppearance + NSCameraUsageDescription + Require acces to camera to support login via QR code diff --git a/lib/providers/auth_provider.dart b/lib/providers/auth_provider.dart index 417b58f..69e9584 100644 --- a/lib/providers/auth_provider.dart +++ b/lib/providers/auth_provider.dart @@ -41,6 +41,21 @@ class AuthProvider with StreamSubscriber { preferences.audioToken = response['audio-token']; } + Future loginWithOneTimeToken({ + required String host, + required String token, + }) async { + preferences.host = host; + + final loginData = { + 'token': token, + }; + + final response = await post('me/otp', data: loginData); + preferences.apiToken = response['token']; + preferences.audioToken = response['audio-token']; + } + void setAuthUser(User user) => _authUser = user; Future tryGetAuthUser() async { diff --git a/lib/ui/screens/info_sheet/info_sheet.dart b/lib/ui/screens/info_sheet/info_sheet.dart index 91bd8cc..8d11c8c 100644 --- a/lib/ui/screens/info_sheet/info_sheet.dart +++ b/lib/ui/screens/info_sheet/info_sheet.dart @@ -52,7 +52,6 @@ class _InfoSheetState extends State { backgroundColor: Colors.transparent, elevation: 0, bottom: const TabBar( - indicatorColor: AppColors.highlight, tabs: [ Tab(text: 'Lyrics'), Tab(text: 'Artist'), @@ -85,18 +84,20 @@ class InfoHtml extends StatelessWidget { @override Widget build(BuildContext context) { - return SelectableHtml( - data: '
$content
', - style: { - 'body': Style().copyWith( - padding: EdgeInsets.zero, - margin: EdgeInsets.zero, - ), - 'div': (style ?? Style()).copyWith( - fontSize: FontSize.large, - lineHeight: LineHeight.number(1.4), - ), - }, + return SelectionArea( + child: Html( + data: '
$content
', + style: { + 'body': Style().copyWith( + padding: HtmlPaddings.zero, + margin: Margins.zero, + ), + 'div': (style ?? Style()).copyWith( + fontSize: FontSize.large, + lineHeight: LineHeight.number(1.4), + ), + }, + ), ); } } diff --git a/lib/ui/screens/info_sheet/lyrics_pane.dart b/lib/ui/screens/info_sheet/lyrics_pane.dart index db55685..b23d4eb 100644 --- a/lib/ui/screens/info_sheet/lyrics_pane.dart +++ b/lib/ui/screens/info_sheet/lyrics_pane.dart @@ -21,7 +21,8 @@ class LyricsPane extends StatelessWidget { : Padding( padding: EdgeInsets.only(top: 4.0), child: InfoHtml( - content: song.lyrics.replaceAll('\n', '
'), + content: + song.lyrics.replaceAll('\n', '
').replaceAll('\r', '
'), style: Style(fontSize: FontSize.larger), ), ); diff --git a/lib/ui/screens/library.dart b/lib/ui/screens/library.dart index 404a0f7..804f8e7 100644 --- a/lib/ui/screens/library.dart +++ b/lib/ui/screens/library.dart @@ -142,7 +142,7 @@ class LibraryMenuItem extends StatelessWidget { contentPadding: EdgeInsets.symmetric( horizontal: AppDimensions.hPadding, ), - horizontalTitleGap: 0, + horizontalTitleGap: 12, leading: icon is IconData ? Icon(icon, color: Colors.white54) : icon, title: Text(label, style: const TextStyle(fontSize: 20)), trailing: const Icon( diff --git a/lib/ui/screens/login.dart b/lib/ui/screens/login.dart index 8869a88..bcd4580 100644 --- a/lib/ui/screens/login.dart +++ b/lib/ui/screens/login.dart @@ -3,11 +3,13 @@ import 'package:app/exceptions/exceptions.dart'; import 'package:app/mixins/stream_subscriber.dart'; import 'package:app/providers/providers.dart'; import 'package:app/ui/screens/screens.dart'; +import 'package:app/ui/widgets/qr_login_button.dart'; import 'package:app/ui/widgets/widgets.dart'; import 'package:app/utils/preferences.dart' as preferences; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_spinkit/flutter_spinkit.dart'; +import 'package:native_qr/native_qr.dart'; import 'package:provider/provider.dart'; class LoginScreen extends StatefulWidget { @@ -76,6 +78,13 @@ class _LoginScreenState extends State with StreamSubscriber { return host; } + void redirectToDataLoadingScreen() { + Navigator.of( + context, + rootNavigator: true, + ).pushReplacementNamed(DataLoadingScreen.routeName); + } + Future attemptLogin() async { final form = formKey.currentState!; var successful = false; @@ -106,11 +115,37 @@ class _LoginScreenState extends State with StreamSubscriber { if (successful) { preferences.host = _host; preferences.userEmail = _email; + redirectToDataLoadingScreen(); + } + } - Navigator.of( + Future attemptLoginWithOtp({ + required String host, + required String token, + }) async { + var successful = false; + setState(() => _authenticating = true); + + try { + host = standardizeHost(host); + await _auth.loginWithOneTimeToken(host: host, token: token); + await _auth.tryGetAuthUser(); + successful = true; + } on HttpResponseException catch (error) { + await showErrorDialog( context, - rootNavigator: true, - ).pushReplacementNamed(DataLoadingScreen.routeName); + message: + error.response.statusCode == 401 ? 'Invalid login token.' : null, + ); + } catch (error) { + await showErrorDialog(context); + } finally { + setState(() => _authenticating = false); + } + + if (successful) { + preferences.host = host; + redirectToDataLoadingScreen(); } } @@ -189,6 +224,16 @@ class _LoginScreenState extends State with StreamSubscriber { onPressed: _authenticating ? null : attemptLogin, ), ), + _authenticating + ? SizedBox() + : QrLoginButton( + onResult: ({ + required String host, + required String token, + }) { + attemptLoginWithOtp(host: host, token: token); + }, + ), ].expand((widget) => [widget, const SizedBox(height: 12)]), ], ), diff --git a/lib/ui/theme_data.dart b/lib/ui/theme_data.dart index 43e8c34..c58f3b0 100644 --- a/lib/ui/theme_data.dart +++ b/lib/ui/theme_data.dart @@ -8,7 +8,17 @@ import 'package:flutter/material.dart'; ThemeData themeData(BuildContext context) { return ThemeData( splashColor: AppColors.highlightAccent, - dividerColor: Colors.white30, + dividerTheme: const DividerThemeData( + color: Colors.white12, + space: 0, + thickness: .5, + ), + tabBarTheme: TabBarTheme( + labelColor: Colors.white, + unselectedLabelColor: Colors.white54, + indicatorColor: AppColors.highlight, + dividerColor: Colors.white12, + ), scaffoldBackgroundColor: Colors.transparent, colorScheme: ColorScheme.dark( background: AppColors.background, diff --git a/lib/ui/widgets/qr_login_button.dart b/lib/ui/widgets/qr_login_button.dart new file mode 100644 index 0000000..f6635cb --- /dev/null +++ b/lib/ui/widgets/qr_login_button.dart @@ -0,0 +1,38 @@ +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:native_qr/native_qr.dart'; + +class QrLoginButton extends StatelessWidget { + const QrLoginButton({Key? key, required this.onResult}) : super(key: key); + + final Function({required String host, required String token}) onResult; + + @override + Widget build(BuildContext context) { + return ElevatedButton( + child: Icon(Icons.qr_code_scanner_rounded, size: 32), + style: ElevatedButton.styleFrom( + backgroundColor: Colors.transparent, + shape: CircleBorder(), + ), + onPressed: () async { + try { + var nativeQr = NativeQr(); + String? payload = await nativeQr.get(); + if (payload != null) { + Codec stringToBase64 = utf8.fuse(base64); + var decodedPayload = stringToBase64.decode(payload); + var payloadJson = jsonDecode(decodedPayload); + onResult( + host: payloadJson['host'], + token: payloadJson['token'], + ); + } + } catch (err) { + print(err); + } + }, + ); + } +} diff --git a/lib/ui/widgets/song_cache_icon.dart b/lib/ui/widgets/song_cache_icon.dart index 803ffbc..dd75b06 100644 --- a/lib/ui/widgets/song_cache_icon.dart +++ b/lib/ui/widgets/song_cache_icon.dart @@ -96,7 +96,7 @@ class _SongCacheIconState extends State with StreamSubscriber { return IconButton( onPressed: _download, constraints: const BoxConstraints(), - padding: const EdgeInsets.symmetric(horizontal: 0.0), + padding: const EdgeInsets.only(right: 4.0), icon: const Icon(CupertinoIcons.cloud_download_fill, size: 16), ); } diff --git a/lib/ui/widgets/song_row.dart b/lib/ui/widgets/song_row.dart index c25863e..96ffc24 100644 --- a/lib/ui/widgets/song_row.dart +++ b/lib/ui/widgets/song_row.dart @@ -7,7 +7,6 @@ import 'package:audio_service/audio_service.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter_html/style.dart'; class SongRow extends StatefulWidget { final Song song; @@ -95,7 +94,7 @@ class SongRowTrackNumber extends StatelessWidget { child: Text( song.track == 0 ? '' : song.track.toString(), overflow: TextOverflow.ellipsis, - style: TextStyle(fontSize: FontSize.large.size, color: Colors.white54), + style: TextStyle(fontSize: 15, color: Colors.white54), ), ); } diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 7c1eeef..6827b48 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -11,7 +11,6 @@ import connectivity_plus_macos import just_audio import path_provider_foundation import sqflite -import wakelock_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { AudioServicePlugin.register(with: registry.registrar(forPlugin: "AudioServicePlugin")) @@ -20,5 +19,4 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) - WakelockMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockMacosPlugin")) } diff --git a/macos/Flutter/ephemeral/Flutter-Generated.xcconfig b/macos/Flutter/ephemeral/Flutter-Generated.xcconfig index 99adc6c..04e4bbd 100644 --- a/macos/Flutter/ephemeral/Flutter-Generated.xcconfig +++ b/macos/Flutter/ephemeral/Flutter-Generated.xcconfig @@ -1,10 +1,10 @@ // This is a generated file; do not edit or check into version control. -FLUTTER_ROOT=/Users/an/flutter +FLUTTER_ROOT=/Users/an/bin/flutter FLUTTER_APPLICATION_PATH=/Users/an/Personal/koel/player COCOAPODS_PARALLEL_CODE_SIGN=true FLUTTER_BUILD_DIR=build -FLUTTER_BUILD_NAME=1.1.1 -FLUTTER_BUILD_NUMBER=9 +FLUTTER_BUILD_NAME=2.2.0 +FLUTTER_BUILD_NUMBER=23 DART_OBFUSCATION=false TRACK_WIDGET_CREATION=true TREE_SHAKE_ICONS=false diff --git a/macos/Flutter/ephemeral/flutter_export_environment.sh b/macos/Flutter/ephemeral/flutter_export_environment.sh index 6659e46..202e433 100755 --- a/macos/Flutter/ephemeral/flutter_export_environment.sh +++ b/macos/Flutter/ephemeral/flutter_export_environment.sh @@ -1,11 +1,11 @@ #!/bin/sh # This is a generated file; do not edit or check into version control. -export "FLUTTER_ROOT=/Users/an/flutter" +export "FLUTTER_ROOT=/Users/an/bin/flutter" export "FLUTTER_APPLICATION_PATH=/Users/an/Personal/koel/player" export "COCOAPODS_PARALLEL_CODE_SIGN=true" export "FLUTTER_BUILD_DIR=build" -export "FLUTTER_BUILD_NAME=1.1.1" -export "FLUTTER_BUILD_NUMBER=9" +export "FLUTTER_BUILD_NAME=2.2.0" +export "FLUTTER_BUILD_NUMBER=23" export "DART_OBFUSCATION=false" export "TRACK_WIDGET_CREATION=true" export "TREE_SHAKE_ICONS=false" diff --git a/pubspec.lock b/pubspec.lock index 4b7966f..a427ecf 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -29,10 +29,10 @@ packages: dependency: transitive description: name: async - sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted - version: "2.10.0" + version: "2.11.0" audio_service: dependency: "direct main" description: @@ -141,34 +141,34 @@ packages: dependency: "direct main" description: name: cached_network_image - sha256: fd3d0dc1d451f9a252b32d95d3f0c3c487bc41a75eba2e6097cb0b9c71491b15 + sha256: "28ea9690a8207179c319965c13cd8df184d5ee721ae2ce60f398ced1219cea1f" url: "https://pub.dev" source: hosted - version: "3.2.3" + version: "3.3.1" cached_network_image_platform_interface: dependency: transitive description: name: cached_network_image_platform_interface - sha256: bb2b8403b4ccdc60ef5f25c70dead1f3d32d24b9d6117cfc087f496b178594a7 + sha256: "9e90e78ae72caa874a323d78fa6301b3fb8fa7ea76a8f96dc5b5bf79f283bf2f" url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "4.0.0" cached_network_image_web: dependency: transitive description: name: cached_network_image_web - sha256: b8eb814ebfcb4dea049680f8c1ffb2df399e4d03bf7a352c775e26fa06e02fa0 + sha256: "42a835caa27c220d1294311ac409a43361088625a4f23c820b006dd9bffb3316" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.1.1" characters: dependency: transitive description: name: characters - sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" checked_yaml: dependency: transitive description: @@ -177,22 +177,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.3" - chewie: - dependency: transitive - description: - name: chewie - sha256: e9da4898ee4859825404f507969f57113c04ca0060e152b95c9afd73934126ad - url: "https://pub.dev" - source: hosted - version: "1.4.0" - chewie_audio: - dependency: transitive - description: - name: chewie_audio - sha256: f92bb4364ced21318e1a7c0eddaf249a7554e5cf27f869d58c44d926abd292a7 - url: "https://pub.dev" - source: hosted - version: "1.3.0" clock: dependency: transitive description: @@ -213,10 +197,10 @@ packages: dependency: transitive description: name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.0" + version: "1.18.0" connectivity_plus: dependency: "direct main" description: @@ -382,46 +366,22 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_blurhash: - dependency: transitive - description: - name: flutter_blurhash - sha256: "05001537bd3fac7644fa6558b09ec8c0a3f2eba78c0765f88912882b1331a5c6" - url: "https://pub.dev" - source: hosted - version: "0.7.0" flutter_cache_manager: dependency: transitive description: name: flutter_cache_manager - sha256: "32cd900555219333326a2d0653aaaf8671264c29befa65bbd9856d204a4c9fb3" + sha256: "8207f27539deb83732fdda03e259349046a39a4c767269285f449ade355d54ba" url: "https://pub.dev" source: hosted - version: "3.3.0" + version: "3.3.1" flutter_html: dependency: "direct main" description: name: flutter_html - sha256: ccb810fcabfce3a7ffaca46e458323915ac7e7fc59082c7357ff848972c02230 + sha256: "02ad69e813ecfc0728a455e4bf892b9379983e050722b1dce00192ee2e41d1ee" url: "https://pub.dev" source: hosted - version: "2.2.1" - flutter_layout_grid: - dependency: transitive - description: - name: flutter_layout_grid - sha256: "86c1b21520612edfbb93f189b3ec05058470570f3a5c08ce10c92cc76a6e814e" - url: "https://pub.dev" - source: hosted - version: "1.0.6" - flutter_math_fork: - dependency: transitive - description: - name: flutter_math_fork - sha256: a34205227e1a1d040a56e74a5e2e56e9397ea930540a9373bd0b3e2e4f122017 - url: "https://pub.dev" - source: hosted - version: "0.5.0" + version: "3.0.0-beta.2" flutter_spinkit: dependency: "direct main" description: @@ -430,14 +390,6 @@ packages: url: "https://pub.dev" source: hosted version: "5.2.0" - flutter_svg: - dependency: transitive - description: - name: flutter_svg - sha256: cbf529d563dd910a249041bde2a0dfc3cf62280fcc459b85f3d614b2ab73abb3 - url: "https://pub.dev" - source: hosted - version: "0.23.0+1" flutter_test: dependency: "direct dev" description: flutter @@ -584,6 +536,38 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.7" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + list_counter: + dependency: transitive + description: + name: list_counter + sha256: c447ae3dfcd1c55f0152867090e67e219d42fe6d4f2807db4bbe8b8d69912237 + url: "https://pub.dev" + source: hosted + version: "1.0.2" logging: dependency: transitive description: @@ -596,26 +580,26 @@ packages: dependency: transitive description: name: matcher - sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.13" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.11.0" mime: dependency: transitive description: @@ -628,10 +612,18 @@ packages: dependency: "direct dev" description: name: mockito - sha256: dd61809f04da1838a680926de50a9e87385c1de91c6579629c3d1723946e8059 + sha256: "8b46d7eb40abdda92d62edd01546051f0c27365e65608c284de336dccfef88cc" url: "https://pub.dev" source: hosted - version: "5.4.0" + version: "5.4.1" + native_qr: + dependency: "direct main" + description: + name: native_qr + sha256: "0928754b92305eb101a3359014a60ac5e90126534406b4dd6fb7550433978420" + url: "https://pub.dev" + source: hosted + version: "0.0.3" nested: dependency: transitive description: @@ -648,22 +640,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.3.0" - numerus: - dependency: transitive - description: - name: numerus - sha256: "0087ef729d63b96cb347a9c44b9c592f21cecb3605b415bbd18710aef80ce5cb" - url: "https://pub.dev" - source: hosted - version: "1.1.1" octo_image: dependency: transitive description: name: octo_image - sha256: "107f3ed1330006a3bea63615e81cf637433f5135a52466c7caa0e7152bca9143" + sha256: "45b40f99622f11901238e18d48f5f12ea36426d8eced9f4cbf58479c7aa2430d" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "2.0.0" package_config: dependency: transitive description: @@ -676,26 +660,10 @@ packages: dependency: transitive description: name: path - sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b - url: "https://pub.dev" - source: hosted - version: "1.8.2" - path_drawing: - dependency: transitive - description: - name: path_drawing - sha256: "3bdd251dae9ffaef944450b73f168610db7e968e7b20daf0c3907f8b4aafc8a2" - url: "https://pub.dev" - source: hosted - version: "0.5.1+1" - path_parsing: - dependency: transitive - description: - name: path_parsing - sha256: ee5c47c1058ad66b4a41746ec3996af9593d0858872807bcd64ac118f0700337 + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "0.2.1" + version: "1.9.0" path_provider: dependency: "direct main" description: @@ -816,14 +784,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.3" - quiver: - dependency: transitive - description: - name: quiver - sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47 - url: "https://pub.dev" - source: hosted - version: "3.2.1" rxdart: dependency: transitive description: @@ -836,10 +796,10 @@ packages: dependency: "direct main" description: name: scrolls_to_top - sha256: d6d6df9976b71ab77f032b710e0e9eef9600c42308143e939777cf7d37c180fc + sha256: "8d6684d936b9c1a19c19ee93c836251ae9c803023290762a30cb7657e88e272e" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" shelf: dependency: transitive description: @@ -881,10 +841,10 @@ packages: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" sqflite: dependency: transitive description: @@ -905,18 +865,18 @@ packages: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" stream_transform: dependency: transitive description: @@ -953,10 +913,10 @@ packages: dependency: transitive description: name: test_api - sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted - version: "0.4.16" + version: "0.6.1" timing: dependency: transitive description: @@ -965,14 +925,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.1" - tuple: - dependency: transitive - description: - name: tuple - sha256: "0ea99cd2f9352b2586583ab2ce6489d1f95a5f6de6fb9492faaf97ae2060f0aa" - url: "https://pub.dev" - source: hosted - version: "2.0.1" typed_data: dependency: transitive description: @@ -1005,86 +957,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.2" - video_player: + vm_service: dependency: transitive description: - name: video_player - sha256: de95f0e9405f29b5582573d4166132e71f83b3158aac14e8ee5767a54f4f1fbd + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 url: "https://pub.dev" source: hosted - version: "2.6.1" - video_player_android: - dependency: transitive - description: - name: video_player_android - sha256: b608c320ab1a5fd373987c9c3c9ddbd6bda04d209f2a9f0bf197c5b02082201e - url: "https://pub.dev" - source: hosted - version: "2.4.7" - video_player_avfoundation: - dependency: transitive - description: - name: video_player_avfoundation - sha256: "824dad3e2986a13766fcccfd1c48c83eef9f896c220a53292e3019b9e98615bb" - url: "https://pub.dev" - source: hosted - version: "2.4.5" - video_player_platform_interface: - dependency: transitive - description: - name: video_player_platform_interface - sha256: a8c4dcae2a7a6e7cc1d7f9808294d968eca1993af34a98e95b9bdfa959bec684 - url: "https://pub.dev" - source: hosted - version: "6.1.0" - video_player_web: - dependency: transitive - description: - name: video_player_web - sha256: "44ce41424d104dfb7cf6982cc6b84af2b007a24d126406025bf40de5d481c74c" - url: "https://pub.dev" - source: hosted - version: "2.0.16" - wakelock: - dependency: transitive - description: - name: wakelock - sha256: "769ecf42eb2d07128407b50cb93d7c10bd2ee48f0276ef0119db1d25cc2f87db" - url: "https://pub.dev" - source: hosted - version: "0.6.2" - wakelock_macos: - dependency: transitive - description: - name: wakelock_macos - sha256: "047c6be2f88cb6b76d02553bca5a3a3b95323b15d30867eca53a19a0a319d4cd" - url: "https://pub.dev" - source: hosted - version: "0.4.0" - wakelock_platform_interface: - dependency: transitive - description: - name: wakelock_platform_interface - sha256: "1f4aeb81fb592b863da83d2d0f7b8196067451e4df91046c26b54a403f9de621" - url: "https://pub.dev" - source: hosted - version: "0.3.0" - wakelock_web: - dependency: transitive - description: - name: wakelock_web - sha256: "1b256b811ee3f0834888efddfe03da8d18d0819317f20f6193e2922b41a501b5" - url: "https://pub.dev" - source: hosted - version: "0.4.0" - wakelock_windows: - dependency: transitive - description: - name: wakelock_windows - sha256: "857f77b3fe6ae82dd045455baa626bc4b93cb9bb6c86bf3f27c182167c3a5567" - url: "https://pub.dev" - source: hosted - version: "0.2.1" + version: "13.0.0" watcher: dependency: transitive description: @@ -1101,38 +981,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.4.0" - webview_flutter: - dependency: transitive - description: - name: webview_flutter - sha256: "6886b3ceef1541109df5001054aade5ee3c36b5780302e41701c78357233721c" - url: "https://pub.dev" - source: hosted - version: "2.8.0" - webview_flutter_android: - dependency: transitive - description: - name: webview_flutter_android - sha256: "8b3b2450e98876c70bfcead876d9390573b34b9418c19e28168b74f6cb252dbd" - url: "https://pub.dev" - source: hosted - version: "2.10.4" - webview_flutter_platform_interface: - dependency: transitive - description: - name: webview_flutter_platform_interface - sha256: "812165e4e34ca677bdfbfa58c01e33b27fd03ab5fa75b70832d4b7d4ca1fa8cf" - url: "https://pub.dev" - source: hosted - version: "1.9.5" - webview_flutter_wkwebview: - dependency: transitive - description: - name: webview_flutter_wkwebview - sha256: a5364369c758892aa487cbf59ea41d9edd10f9d9baf06a94e80f1bd1b4c7bbc0 - url: "https://pub.dev" - source: hosted - version: "2.9.5" win32: dependency: transitive description: @@ -1166,5 +1014,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=2.19.0 <3.0.0" - flutter: ">=3.3.0" + dart: ">=3.2.0-0 <4.0.0" + flutter: ">=3.10.0" diff --git a/pubspec.yaml b/pubspec.yaml index 2326344..8188dc3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 2.1.0+22 +version: 2.2.0+23 environment: sdk: ">=2.17.0-0 <3.0.0" @@ -31,12 +31,12 @@ dependencies: provider: ^6.0.3 http: ^0.13.3 easy_debounce: ^2.0.0 - flutter_html: ^2.1.0 + flutter_html: ^3.0.0-beta.2 flutter_spinkit: ^5.0.0 crypto: ^3.0.1 intl: ^0.17.0 get_storage: ^2.0.2 - cached_network_image: ^3.0.0 + cached_network_image: ^3.3.1 build_runner: ^2.0.6 uuid: ^3.0.4 shimmer: ^2.0.0 @@ -45,9 +45,10 @@ dependencies: figma_squircle: ^0.5.3 connectivity_plus: ^2.1.0 path_provider: ^2.0.14 - scrolls_to_top: ^2.1.0 + scrolls_to_top: ^2.1.1 fading_edge_scrollview: ^3.0.0 version: ^3.0.2 + native_qr: ^0.0.3 dev_dependencies: golden_toolkit: ^0.12.0 diff --git a/windows/flutter/ephemeral/.plugin_symlinks/connectivity_plus_windows b/windows/flutter/ephemeral/.plugin_symlinks/connectivity_plus_windows deleted file mode 120000 index 5dc65f1..0000000 --- a/windows/flutter/ephemeral/.plugin_symlinks/connectivity_plus_windows +++ /dev/null @@ -1 +0,0 @@ -/Users/an/.pub-cache/hosted/pub.dev/connectivity_plus_windows-1.2.2/ \ No newline at end of file diff --git a/windows/flutter/ephemeral/.plugin_symlinks/path_provider_windows b/windows/flutter/ephemeral/.plugin_symlinks/path_provider_windows deleted file mode 120000 index e324a96..0000000 --- a/windows/flutter/ephemeral/.plugin_symlinks/path_provider_windows +++ /dev/null @@ -1 +0,0 @@ -/Users/an/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.5/ \ No newline at end of file