diff --git a/.gitignore b/.gitignore index 0fa6b675..dc594bb3 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ app.*.map.json /android/app/debug /android/app/profile /android/app/release +**/ios/Flutter/ephemeral/ diff --git a/android/app/build.gradle b/android/app/build.gradle index 10c07631..6efdb8f1 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,45 +1,43 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +plugins { + id "com.android.application" + id "org.jetbrains.kotlin.android" + id "dev.flutter.flutter-gradle-plugin" } -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { - compileSdkVersion 33 - + namespace "com.hustlecreatives.flood_mobile" + compileSdkVersion 36 + defaultConfig { multiDexEnabled true // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - multiDexEnabled true applicationId "com.hustlecreatives.flood_mobile" - minSdkVersion 21 - targetSdkVersion 31 - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName + minSdkVersion flutter.minSdkVersion + targetSdkVersion 36 + versionCode flutter.versionCode + versionName flutter.versionName } dependencies { - implementation 'com.android.support:multidex:1.0.3' + implementation 'androidx.multidex:multidex:2.0.1' + implementation 'io.flutter:flutter_embedding_debug:1.0.0-d2913632a4578ee4d0b8b1c4a69888c8a0672c4b' + + implementation project(':awesome_notifications') + implementation project(':file_picker') + implementation project(':flutter_downloader') + implementation project(':flutter_keyboard_visibility') + implementation project(':flutter_plugin_android_lifecycle') + implementation project(':fluttertoast') + implementation project(':optimize_battery') + implementation project(':package_info_plus') + implementation project(':path_provider_android') + implementation project(':permission_handler_android') + implementation project(':shared_preferences_android') + implementation project(':app_links') + implementation project(':uri_to_file') + implementation project(':url_launcher_android') + implementation project(':video_player_android') + implementation project(':wakelock_plus') } buildTypes { @@ -53,4 +51,4 @@ android { flutter { source '../..' -} \ No newline at end of file +} diff --git a/android/app/src/main/res/xml/provider_paths.xml b/android/app/src/main/res/xml/provider_paths.xml new file mode 100644 index 00000000..ffa74ab5 --- /dev/null +++ b/android/app/src/main/res/xml/provider_paths.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle index 31e95773..c16a5002 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,20 +1,8 @@ -buildscript { - ext.kotlin_version = '1.6.10' - repositories { - google() - jcenter() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - allprojects { repositories { google() - jcenter() + mavenCentral() + maven { url 'https://storage.googleapis.com/download.flutter.io' } } } @@ -23,9 +11,39 @@ subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { + project.configurations.all { + resolutionStrategy.eachDependency { details -> + if (details.requested.group == 'androidx.core' && details.requested.name == 'core') { + details.useVersion "1.13.1" + } + if (details.requested.group == 'androidx.core' && details.requested.name == 'core-ktx') { + details.useVersion "1.13.1" + } + if (details.requested.group == 'androidx.browser' && details.requested.name == 'browser') { + details.useVersion "1.8.0" + } + } + } + afterEvaluate { project -> + if (project.hasProperty("android")) { + project.dependencies { + compileOnly 'io.flutter:flutter_embedding_debug:1.0.0-d2913632a4578ee4d0b8b1c4a69888c8a0672c4b' + } + project.android { + if (namespace == null) { + def manifestFile = project.file('src/main/AndroidManifest.xml') + if (manifestFile.exists()) { + def manifest = new XmlSlurper().parse(manifestFile) + def packageName = manifest.@package.text() + namespace packageName + } + } + } + } + } project.evaluationDependsOn(':app') } -task clean(type: Delete) { - delete rootProject.buildDir +tasks.register("clean", Delete) { + delete rootProject.layout.buildDirectory } diff --git a/android/gradle.properties b/android/gradle.properties index 94adc3a3..ebe602dd 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx1536M +org.gradle.jvmargs=-Xmx4096M android.useAndroidX=true -android.enableJetifier=true +android.enableJetifier=false diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 966aa8e6..3c85cfe0 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip diff --git a/android/settings.gradle b/android/settings.gradle index 44e62bcf..876342e2 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,11 +1,56 @@ -include ':app' +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false + id "com.android.application" version "8.3.0" apply false + id "org.jetbrains.kotlin.android" version "2.1.0" apply false +} + +include ":app" + +def plugins = [ + 'awesome_notifications': '/home/anurag/.pub-cache/hosted/pub.dev/awesome_notifications-0.10.1', + 'file_picker': '/home/anurag/.pub-cache/hosted/pub.dev/file_picker-10.3.7', + 'flutter_downloader': '/home/anurag/.pub-cache/hosted/pub.dev/flutter_downloader-1.12.0', + 'flutter_keyboard_visibility': '/home/anurag/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-5.4.1', + 'flutter_plugin_android_lifecycle': '/home/anurag/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.33', + 'fluttertoast': '/home/anurag/.pub-cache/hosted/pub.dev/fluttertoast-9.0.0', + 'optimize_battery': '/home/anurag/.pub-cache/hosted/pub.dev/optimize_battery-0.0.4', + 'package_info_plus': '/home/anurag/.pub-cache/hosted/pub.dev/package_info_plus-9.0.0', + 'path_provider_android': '/home/anurag/.pub-cache/hosted/pub.dev/path_provider_android-2.2.22', + 'permission_handler_android': '/home/anurag/.pub-cache/hosted/pub.dev/permission_handler_android-13.0.1', + 'shared_preferences_android': '/home/anurag/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.18', + 'app_links': '/home/anurag/.pub-cache/hosted/pub.dev/app_links-6.4.1', + 'uri_to_file': '/home/anurag/.pub-cache/hosted/pub.dev/uri_to_file-1.0.0', + 'url_launcher_android': '/home/anurag/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.28', + 'video_player_android': '/home/anurag/.pub-cache/hosted/pub.dev/video_player_android-2.8.22', + 'wakelock_plus': '/home/anurag/.pub-cache/hosted/pub.dev/wakelock_plus-1.4.0' +] + +plugins.each { name, path -> + def pluginDirectory = new File(path, 'android') + if (pluginDirectory.exists()) { + include ":$name" + project(":$name").projectDir = pluginDirectory + } else { + println "Plugin $name android directory not found at $pluginDirectory" + } +} -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/lib/Api/event_handler_api.dart b/lib/Api/event_handler_api.dart index 6d189abb..5a00f201 100644 --- a/lib/Api/event_handler_api.dart +++ b/lib/Api/event_handler_api.dart @@ -158,7 +158,7 @@ class EventHandlerApi { ), abbreviated: true, ), - progress: homeModel.torrentList[id].percentComplete.round(), + progress: homeModel.torrentList[id].percentComplete, summary: isPaused ? 'Paused' : 'Downloading', locked: true, autoDismissible: false, diff --git a/lib/Components/RSSFeedHomePage.dart b/lib/Components/RSSFeedHomePage.dart index 3d275db2..253b0c6a 100644 --- a/lib/Components/RSSFeedHomePage.dart +++ b/lib/Components/RSSFeedHomePage.dart @@ -95,7 +95,7 @@ class _RSSFeedHomePageState extends State Tab(key: Key('Download Rules Tab'), text: "Download Rules"), ], tabBarProperties: TabBarProperties( - indicatorColor: ThemeProvider.theme.textTheme.bodyText1?.color, + indicatorColor: ThemeProvider.theme.textTheme.bodyLarge?.color, indicatorWeight: 3.0, indicatorPadding: EdgeInsets.only(left: 12.0, right: 12.0), ), @@ -116,7 +116,7 @@ class _RSSFeedHomePageState extends State fontWeight: FontWeight.bold, fontFamily: 'Montserrat', color: ThemeProvider - .theme.textTheme.bodyText1?.color), + .theme.textTheme.bodyLarge?.color), ), ), (model.RssFeedsList.isNotEmpty) @@ -307,8 +307,7 @@ class _RSSFeedHomePageState extends State style: TextStyle( fontSize: 16, fontFamily: 'Montserrat', - color: ThemeProvider.theme.textTheme - .bodyText1?.color), + color: ThemeProvider.theme.textTheme.bodyLarge?.color), ), ), ], @@ -327,7 +326,7 @@ class _RSSFeedHomePageState extends State shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(5.0), ), - primary: ThemeProvider.theme.accentColor, + backgroundColor: ThemeProvider.theme.colorScheme.secondary, ), child: Center( child: Text( @@ -352,7 +351,7 @@ class _RSSFeedHomePageState extends State key: Key('Label textfield'), style: TextStyle( color: ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, ), controller: labelController, decoration: InputDecoration( @@ -360,8 +359,7 @@ class _RSSFeedHomePageState extends State hintText: 'Label', labelStyle: TextStyle( fontFamily: 'Montserrat', - color: ThemeProvider.theme.textTheme - .bodyText1?.color), + color: ThemeProvider.theme.textTheme.bodyLarge?.color), border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), @@ -379,8 +377,7 @@ class _RSSFeedHomePageState extends State key: Key('Interval textfield'), controller: intervalController, style: TextStyle( - color: ThemeProvider.theme.textTheme - .bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), keyboardType: TextInputType.number, decoration: InputDecoration( @@ -390,8 +387,7 @@ class _RSSFeedHomePageState extends State fontFamily: 'Montserrat', color: ThemeProvider .theme - .textTheme - .bodyText1 + .textTheme.bodyLarge ?.color), border: OutlineInputBorder( borderRadius: @@ -431,39 +427,41 @@ class _RSSFeedHomePageState extends State style: TextStyle( color: ThemeProvider .theme - .textTheme - .bodyText1 + .textTheme.bodyLarge ?.color), ), value: "Minutes", - icon: Icon( - Icons.keyboard_arrow_down, - color: ThemeProvider - .theme - .textTheme - .bodyText1 - ?.color, + iconStyleData: IconStyleData( + icon: Icon( + Icons.keyboard_arrow_down, + color: ThemeProvider + .theme + .textTheme.bodyLarge + ?.color, + ), ), - buttonHeight: 58, - buttonPadding: - const EdgeInsets.only( - left: 20, right: 10), - dropdownDecoration: - BoxDecoration( - boxShadow: [ - BoxShadow( - color: Colors.black12 - .withOpacity(0.5), - spreadRadius: 5, - blurRadius: 7, - offset: Offset(0, - 3), // changes position of shadow - ), - ], - borderRadius: - BorderRadius.circular(5), - color: ThemeProvider - .theme.primaryColorLight, + buttonStyleData: ButtonStyleData( + height: 58, + padding: const EdgeInsets.only( + left: 20, right: 10), + ), + dropdownStyleData: DropdownStyleData( + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: Colors.black12 + .withOpacity(0.5), + spreadRadius: 5, + blurRadius: 7, + offset: Offset(0, + 3), // changes position of shadow + ), + ], + borderRadius: + BorderRadius.circular(5), + color: ThemeProvider + .theme.primaryColorLight, + ), ), items: intervalunits .map((item) => @@ -483,6 +481,7 @@ class _RSSFeedHomePageState extends State if (value == null) { return 'Please select a unit'; } + return null; }, onChanged: (value) { if (value.toString() == @@ -521,15 +520,14 @@ class _RSSFeedHomePageState extends State controller: urlController, style: TextStyle( color: ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, ), decoration: InputDecoration( labelText: 'URL', hintText: 'URL', labelStyle: TextStyle( fontFamily: 'Montserrat', - color: ThemeProvider.theme.textTheme - .bodyText1?.color), + color: ThemeProvider.theme.textTheme.bodyLarge?.color), border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), @@ -573,7 +571,7 @@ class _RSSFeedHomePageState extends State borderRadius: BorderRadius.circular(5.0), ), - primary: Colors.red, + backgroundColor: Colors.red, ), child: Center( child: Text( @@ -647,7 +645,7 @@ class _RSSFeedHomePageState extends State borderRadius: BorderRadius.circular(5.0), ), - primary: ThemeProvider + backgroundColor: ThemeProvider .theme.primaryColorDark, ), child: Center( @@ -681,7 +679,7 @@ class _RSSFeedHomePageState extends State fontWeight: FontWeight.bold, fontFamily: 'Montserrat', color: - ThemeProvider.theme.textTheme.bodyText1?.color), + ThemeProvider.theme.textTheme.bodyLarge?.color), ), Padding( padding: const EdgeInsets.only(top: 10.0), @@ -703,7 +701,7 @@ class _RSSFeedHomePageState extends State prefixIcon: Icon( Icons.search, color: ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, size: 25, ), //Add more decoration as you want here @@ -714,28 +712,34 @@ class _RSSFeedHomePageState extends State 'Select Feed', style: TextStyle( color: ThemeProvider - .theme.textTheme.bodyText1?.color), + .theme.textTheme.bodyLarge?.color), ), - icon: Icon( - Icons.keyboard_arrow_down, - color: ThemeProvider - .theme.textTheme.bodyText1?.color, + iconStyleData: IconStyleData( + icon: Icon( + Icons.keyboard_arrow_down, + color: ThemeProvider + .theme.textTheme.bodyLarge?.color, + ), ), - buttonHeight: 58, - buttonPadding: - const EdgeInsets.only(left: 20, right: 10), - dropdownDecoration: BoxDecoration( - boxShadow: [ - BoxShadow( - color: Colors.black12.withOpacity(0.5), - spreadRadius: 5, - blurRadius: 7, - offset: Offset( - 0, 3), // changes position of shadow - ), - ], - borderRadius: BorderRadius.circular(5), - color: ThemeProvider.theme.primaryColorLight, + buttonStyleData: ButtonStyleData( + height: 58, + padding: + const EdgeInsets.only(left: 20, right: 10), + ), + dropdownStyleData: DropdownStyleData( + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: Colors.black12.withOpacity(0.5), + spreadRadius: 5, + blurRadius: 7, + offset: Offset( + 0, 3), // changes position of shadow + ), + ], + borderRadius: BorderRadius.circular(5), + color: ThemeProvider.theme.primaryColorLight, + ), ), items: feedlabelgetter(model.RssFeedsList) .map((item) => DropdownMenuItem( @@ -752,6 +756,7 @@ class _RSSFeedHomePageState extends State if (value == null) { return 'Please select a feed'; } + return null; }, onChanged: (value) { isbrowseFeedsContentSelected = true; @@ -782,7 +787,7 @@ class _RSSFeedHomePageState extends State child: TextField( style: TextStyle( color: ThemeProvider.theme - .textTheme.bodyText1?.color, + .textTheme.bodyLarge?.color, ), controller: searchTermController, decoration: InputDecoration( @@ -792,8 +797,7 @@ class _RSSFeedHomePageState extends State fontFamily: 'Montserrat', color: ThemeProvider .theme - .textTheme - .bodyText1 + .textTheme.bodyLarge ?.color), border: OutlineInputBorder( borderRadius: @@ -848,7 +852,7 @@ class _RSSFeedHomePageState extends State isScrollControlled: true, context: context, backgroundColor: ThemeProvider - .theme.backgroundColor, + .theme.colorScheme.surface, builder: (context) { return ListView( shrinkWrap: true, @@ -882,8 +886,7 @@ class _RSSFeedHomePageState extends State 'Montserrat', color: ThemeProvider .theme - .textTheme - .bodyText1 + .textTheme.bodyLarge ?.color), ), ), @@ -907,14 +910,14 @@ class _RSSFeedHomePageState extends State style: TextStyle( color: - ThemeProvider.theme.textTheme.bodyText1?.color, + ThemeProvider.theme.textTheme.bodyLarge?.color, ), decoration: InputDecoration( prefixIcon: Icon( Icons.link, - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), suffix: GestureDetector( @@ -934,7 +937,7 @@ class _RSSFeedHomePageState extends State labelStyle: TextStyle( fontFamily: 'Montserrat', - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), border: OutlineInputBorder( @@ -982,21 +985,21 @@ class _RSSFeedHomePageState extends State style: TextStyle( color: - ThemeProvider.theme.textTheme.bodyText1?.color, + ThemeProvider.theme.textTheme.bodyLarge?.color, ), decoration: InputDecoration( prefixIcon: Icon( Icons.folder, - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), labelText: 'Destination', hintText: 'Destination', labelStyle: - TextStyle(fontFamily: 'Montserrat', color: ThemeProvider.theme.textTheme.bodyText1?.color), + TextStyle(fontFamily: 'Montserrat', color: ThemeProvider.theme.textTheme.bodyLarge?.color), border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), @@ -1112,7 +1115,7 @@ class _RSSFeedHomePageState extends State shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(14.0), ), - primary: ThemeProvider.theme.primaryColorDark, + backgroundColor: ThemeProvider.theme.primaryColorDark, ), child: Center( @@ -1141,7 +1144,7 @@ class _RSSFeedHomePageState extends State BorderRadius.circular( 5.0), ), - primary: ThemeProvider + backgroundColor: ThemeProvider .theme.primaryColorDark, ), child: Center( @@ -1283,7 +1286,7 @@ class _RSSFeedHomePageState extends State fontWeight: FontWeight.bold, fontFamily: 'Montserrat', color: ThemeProvider - .theme.textTheme.bodyText1?.color), + .theme.textTheme.bodyLarge?.color), ), ), (model.RssRulesList.isNotEmpty) @@ -1529,8 +1532,7 @@ class _RSSFeedHomePageState extends State style: TextStyle( fontSize: 16, fontFamily: 'Montserrat', - color: ThemeProvider.theme.textTheme - .bodyText1?.color), + color: ThemeProvider.theme.textTheme.bodyLarge?.color), ), ), ], @@ -1549,7 +1551,7 @@ class _RSSFeedHomePageState extends State shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(5.0), ), - primary: ThemeProvider.theme.accentColor, + backgroundColor: ThemeProvider.theme.colorScheme.secondary, ), child: Center( child: Text( @@ -1575,15 +1577,14 @@ class _RSSFeedHomePageState extends State controller: labelRulesController, style: TextStyle( color: ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, ), decoration: InputDecoration( labelText: 'Label', hintText: 'Label', labelStyle: TextStyle( fontFamily: 'Montserrat', - color: ThemeProvider.theme.textTheme - .bodyText1?.color), + color: ThemeProvider.theme.textTheme.bodyLarge?.color), border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), @@ -1610,7 +1611,7 @@ class _RSSFeedHomePageState extends State prefixIcon: Icon( Icons.search, color: ThemeProvider.theme - .textTheme.bodyText1?.color, + .textTheme.bodyLarge?.color, size: 25, ), //Add more decoration as you want here @@ -1623,33 +1624,37 @@ class _RSSFeedHomePageState extends State style: TextStyle( color: ThemeProvider .theme - .textTheme - .bodyText1 + .textTheme.bodyLarge ?.color), ), - icon: Icon( - Icons.keyboard_arrow_down, - color: ThemeProvider.theme.textTheme - .bodyText1?.color, + iconStyleData: IconStyleData( + icon: Icon( + Icons.keyboard_arrow_down, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, + ), ), - buttonHeight: 58, - buttonPadding: const EdgeInsets.only( - left: 20, right: 10), - dropdownDecoration: BoxDecoration( - boxShadow: [ - BoxShadow( - color: Colors.black12 - .withOpacity(0.5), - spreadRadius: 5, - blurRadius: 7, - offset: Offset(0, - 3), // changes position of shadow - ), - ], - borderRadius: - BorderRadius.circular(5), - color: ThemeProvider - .theme.primaryColorLight, + buttonStyleData: ButtonStyleData( + height: 58, + padding: const EdgeInsets.only( + left: 20, right: 10), + ), + dropdownStyleData: DropdownStyleData( + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: Colors.black12 + .withOpacity(0.5), + spreadRadius: 5, + blurRadius: 7, + offset: Offset(0, + 3), // changes position of shadow + ), + ], + borderRadius: + BorderRadius.circular(5), + color: ThemeProvider + .theme.primaryColorLight, + ), ), items: feedlabelgetter( model.RssFeedsList) @@ -1668,6 +1673,7 @@ class _RSSFeedHomePageState extends State if (value == null) { return 'Please select a feed'; } + return null; }, onChanged: (value) { applicableFeedSelected = @@ -1701,7 +1707,7 @@ class _RSSFeedHomePageState extends State controller: matchpatternController, style: TextStyle( color: ThemeProvider.theme - .textTheme.bodyText1?.color, + .textTheme.bodyLarge?.color, ), decoration: InputDecoration( labelText: 'Match Pattern', @@ -1710,8 +1716,7 @@ class _RSSFeedHomePageState extends State fontFamily: 'Montserrat', color: ThemeProvider .theme - .textTheme - .bodyText1 + .textTheme.bodyLarge ?.color), border: OutlineInputBorder( borderRadius: @@ -1729,7 +1734,7 @@ class _RSSFeedHomePageState extends State excludepatternController, style: TextStyle( color: ThemeProvider.theme - .textTheme.bodyText1?.color, + .textTheme.bodyLarge?.color, ), decoration: InputDecoration( labelText: 'Exclude Pattern', @@ -1738,8 +1743,7 @@ class _RSSFeedHomePageState extends State fontFamily: 'Montserrat', color: ThemeProvider .theme - .textTheme - .bodyText1 + .textTheme.bodyLarge ?.color), border: OutlineInputBorder( borderRadius: @@ -1758,19 +1762,18 @@ class _RSSFeedHomePageState extends State controller: destinationController, style: TextStyle( color: ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, ), decoration: InputDecoration( prefixIcon: Icon( Icons.folder, color: ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, ), suffixIcon: IconButton( icon: Icon( Icons.search, - color: ThemeProvider.theme.textTheme - .bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), onPressed: () {}, ), @@ -1778,8 +1781,7 @@ class _RSSFeedHomePageState extends State hintText: 'Destination', labelStyle: TextStyle( fontFamily: 'Montserrat', - color: ThemeProvider.theme.textTheme - .bodyText1?.color), + color: ThemeProvider.theme.textTheme.bodyLarge?.color), border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), @@ -1794,19 +1796,18 @@ class _RSSFeedHomePageState extends State controller: tagsController, style: TextStyle( color: ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, ), decoration: InputDecoration( prefixIcon: Icon( Icons.tag, color: ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, ), suffixIcon: IconButton( icon: Icon( Icons.keyboard_arrow_down, - color: ThemeProvider.theme.textTheme - .bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), onPressed: () {}, ), @@ -1814,8 +1815,7 @@ class _RSSFeedHomePageState extends State hintText: 'Tags', labelStyle: TextStyle( fontFamily: 'Montserrat', - color: ThemeProvider.theme.textTheme - .bodyText1?.color), + color: ThemeProvider.theme.textTheme.bodyLarge?.color), border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), @@ -1838,11 +1838,11 @@ class _RSSFeedHomePageState extends State width: 30, child: CircleAvatar( backgroundColor: ThemeProvider - .theme.accentColor, + .theme.colorScheme.secondary, child: Icon( Icons.home_rounded, color: ThemeProvider.theme - .textTheme.bodyText1?.color, + .textTheme.bodyLarge?.color, ), ), ), @@ -1853,8 +1853,7 @@ class _RSSFeedHomePageState extends State fontSize: 13, color: ThemeProvider .theme - .textTheme - .bodyText1 + .textTheme.bodyLarge ?.color), ), labelPadding: EdgeInsets.only( @@ -1883,11 +1882,11 @@ class _RSSFeedHomePageState extends State width: 30, child: CircleAvatar( backgroundColor: ThemeProvider - .theme.accentColor, + .theme.colorScheme.secondary, child: Icon( Icons.download_rounded, color: ThemeProvider.theme - .textTheme.bodyText1?.color, + .textTheme.bodyLarge?.color, ), ), ), @@ -1903,8 +1902,7 @@ class _RSSFeedHomePageState extends State fontSize: 13, color: ThemeProvider .theme - .textTheme - .bodyText1 + .textTheme.bodyLarge ?.color), ), selected: startOnLoad, @@ -1943,7 +1941,7 @@ class _RSSFeedHomePageState extends State borderRadius: BorderRadius.circular(5.0), ), - primary: Colors.red, + backgroundColor: Colors.red, ), child: Center( child: Text( @@ -2015,7 +2013,7 @@ class _RSSFeedHomePageState extends State borderRadius: BorderRadius.circular(5.0), ), - primary: ThemeProvider + backgroundColor: ThemeProvider .theme.primaryColorDark, ), child: Center( diff --git a/lib/Components/add_automatic_torrent.dart b/lib/Components/add_automatic_torrent.dart index 20e97942..114fd35d 100644 --- a/lib/Components/add_automatic_torrent.dart +++ b/lib/Components/add_automatic_torrent.dart @@ -55,7 +55,7 @@ class _AddAutoTorrentState extends State { fontSize: 15, fontWeight: FontWeight.bold, fontFamily: 'Montserrat', - color: ThemeProvider.theme.textTheme.bodyText1?.color), + color: ThemeProvider.theme.textTheme.bodyLarge?.color), ), ), Padding( @@ -92,7 +92,7 @@ class _AddAutoTorrentState extends State { fontSize: 16, fontFamily: 'Montserrat', color: ThemeProvider - .theme.textTheme.bodyText1?.color), + .theme.textTheme.bodyLarge?.color), ), ), ], @@ -114,19 +114,19 @@ class _AddAutoTorrentState extends State { TextField( controller: directoryController, style: TextStyle( - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), decoration: InputDecoration( prefixIcon: Icon( Icons.folder, - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), labelText: 'Destination', hintText: 'Destination', labelStyle: TextStyle( fontFamily: 'Montserrat', color: - ThemeProvider.theme.textTheme.bodyText1?.color), + ThemeProvider.theme.textTheme.bodyLarge?.color), border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), ), @@ -211,7 +211,7 @@ class _AddAutoTorrentState extends State { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(14.0), ), - primary: ThemeProvider.theme.primaryColorDark, + backgroundColor: ThemeProvider.theme.primaryColorDark, ), child: Center( child: Text( diff --git a/lib/Components/add_torrent_sheet.dart b/lib/Components/add_torrent_sheet.dart index 18b05963..045b7a9d 100644 --- a/lib/Components/add_torrent_sheet.dart +++ b/lib/Components/add_torrent_sheet.dart @@ -61,18 +61,18 @@ class _AddTorrentSheetState extends State { key: Key('Destination TextField'), controller: directoryController, style: TextStyle( - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), decoration: InputDecoration( prefixIcon: Icon( Icons.folder, - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), labelText: 'Destination', hintText: 'Destination', labelStyle: TextStyle( fontFamily: 'Montserrat', - color: ThemeProvider.theme.textTheme.bodyText1?.color), + color: ThemeProvider.theme.textTheme.bodyLarge?.color), border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), ), @@ -86,12 +86,12 @@ class _AddTorrentSheetState extends State { key: Key('Torrent magnet link textfield'), controller: magnetUrlController, style: TextStyle( - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), decoration: InputDecoration( prefixIcon: Icon( Icons.link, - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), suffix: GestureDetector( child: Icon(Icons.paste), @@ -108,7 +108,7 @@ class _AddTorrentSheetState extends State { hintText: 'Torrent URL or Magnet Link', labelStyle: TextStyle( fontFamily: 'Montserrat', - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), @@ -202,7 +202,7 @@ class _AddTorrentSheetState extends State { Text( 'or', style: TextStyle( - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, fontSize: 12, fontWeight: FontWeight.w900), ), @@ -287,7 +287,7 @@ class _AddTorrentSheetState extends State { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(14.0), ), - primary: ThemeProvider.theme.primaryColorDark, + backgroundColor: ThemeProvider.theme.primaryColorDark, ), child: Center( child: Text( diff --git a/lib/Components/base_app_bar.dart b/lib/Components/base_app_bar.dart index 9c218f34..8ccece2c 100644 --- a/lib/Components/base_app_bar.dart +++ b/lib/Components/base_app_bar.dart @@ -1,4 +1,3 @@ -import 'package:flood_mobile/Components/RSSFeedButtonWidget.dart'; import 'package:flood_mobile/Constants/theme_provider.dart'; import 'package:flood_mobile/Provider/home_provider.dart'; import 'package:flutter/material.dart'; diff --git a/lib/Components/bottom_floating_menu_button.dart b/lib/Components/bottom_floating_menu_button.dart index 09d3fd60..77756135 100644 --- a/lib/Components/bottom_floating_menu_button.dart +++ b/lib/Components/bottom_floating_menu_button.dart @@ -55,7 +55,7 @@ class _BottomFloatingMenuButtonState extends State children: [ SpeedDialChild( child: Icon(FontAwesomeIcons.solidFile), - backgroundColor: ThemeProvider.theme.textTheme.bodyText1?.color, + backgroundColor: ThemeProvider.theme.textTheme.bodyLarge?.color, foregroundColor: ThemeProvider.theme.primaryColorDark, label: 'Torrent File', labelBackgroundColor: Colors.transparent, @@ -65,7 +65,7 @@ class _BottomFloatingMenuButtonState extends State ) ], labelStyle: TextStyle( - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, fontSize: 14, fontWeight: FontWeight.w800), onTap: () async { @@ -99,7 +99,7 @@ class _BottomFloatingMenuButtonState extends State ), isScrollControlled: true, context: context, - backgroundColor: ThemeProvider.theme.backgroundColor, + backgroundColor: ThemeProvider.theme.colorScheme.surface, builder: (context) { return ListView(shrinkWrap: true, children: [ Padding( @@ -117,7 +117,7 @@ class _BottomFloatingMenuButtonState extends State fontWeight: FontWeight.bold, fontFamily: 'Montserrat', color: ThemeProvider - .theme.textTheme.bodyText1?.color), + .theme.textTheme.bodyLarge?.color), ), ), Padding( @@ -169,8 +169,7 @@ class _BottomFloatingMenuButtonState extends State fontFamily: 'Montserrat', color: ThemeProvider .theme - .textTheme - .bodyText1 + .textTheme.bodyLarge ?.color), ), ), @@ -196,20 +195,19 @@ class _BottomFloatingMenuButtonState extends State controller: directoryController, style: TextStyle( color: ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, ), decoration: InputDecoration( prefixIcon: Icon( Icons.folder, - color: ThemeProvider.theme.textTheme - .bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), labelText: 'Destination', hintText: 'Destination', labelStyle: TextStyle( fontFamily: 'Montserrat', color: ThemeProvider.theme - .textTheme.bodyText1?.color), + .textTheme.bodyLarge?.color), border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), @@ -309,7 +307,7 @@ class _BottomFloatingMenuButtonState extends State borderRadius: BorderRadius.circular(14.0), ), - primary: ThemeProvider + backgroundColor: ThemeProvider .theme.primaryColorDark, ), child: Center( @@ -341,7 +339,7 @@ class _BottomFloatingMenuButtonState extends State ), SpeedDialChild( child: const Icon(FontAwesomeIcons.magnet), - backgroundColor: ThemeProvider.theme.textTheme.bodyText1?.color, + backgroundColor: ThemeProvider.theme.textTheme.bodyLarge?.color, foregroundColor: ThemeProvider.theme.primaryColorDark, label: 'Magnet Link', labelBackgroundColor: Colors.transparent, @@ -351,7 +349,7 @@ class _BottomFloatingMenuButtonState extends State ) ], labelStyle: TextStyle( - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, fontSize: 14, fontWeight: FontWeight.w800), onTap: () { @@ -371,7 +369,7 @@ class _BottomFloatingMenuButtonState extends State ), isScrollControlled: true, context: context, - backgroundColor: ThemeProvider.theme.backgroundColor, + backgroundColor: ThemeProvider.theme.colorScheme.surface, builder: (context) { return ListView(shrinkWrap: true, children: [ Padding( @@ -389,7 +387,7 @@ class _BottomFloatingMenuButtonState extends State fontWeight: FontWeight.bold, fontFamily: 'Montserrat', color: ThemeProvider - .theme.textTheme.bodyText1?.color), + .theme.textTheme.bodyLarge?.color), ), ), Padding( @@ -403,13 +401,13 @@ class _BottomFloatingMenuButtonState extends State controller: magnetUrlController, style: TextStyle( color: ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, ), decoration: InputDecoration( prefixIcon: Icon( Icons.link, color: ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, ), suffix: GestureDetector( child: Icon(Icons.paste), @@ -429,7 +427,7 @@ class _BottomFloatingMenuButtonState extends State labelStyle: TextStyle( fontFamily: 'Montserrat', color: ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, ), border: OutlineInputBorder( borderRadius: @@ -463,20 +461,19 @@ class _BottomFloatingMenuButtonState extends State controller: directoryController, style: TextStyle( color: ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, ), decoration: InputDecoration( prefixIcon: Icon( Icons.folder, color: ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, ), labelText: 'Destination', hintText: 'Destination', labelStyle: TextStyle( fontFamily: 'Montserrat', - color: ThemeProvider.theme.textTheme - .bodyText1?.color), + color: ThemeProvider.theme.textTheme.bodyLarge?.color), border: OutlineInputBorder( borderRadius: BorderRadius.circular(8), @@ -573,7 +570,7 @@ class _BottomFloatingMenuButtonState extends State borderRadius: BorderRadius.circular(14.0), ), - primary: ThemeProvider + backgroundColor: ThemeProvider .theme.primaryColorDark, ), child: Center( diff --git a/lib/Components/custom_dialog_animation.dart b/lib/Components/custom_dialog_animation.dart index 46ce1c28..cc6a9a94 100644 --- a/lib/Components/custom_dialog_animation.dart +++ b/lib/Components/custom_dialog_animation.dart @@ -58,7 +58,7 @@ class CustomDialogAnimation extends StatelessWidget { style: TextStyle( fontSize: 20.0, color: - ThemeProvider.theme.textTheme.bodyText1?.color, + ThemeProvider.theme.textTheme.bodyLarge?.color, fontWeight: FontWeight.bold)), SizedBox(height: 10), Text("To make sure progress notification works smoothly.", @@ -66,7 +66,7 @@ class CustomDialogAnimation extends StatelessWidget { style: TextStyle( fontSize: 14.0, color: ThemeProvider - .theme.textTheme.bodyText1?.color)), + .theme.textTheme.bodyLarge?.color)), SizedBox(height: 10), Text( "This might not be required for certain devices like MI/Redmi, etc as they don't have a rigorous battery optimization.", @@ -169,7 +169,7 @@ class CustomDialogAnimation extends StatelessWidget { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(5.0), ), - primary: ThemeProvider.theme.primaryColorDark, + backgroundColor: ThemeProvider.theme.primaryColorDark, ), child: Container( height: 45, diff --git a/lib/Components/delete_torrent_sheet.dart b/lib/Components/delete_torrent_sheet.dart index 57be0983..317c3836 100644 --- a/lib/Components/delete_torrent_sheet.dart +++ b/lib/Components/delete_torrent_sheet.dart @@ -82,13 +82,13 @@ class _DeleteTorrentSheetState extends State { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(14.0), ), - primary: Colors.grey, + backgroundColor: Colors.grey, ), child: Center( child: Text( "No", style: TextStyle( - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, fontSize: 16, fontWeight: FontWeight.w900, ), @@ -125,13 +125,13 @@ class _DeleteTorrentSheetState extends State { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(14.0), ), - primary: ThemeProvider.theme.primaryColorDark, + backgroundColor: ThemeProvider.theme.primaryColorDark, ), child: Center( child: Text( "Yes", style: TextStyle( - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, fontSize: 16, fontWeight: FontWeight.w900, ), diff --git a/lib/Components/filter_by_status.dart b/lib/Components/filter_by_status.dart index 69980144..87b01ea1 100644 --- a/lib/Components/filter_by_status.dart +++ b/lib/Components/filter_by_status.dart @@ -37,7 +37,7 @@ class _FilterByStatusState extends State { children: [ Text("Filter by status", style: TextStyle( - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, fontSize: 24, fontWeight: FontWeight.bold)), ListTile( @@ -48,7 +48,7 @@ class _FilterByStatusState extends State { filterModel.filterStatus.toString().split(".").last == "all" ? Colors.blue - : ThemeProvider.theme.textTheme.bodyText1?.color, + : ThemeProvider.theme.textTheme.bodyLarge?.color, ), minLeadingWidth: 2, visualDensity: VisualDensity(horizontal: -4, vertical: -2), @@ -63,7 +63,7 @@ class _FilterByStatusState extends State { "all" ? Colors.blue : ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, fontFamily: 'Montserrat', fontSize: 16, fontWeight: FontWeight.normal)), @@ -112,7 +112,7 @@ class _FilterByStatusState extends State { filterModel.filterStatus.toString().split(".").last == "downloading" ? Colors.blue - : ThemeProvider.theme.textTheme.bodyText1?.color, + : ThemeProvider.theme.textTheme.bodyLarge?.color, ), minLeadingWidth: 2, visualDensity: VisualDensity(horizontal: -4, vertical: -2), @@ -127,7 +127,7 @@ class _FilterByStatusState extends State { "downloading" ? Colors.blue : ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, fontFamily: 'Montserrat', fontSize: 16, fontWeight: FontWeight.normal)), @@ -182,7 +182,7 @@ class _FilterByStatusState extends State { filterModel.filterStatus.toString().split(".").last == "seeding" ? Colors.blue - : ThemeProvider.theme.textTheme.bodyText1?.color, + : ThemeProvider.theme.textTheme.bodyLarge?.color, ), minLeadingWidth: 2, visualDensity: VisualDensity(horizontal: -4, vertical: -2), @@ -197,7 +197,7 @@ class _FilterByStatusState extends State { "seeding" ? Colors.blue : ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, fontFamily: 'Montserrat', fontSize: 16, fontWeight: FontWeight.normal)), @@ -251,7 +251,7 @@ class _FilterByStatusState extends State { filterModel.filterStatus.toString().split(".").last == "complete" ? Colors.blue - : ThemeProvider.theme.textTheme.bodyText1?.color, + : ThemeProvider.theme.textTheme.bodyLarge?.color, ), minLeadingWidth: 2, visualDensity: VisualDensity(horizontal: -4, vertical: -2), @@ -266,7 +266,7 @@ class _FilterByStatusState extends State { "complete" ? Colors.blue : ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, fontFamily: 'Montserrat', fontSize: 16, fontWeight: FontWeight.normal)), @@ -320,7 +320,7 @@ class _FilterByStatusState extends State { filterModel.filterStatus.toString().split(".").last == "stopped" ? Colors.blue - : ThemeProvider.theme.textTheme.bodyText1?.color, + : ThemeProvider.theme.textTheme.bodyLarge?.color, ), minLeadingWidth: 2, visualDensity: VisualDensity(horizontal: -4, vertical: -2), @@ -335,7 +335,7 @@ class _FilterByStatusState extends State { "stopped" ? Colors.blue : ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, fontFamily: 'Montserrat', fontSize: 16, fontWeight: FontWeight.normal)), @@ -389,7 +389,7 @@ class _FilterByStatusState extends State { filterModel.filterStatus.toString().split(".").last == "active" ? Colors.blue - : ThemeProvider.theme.textTheme.bodyText1?.color, + : ThemeProvider.theme.textTheme.bodyLarge?.color, ), minLeadingWidth: 2, visualDensity: VisualDensity(horizontal: -4, vertical: -2), @@ -404,7 +404,7 @@ class _FilterByStatusState extends State { "active" ? Colors.blue : ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, fontFamily: 'Montserrat', fontSize: 16, fontWeight: FontWeight.normal)), @@ -458,7 +458,7 @@ class _FilterByStatusState extends State { filterModel.filterStatus.toString().split(".").last == "inactive" ? Colors.blue - : ThemeProvider.theme.textTheme.bodyText1?.color, + : ThemeProvider.theme.textTheme.bodyLarge?.color, ), minLeadingWidth: 2, visualDensity: VisualDensity(horizontal: -4, vertical: -2), @@ -473,7 +473,7 @@ class _FilterByStatusState extends State { "inactive" ? Colors.blue : ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, fontFamily: 'Montserrat', fontSize: 16, fontWeight: FontWeight.normal)), @@ -527,7 +527,7 @@ class _FilterByStatusState extends State { filterModel.filterStatus.toString().split(".").last == "error" ? Colors.blue - : ThemeProvider.theme.textTheme.bodyText1?.color, + : ThemeProvider.theme.textTheme.bodyLarge?.color, ), minLeadingWidth: 2, visualDensity: VisualDensity(horizontal: -4, vertical: -2), @@ -542,7 +542,7 @@ class _FilterByStatusState extends State { "error" ? Colors.blue : ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, fontFamily: 'Montserrat', fontSize: 16, fontWeight: FontWeight.normal)), @@ -593,7 +593,7 @@ class _FilterByStatusState extends State { ), Text("Filter by trackers", style: TextStyle( - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, fontSize: 24, fontWeight: FontWeight.bold)), ListTile( @@ -610,7 +610,7 @@ class _FilterByStatusState extends State { "all" ? Colors.blue : ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, fontFamily: 'Montserrat', fontSize: 16, fontWeight: FontWeight.normal)), @@ -671,7 +671,7 @@ class _FilterByStatusState extends State { .toString() ? Colors.blue : ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, fontFamily: 'Montserrat', fontSize: 16, fontWeight: FontWeight.normal)), diff --git a/lib/Components/logout_alert.dart b/lib/Components/logout_alert.dart index a9f14454..8e84a671 100644 --- a/lib/Components/logout_alert.dart +++ b/lib/Components/logout_alert.dart @@ -24,7 +24,7 @@ class LogOutAlert extends StatelessWidget { 'Are you sure you want to\n Log out ?', textAlign: TextAlign.center, style: TextStyle( - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, fontWeight: FontWeight.bold, fontSize: 20, ), @@ -34,15 +34,15 @@ class LogOutAlert extends StatelessWidget { // No - TextButton TextButton( style: ButtonStyle( - minimumSize: MaterialStateProperty.all( + minimumSize: WidgetStateProperty.all( Size(hp * .160, hp * .059), ), - shape: MaterialStateProperty.all( + shape: WidgetStateProperty.all( RoundedRectangleBorder( borderRadius: BorderRadius.circular(8), ), ), - backgroundColor: MaterialStateProperty.all( + backgroundColor: WidgetStateProperty.all( ThemeProvider.theme.dialogBackgroundColor), ), onPressed: () { @@ -58,16 +58,16 @@ class LogOutAlert extends StatelessWidget { // Yes - TextButton TextButton( style: ButtonStyle( - shape: MaterialStateProperty.all( + shape: WidgetStateProperty.all( RoundedRectangleBorder( borderRadius: BorderRadius.circular(8), ), ), - minimumSize: MaterialStateProperty.all( + minimumSize: WidgetStateProperty.all( Size(hp * .160, hp * .059), ), backgroundColor: - MaterialStateProperty.all(ThemeProvider.theme.primaryColorDark), + WidgetStateProperty.all(ThemeProvider.theme.primaryColorDark), ), onPressed: logoutOnClick, child: Text( diff --git a/lib/Components/nav_drawer_list_tile.dart b/lib/Components/nav_drawer_list_tile.dart index de6aadb7..f202d812 100644 --- a/lib/Components/nav_drawer_list_tile.dart +++ b/lib/Components/nav_drawer_list_tile.dart @@ -18,12 +18,12 @@ class NavDrawerListTile extends StatelessWidget { onTap: onTap, leading: Icon( icon, - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), title: Text( title, style: TextStyle( - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, fontWeight: FontWeight.w400), ), ); diff --git a/lib/Components/notification_popup_dialogue_container.dart b/lib/Components/notification_popup_dialogue_container.dart index 6f13d2d7..635658b9 100644 --- a/lib/Components/notification_popup_dialogue_container.dart +++ b/lib/Components/notification_popup_dialogue_container.dart @@ -17,7 +17,7 @@ Widget notificationPopupDialogueContainer({required BuildContext context}) { child: Text( 'No notifications to display', style: TextStyle( - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), ), ) @@ -94,7 +94,7 @@ class NotificationListTile extends StatelessWidget { textAlign: TextAlign.left, style: TextStyle( fontSize: 16, - color: ThemeProvider.theme.accentColor, + color: ThemeProvider.theme.colorScheme.secondary, fontWeight: FontWeight.bold), ), SizedBox( @@ -113,7 +113,7 @@ class NotificationListTile extends StatelessWidget { textAlign: TextAlign.left, style: TextStyle( fontSize: 14, - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), ), ], diff --git a/lib/Components/onboarding/components/onboard_page.dart b/lib/Components/onboarding/components/onboard_page.dart index fbca6535..2d6fa7cc 100644 --- a/lib/Components/onboarding/components/onboard_page.dart +++ b/lib/Components/onboarding/components/onboard_page.dart @@ -81,7 +81,6 @@ class _OnboardPageState extends State Padding( padding: const EdgeInsets.symmetric(horizontal: 32.0), child: Container( - height: 250, width: double.infinity, child: Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/Components/onboarding/onboarding.dart b/lib/Components/onboarding/onboarding.dart index a252699f..2c4f6e1f 100644 --- a/lib/Components/onboarding/onboarding.dart +++ b/lib/Components/onboarding/onboarding.dart @@ -62,14 +62,16 @@ class _OnboardingState extends State { crossAxisAlignment: CrossAxisAlignment.baseline, textBaseline: TextBaseline.alphabetic, children: [ - Padding( - padding: const EdgeInsets.only(left: 20.0), - child: Text( - 'Explore Flood-Mobile', - style: TextStyle( - fontSize: 22, - fontWeight: FontWeight.bold, - color: colorProvider.color, + Expanded( + child: Padding( + padding: const EdgeInsets.only(left: 20.0), + child: Text( + 'Explore Flood-Mobile', + style: TextStyle( + fontSize: 22, + fontWeight: FontWeight.bold, + color: colorProvider.color, + ), ), ), ), @@ -86,7 +88,7 @@ class _OnboardingState extends State { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(14.0), ), - primary: Color(0xff305067), + backgroundColor: Color(0xff305067), ), child: Text( 'Skip', diff --git a/lib/Components/settings_text_field.dart b/lib/Components/settings_text_field.dart index b787c668..4ca3bf3f 100644 --- a/lib/Components/settings_text_field.dart +++ b/lib/Components/settings_text_field.dart @@ -36,7 +36,7 @@ class _SettingsTextFieldState extends State { TextFormField( controller: widget.controller, style: TextStyle( - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), keyboardType: (widget.isText) ? TextInputType.text : TextInputType.number, @@ -50,7 +50,7 @@ class _SettingsTextFieldState extends State { fontFamily: 'Montserrat', fontSize: 16, fontWeight: FontWeight.w600, - color: ThemeProvider.theme.textTheme.bodyText1?.color), + color: ThemeProvider.theme.textTheme.bodyLarge?.color), enabledBorder: OutlineInputBorder( borderSide: BorderSide( color: ThemeProvider.theme.primaryColorLight, diff --git a/lib/Components/text_size.dart b/lib/Components/text_size.dart index 018432a6..8dc2bded 100644 --- a/lib/Components/text_size.dart +++ b/lib/Components/text_size.dart @@ -12,7 +12,7 @@ class SText extends StatelessWidget { text, style: TextStyle( fontSize: 18, - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, fontWeight: FontWeight.w500), ); } diff --git a/lib/Components/torrent_content_tile.dart b/lib/Components/torrent_content_tile.dart index dbf88277..b3c44ffb 100644 --- a/lib/Components/torrent_content_tile.dart +++ b/lib/Components/torrent_content_tile.dart @@ -151,7 +151,7 @@ class _TorrentFileTileState extends State { Text( filesize(widget.model.sizeBytes), style: TextStyle( - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, fontSize: 12), ), ], @@ -164,7 +164,7 @@ class _TorrentFileTileState extends State { lineHeight: 5.0, percent: widget.model.percentComplete.roundToDouble() / 100, backgroundColor: - ThemeProvider.theme.accentColor.withAlpha(80), + ThemeProvider.theme.colorScheme.secondary.withAlpha(80), progressColor: (widget.model.percentComplete.toStringAsFixed(1) == '100.0') diff --git a/lib/Components/torrent_tile.dart b/lib/Components/torrent_tile.dart index 05049711..b400e6c4 100644 --- a/lib/Components/torrent_tile.dart +++ b/lib/Components/torrent_tile.dart @@ -37,7 +37,7 @@ class _TorrentTileState extends State { ), isScrollControlled: true, context: context, - backgroundColor: ThemeProvider.theme.backgroundColor, + backgroundColor: ThemeProvider.theme.colorScheme.surface, builder: (context) { return DeleteTorrentSheet( torrent: widget.model, @@ -50,14 +50,26 @@ class _TorrentTileState extends State { Widget build(BuildContext context) { double hp = MediaQuery.of(context).size.height; return Slidable( - actionPane: SlidableBehindActionPane(), - actionExtentRatio: 0.25, + endActionPane: ActionPane( + motion: const ScrollMotion(), + extentRatio: 0.25, + children: [ + SlidableAction( + label: 'Delete', + backgroundColor: Colors.redAccent, + icon: Icons.delete, + onPressed: (context) { + deleteTorrent(); + }, + ), + ], + ), child: Padding( padding: const EdgeInsets.symmetric(horizontal: 8.0), child: FocusedMenuHolder( key: Key('Long Press Torrent Tile Menu'), menuBoxDecoration: BoxDecoration( - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, borderRadius: BorderRadius.circular(50)), menuWidth: MediaQuery.of(context).size.width * 0.5, menuItemExtent: 60, @@ -100,7 +112,7 @@ class _TorrentTileState extends State { ), trailingIcon: Icon( Icons.delete, - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), onPressed: () { deleteTorrent(); @@ -124,7 +136,7 @@ class _TorrentTileState extends State { widget.model.name, overflow: TextOverflow.ellipsis, style: TextStyle( - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, fontWeight: FontWeight.bold, ), ), @@ -144,7 +156,7 @@ class _TorrentTileState extends State { widget.model.percentComplete.roundToDouble() / 100, backgroundColor: - ThemeProvider.theme.accentColor.withAlpha(80), + ThemeProvider.theme.colorScheme.secondary.withAlpha(80), progressColor: (widget.model.percentComplete .toStringAsFixed(1) == '100.0') @@ -171,7 +183,7 @@ class _TorrentTileState extends State { key: Key('status widget'), style: TextStyle( color: - ThemeProvider.theme.textTheme.bodyText1?.color, + ThemeProvider.theme.textTheme.bodyLarge?.color, ), ), Text( @@ -186,7 +198,7 @@ class _TorrentTileState extends State { key: Key('eta widget'), style: TextStyle( color: ThemeProvider - .theme.textTheme.bodyText1?.color), + .theme.textTheme.bodyLarge?.color), ), ], ), @@ -200,7 +212,7 @@ class _TorrentTileState extends State { filesize(widget.model.bytesDone.toInt()), style: TextStyle( color: - ThemeProvider.theme.textTheme.bodyText1?.color, + ThemeProvider.theme.textTheme.bodyLarge?.color, ), ), Text(' / '), @@ -208,7 +220,7 @@ class _TorrentTileState extends State { filesize(widget.model.sizeBytes.toInt()), style: TextStyle( color: - ThemeProvider.theme.textTheme.bodyText1?.color, + ThemeProvider.theme.textTheme.bodyLarge?.color, ), ), ], @@ -227,7 +239,7 @@ class _TorrentTileState extends State { height: 30, decoration: BoxDecoration( color: - ThemeProvider.theme.textTheme.bodyText1?.color, + ThemeProvider.theme.textTheme.bodyLarge?.color, borderRadius: BorderRadius.circular(50), ), child: Icon( @@ -246,7 +258,7 @@ class _TorrentTileState extends State { height: 30, decoration: BoxDecoration( color: - ThemeProvider.theme.textTheme.bodyText1?.color, + ThemeProvider.theme.textTheme.bodyLarge?.color, borderRadius: BorderRadius.circular(50), ), child: Icon( @@ -283,7 +295,7 @@ class _TorrentTileState extends State { 'General', style: TextStyle( color: - ThemeProvider.theme.textTheme.bodyText1?.color, + ThemeProvider.theme.textTheme.bodyLarge?.color, fontWeight: FontWeight.bold), ), SizedBox( @@ -339,7 +351,7 @@ class _TorrentTileState extends State { 'Transfer', style: TextStyle( color: - ThemeProvider.theme.textTheme.bodyText1?.color, + ThemeProvider.theme.textTheme.bodyLarge?.color, fontWeight: FontWeight.bold), ), SizedBox( @@ -373,7 +385,7 @@ class _TorrentTileState extends State { 'Torrent', style: TextStyle( color: - ThemeProvider.theme.textTheme.bodyText1?.color, + ThemeProvider.theme.textTheme.bodyLarge?.color, fontWeight: FontWeight.bold), ), SizedBox( @@ -419,7 +431,7 @@ class _TorrentTileState extends State { side: BorderSide( width: 1.0, color: ThemeProvider - .theme.textTheme.bodyText1!.color!, + .theme.textTheme.bodyLarge!.color!, style: BorderStyle.solid, ), ), @@ -429,7 +441,7 @@ class _TorrentTileState extends State { Icon( Icons.file_copy_rounded, color: ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, ), SizedBox( width: 5, @@ -438,7 +450,7 @@ class _TorrentTileState extends State { "Files", style: TextStyle( color: ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, ), ), ], @@ -453,16 +465,6 @@ class _TorrentTileState extends State { ), ), ), - secondaryActions: [ - IconSlideAction( - caption: 'Delete', - color: Colors.redAccent, - icon: Icons.delete, - onTap: () { - deleteTorrent(); - }, - ), - ], ); } } diff --git a/lib/Constants/onboarding_screen_themes/styles.dart b/lib/Constants/onboarding_screen_themes/styles.dart index c126fbcd..f37db302 100644 --- a/lib/Constants/onboarding_screen_themes/styles.dart +++ b/lib/Constants/onboarding_screen_themes/styles.dart @@ -4,25 +4,25 @@ ThemeData appTheme() { return ThemeData( primarySwatch: Colors.blue, textTheme: TextTheme( - subtitle1: TextStyle( + titleMedium: TextStyle( fontFamily: 'Montserrat', fontSize: 24, fontWeight: FontWeight.bold, color: Color(0xFF425398), ), - caption: TextStyle( + bodySmall: TextStyle( fontFamily: 'Montserrat', fontSize: 24, fontWeight: FontWeight.bold, color: Color(0xFF425398), ), - subtitle2: TextStyle( + titleSmall: TextStyle( fontFamily: 'Montserrat', fontSize: 24, fontWeight: FontWeight.bold, color: Color(0xFF425398), ), - bodyText1: TextStyle( + bodyLarge: TextStyle( fontFamily: 'Montserrat', fontSize: 17, fontWeight: FontWeight.normal, diff --git a/lib/Constants/theme_provider.dart b/lib/Constants/theme_provider.dart index 1b6f9e85..70f1ebad 100644 --- a/lib/Constants/theme_provider.dart +++ b/lib/Constants/theme_provider.dart @@ -24,15 +24,19 @@ class MyThemes { primaryColor: Color(0xff0E2537), primaryColorDark: Color(0xff39C481), primaryColorLight: Color(0xff305067), - accentColor: Color(0xff399CF4), - backgroundColor: Color(0xff305067), + colorScheme: ColorScheme.dark( + secondary: Color(0xff399CF4), + surface: Color(0xff305067), + ), scaffoldBackgroundColor: Color(0xff305067), textTheme: TextTheme().apply( displayColor: Colors.white, bodyColor: Colors.white, ), canvasColor: Colors.transparent, - dialogBackgroundColor: Color(0xff2A3342), + dialogTheme: DialogThemeData( + backgroundColor: Color(0xff2A3342), + ), appBarTheme: AppBarTheme( iconTheme: IconThemeData( color: Colors.white, @@ -43,12 +47,16 @@ class MyThemes { brightness: Brightness.light, primaryColor: Colors.white, primaryColorDark: Color(0xff39C481), - backgroundColor: Color(0xff293341), + colorScheme: ColorScheme.light( + secondary: Color(0xff399CF4), + surface: Color(0xff293341), + ), scaffoldBackgroundColor: Colors.grey[300], - accentColor: Color(0xff399CF4), canvasColor: Colors.transparent, primaryColorLight: Colors.grey[100], - dialogBackgroundColor: Color(0xff399CF4), + dialogTheme: DialogThemeData( + backgroundColor: Color(0xff399CF4), + ), textTheme: TextTheme().apply( displayColor: Color(0xff293341), bodyColor: Color(0xff293341), diff --git a/lib/Pages/about_screen.dart b/lib/Pages/about_screen.dart index f70e6d60..a60c7503 100644 --- a/lib/Pages/about_screen.dart +++ b/lib/Pages/about_screen.dart @@ -64,7 +64,7 @@ class _AboutScreenState extends State { 'Flood is a monitoring service for various torrent clients. It\'s a Node.js service that communicates with your favorite torrent client and serves a decent mobile UI for administration. This project is based on the original Flood project.', key: Key('App info text key'), style: TextStyle( - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, fontSize: 15), ), SizedBox( @@ -73,7 +73,7 @@ class _AboutScreenState extends State { Text( 'Feedback', style: TextStyle( - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, fontSize: 20, fontWeight: FontWeight.bold), ), @@ -84,7 +84,7 @@ class _AboutScreenState extends State { 'If you have a specific issue or bug, please file a GitHub issue. Please join the Flood Discord server to discuss feature requests and implementation details.', key: Key('Feedback text key'), style: TextStyle( - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, fontSize: 15), ), SizedBox( @@ -93,7 +93,7 @@ class _AboutScreenState extends State { Text( 'More Information', style: TextStyle( - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, fontSize: 20, fontWeight: FontWeight.bold), ), @@ -104,7 +104,7 @@ class _AboutScreenState extends State { 'Check out the Wiki for more information.', key: Key('More info text key'), style: TextStyle( - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, fontSize: 15), ), SizedBox( diff --git a/lib/Pages/home_screen.dart b/lib/Pages/home_screen.dart index 2c7f05aa..fa7902d2 100644 --- a/lib/Pages/home_screen.dart +++ b/lib/Pages/home_screen.dart @@ -1,7 +1,7 @@ import 'package:awesome_notifications/awesome_notifications.dart'; import 'dart:convert'; import 'dart:io'; -import 'package:badges/badges.dart'; +import 'package:badges/badges.dart' as badges; import 'package:dio/dio.dart'; import 'package:flood_mobile/Api/client_api.dart'; import 'package:flood_mobile/Api/notifications_api.dart'; @@ -25,7 +25,7 @@ import 'package:hidden_drawer_menu/controllers/simple_hidden_drawer_controller.d import 'package:hidden_drawer_menu/simple_hidden_drawer/simple_hidden_drawer.dart'; import 'package:provider/provider.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import 'package:uni_links/uni_links.dart'; +import 'package:app_links/app_links.dart'; import 'package:uri_to_file/uri_to_file.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:flood_mobile/Components/change_theme_button_widget.dart'; @@ -45,6 +45,7 @@ class _HomeScreenState extends State { File? _file; late String base64; late String directoryDefault; + final _appLinks = AppLinks(); @override void initState() { @@ -66,12 +67,14 @@ class _HomeScreenState extends State { } Future _processInitialUri() async { - String? uriString = await getInitialLink(); - _processUriandAddTorrent(uriString); + final uri = await _appLinks.getInitialLink(); + if (uri != null) { + _processUriandAddTorrent(uri.toString()); + } } void _listenForUri() { - linkStream.listen((uriString) => _processUriandAddTorrent(uriString)); + _appLinks.uriLinkStream.listen((uri) => _processUriandAddTorrent(uri.toString())); } Future _processUriandAddTorrent(String? uriString) async { @@ -91,7 +94,7 @@ class _HomeScreenState extends State { ), isScrollControlled: true, context: context, - backgroundColor: ThemeProvider.theme.backgroundColor, + backgroundColor: ThemeProvider.theme.colorScheme.surface, builder: (context) { return AddAutoTorrent( base64: base64, imageBytes: imageBytes, uriString: uriString); @@ -142,7 +145,7 @@ class _HomeScreenState extends State { leading: IconButton( icon: Icon( Icons.menu, - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), onPressed: () { controller.toggle(); @@ -161,16 +164,18 @@ class _HomeScreenState extends State { elevation: 0, actions: [ RSSFeedButtonWidget(), - Badge( + badges.Badge( key: Key('Badge Widget'), - badgeColor: Theme.of(context).accentColor, + badgeStyle: badges.BadgeStyle( + badgeColor: Theme.of(context).colorScheme.secondary, + ), badgeContent: Center( child: Text( homeModel.unreadNotifications.toString(), style: TextStyle(color: Colors.white), ), ), - position: BadgePosition(top: 0, end: 3), + position: badges.BadgePosition.topEnd(top: 0, end: 3), child: IconButton( icon: Icon( Icons.notifications, @@ -341,8 +346,9 @@ class _MenuState extends State { icon: FontAwesomeIcons.github, onTap: () { controller.toggle(); - launch( - 'https://github.com/CCExtractor/Flood_Mobile#usage--screenshots', + launchUrl( + Uri.parse( + 'https://github.com/CCExtractor/Flood_Mobile#usage--screenshots'), ); }, title: 'GitHub'), diff --git a/lib/Pages/login_screen.dart b/lib/Pages/login_screen.dart index c3cf58a2..9d8c9e08 100644 --- a/lib/Pages/login_screen.dart +++ b/lib/Pages/login_screen.dart @@ -60,7 +60,7 @@ class _LoginScreenState extends State { 'Welcome to Flood', style: TextStyle( color: - ThemeProvider.theme.textTheme.bodyText1!.color!, + ThemeProvider.theme.textTheme.bodyLarge!.color!, fontWeight: FontWeight.bold, fontSize: 28), ), @@ -68,7 +68,7 @@ class _LoginScreenState extends State { 'Sign in to your account', style: TextStyle( color: - ThemeProvider.theme.textTheme.bodyText1!.color!, + ThemeProvider.theme.textTheme.bodyLarge!.color!, fontWeight: FontWeight.normal, fontSize: 16), ), @@ -83,20 +83,20 @@ class _LoginScreenState extends State { controller: urlController, style: TextStyle( color: ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, ), decoration: InputDecoration( prefixIcon: Icon( Icons.link, color: ThemeProvider - .theme.textTheme.bodyText1!.color!, + .theme.textTheme.bodyLarge!.color!, ), labelText: 'URL', labelStyle: TextStyle( fontFamily: 'Montserrat', fontWeight: FontWeight.bold, color: ThemeProvider - .theme.textTheme.bodyText1!.color!), + .theme.textTheme.bodyLarge!.color!), focusedBorder: UnderlineInputBorder( borderSide: BorderSide( color: ThemeProvider.theme.primaryColorDark, @@ -105,19 +105,19 @@ class _LoginScreenState extends State { border: UnderlineInputBorder( borderSide: BorderSide( color: ThemeProvider - .theme.textTheme.bodyText1!.color!, + .theme.textTheme.bodyLarge!.color!, ), ), disabledBorder: UnderlineInputBorder( borderSide: BorderSide( color: ThemeProvider - .theme.textTheme.bodyText1!.color!, + .theme.textTheme.bodyLarge!.color!, ), ), enabledBorder: UnderlineInputBorder( borderSide: BorderSide( color: ThemeProvider - .theme.textTheme.bodyText1!.color!, + .theme.textTheme.bodyLarge!.color!, ), ), ), @@ -141,7 +141,7 @@ class _LoginScreenState extends State { icon: Icon( Icons.paste, color: ThemeProvider - .theme.textTheme.bodyText1!.color!, + .theme.textTheme.bodyLarge!.color!, size: 20, ), ), @@ -158,20 +158,20 @@ class _LoginScreenState extends State { controller: usernameController, style: TextStyle( color: - ThemeProvider.theme.textTheme.bodyText1!.color!, + ThemeProvider.theme.textTheme.bodyLarge!.color!, ), decoration: InputDecoration( prefixIcon: Icon( Icons.person, color: ThemeProvider - .theme.textTheme.bodyText1!.color!, + .theme.textTheme.bodyLarge!.color!, ), labelText: 'Username', labelStyle: TextStyle( fontFamily: 'Montserrat', fontWeight: FontWeight.bold, color: ThemeProvider - .theme.textTheme.bodyText1!.color!), + .theme.textTheme.bodyLarge!.color!), focusedBorder: UnderlineInputBorder( borderSide: BorderSide( color: ThemeProvider.theme.primaryColorDark, @@ -180,19 +180,19 @@ class _LoginScreenState extends State { border: UnderlineInputBorder( borderSide: BorderSide( color: ThemeProvider - .theme.textTheme.bodyText1!.color!, + .theme.textTheme.bodyLarge!.color!, ), ), disabledBorder: UnderlineInputBorder( borderSide: BorderSide( color: ThemeProvider - .theme.textTheme.bodyText1!.color!, + .theme.textTheme.bodyLarge!.color!, ), ), enabledBorder: UnderlineInputBorder( borderSide: BorderSide( color: ThemeProvider - .theme.textTheme.bodyText1!.color!, + .theme.textTheme.bodyLarge!.color!, ), ), ), @@ -215,20 +215,20 @@ class _LoginScreenState extends State { controller: passwordController, style: TextStyle( color: ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, ), obscureText: showPass, decoration: InputDecoration( prefixIcon: Icon( Icons.lock_outline, color: ThemeProvider - .theme.textTheme.bodyText1!.color!, + .theme.textTheme.bodyLarge!.color!, ), labelText: 'Password', labelStyle: TextStyle( fontWeight: FontWeight.bold, color: ThemeProvider - .theme.textTheme.bodyText1!.color!), + .theme.textTheme.bodyLarge!.color!), focusedBorder: UnderlineInputBorder( borderSide: BorderSide( color: ThemeProvider.theme.primaryColorDark, @@ -237,19 +237,19 @@ class _LoginScreenState extends State { border: UnderlineInputBorder( borderSide: BorderSide( color: ThemeProvider - .theme.textTheme.bodyText1!.color!, + .theme.textTheme.bodyLarge!.color!, ), ), disabledBorder: UnderlineInputBorder( borderSide: BorderSide( color: ThemeProvider - .theme.textTheme.bodyText1!.color!, + .theme.textTheme.bodyLarge!.color!, ), ), enabledBorder: UnderlineInputBorder( borderSide: BorderSide( color: ThemeProvider - .theme.textTheme.bodyText1!.color!, + .theme.textTheme.bodyLarge!.color!, ), ), ), @@ -274,7 +274,7 @@ class _LoginScreenState extends State { ? Icons.visibility : Icons.visibility_off, color: ThemeProvider - .theme.textTheme.bodyText1!.color!, + .theme.textTheme.bodyLarge!.color!, size: 20, ), ), @@ -360,7 +360,7 @@ class _LoginScreenState extends State { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(14.0), ), - primary: ThemeProvider.theme.primaryColorDark, + backgroundColor: ThemeProvider.theme.primaryColorDark, ), child: Center( child: Text( @@ -382,8 +382,9 @@ class _LoginScreenState extends State { FontAwesomeIcons.github, ), onPressed: () { - launch( - 'https://github.com/CCExtractor/Flood_Mobile#usage--screenshots', + launchUrl( + Uri.parse( + 'https://github.com/CCExtractor/Flood_Mobile#usage--screenshots'), ); }, iconSize: hp * 0.05, diff --git a/lib/Pages/settings_screen.dart b/lib/Pages/settings_screen.dart index 28309ddc..8c8f3d8d 100644 --- a/lib/Pages/settings_screen.dart +++ b/lib/Pages/settings_screen.dart @@ -400,7 +400,7 @@ class SpeedLimitSection extends StatelessWidget { ), icon: Icon( Icons.arrow_drop_down, - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, size: 25, ), hint: Text("Download Speed"), @@ -413,7 +413,7 @@ class SpeedLimitSection extends StatelessWidget { )) .toList(), onChanged: setDownSpeed, - value: TransferSpeedManager.valToSpeedMap[ + initialValue: TransferSpeedManager.valToSpeedMap[ model.clientSettings.throttleGlobalDownSpeed] ?? 'Unlimited', ), @@ -438,14 +438,14 @@ class SpeedLimitSection extends StatelessWidget { child: Center( child: DropdownButtonFormField( key: Key('Upload Speed Dropdown'), - dropdownColor: ThemeProvider.theme.backgroundColor, + dropdownColor: ThemeProvider.theme.colorScheme.surface, isExpanded: true, decoration: InputDecoration( enabledBorder: InputBorder.none, ), icon: Icon( Icons.arrow_drop_down, - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, size: 25, ), hint: Text("Upload Speed"), @@ -458,7 +458,7 @@ class SpeedLimitSection extends StatelessWidget { )) .toList(), onChanged: setUpSpeed, - value: TransferSpeedManager.valToSpeedMap[ + initialValue: TransferSpeedManager.valToSpeedMap[ model.clientSettings.throttleGlobalUpSpeed] ?? 'Unlimited', ), @@ -485,14 +485,14 @@ class SpeedLimitSection extends StatelessWidget { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8), ), - primary: ThemeProvider.theme.accentColor, + backgroundColor: ThemeProvider.theme.colorScheme.secondary, ), child: Center( child: Text( "Set", style: TextStyle( color: ThemeProvider - .theme.textTheme.bodyText1?.color, + .theme.textTheme.bodyLarge?.color, fontSize: 16, fontWeight: FontWeight.w600), ), @@ -567,14 +567,18 @@ class AuthenticationSection extends StatelessWidget { SText(text: 'Add User'), SizedBox(height: 25), SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'Username', labelText: 'Username', controller: usernameController, ), SizedBox(height: 20), SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'Password', labelText: 'Password', controller: passwordController, @@ -619,7 +623,7 @@ class AuthenticationSection extends StatelessWidget { isExpanded: true, value: client, icon: const Icon(Icons.keyboard_arrow_down_rounded), - dropdownColor: ThemeProvider.theme.backgroundColor, + dropdownColor: ThemeProvider.theme.colorScheme.surface, elevation: 16, onChanged: setClient, underline: Container(), @@ -686,7 +690,9 @@ class AuthenticationSection extends StatelessWidget { SizedBox(height: 20), (socket) ? SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'eg. ~/.local/share/rtorrent', labelText: 'Path', controller: pathController, @@ -694,14 +700,18 @@ class AuthenticationSection extends StatelessWidget { : Column( children: [ SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'Host or IP', labelText: 'Host', controller: hostController, ), SizedBox(height: 20), SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'Port', labelText: 'Port', controller: portController, @@ -713,21 +723,27 @@ class AuthenticationSection extends StatelessWidget { : Column( children: [ SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'Client Username', labelText: 'Username', controller: clientUsernameController, ), SizedBox(height: 20), SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'Client Password', labelText: 'Password', controller: clientPasswordController, ), SizedBox(height: 20), SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'eg. http://localhost:8080/', labelText: 'URL', controller: urlController, @@ -776,7 +792,7 @@ class AuthenticationSection extends StatelessWidget { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8), ), - primary: ThemeProvider.theme.accentColor, + backgroundColor: ThemeProvider.theme.colorScheme.secondary, ), child: Center( child: Text( @@ -835,7 +851,9 @@ class ResourceSection extends StatelessWidget { SText(text: 'Disk'), SizedBox(height: 25), SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'Default Download Directory', labelText: 'Default Download Directory', controller: defaultDownloadDirectoryController, @@ -845,7 +863,9 @@ class ResourceSection extends StatelessWidget { children: [ Expanded( child: SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'Maximum Open Files', labelText: 'Maximum Open Files', controller: maximumOpenFilesController, @@ -864,7 +884,7 @@ class ResourceSection extends StatelessWidget { ), CheckboxListTile( key: Key('Verify Hash checkbox'), - activeColor: ThemeProvider.theme.backgroundColor, + activeColor: ThemeProvider.theme.colorScheme.surface, tileColor: ThemeProvider.theme.primaryColorLight, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8), @@ -885,7 +905,9 @@ class ResourceSection extends StatelessWidget { SText(text: 'Memory'), SizedBox(height: 25), SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'Max Memory Usage (MB)', labelText: 'Max Memory Usage (MB)', controller: maxMemoryUsageController, @@ -956,7 +978,9 @@ class ConnectivitySection extends StatelessWidget { SText(text: 'Incoming Connections'), SizedBox(height: 15), SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'Port Range', labelText: 'Port Range', isText: false, @@ -1004,7 +1028,9 @@ class ConnectivitySection extends StatelessWidget { ), SizedBox(height: 22), SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'Maximum HTTP Connections', labelText: 'Maximum HTTP Connections', isText: false, @@ -1014,7 +1040,9 @@ class ConnectivitySection extends StatelessWidget { SText(text: 'Decentralized Peer Discovery'), SizedBox(height: 15), SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'DHT Port', labelText: 'DHT Port', controller: dhtPortController, @@ -1072,7 +1100,9 @@ class ConnectivitySection extends StatelessWidget { SText(text: 'Peers'), SizedBox(height: 15), SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'Minimum Peers', labelText: 'Minimum Peers', controller: minimumPeerController, @@ -1080,7 +1110,9 @@ class ConnectivitySection extends StatelessWidget { ), SizedBox(height: 22), SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'Maximum Peers', labelText: 'Maximum Peers', controller: maximumPeerController, @@ -1088,7 +1120,9 @@ class ConnectivitySection extends StatelessWidget { ), SizedBox(height: 22), SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'Minimum Peers Seeding', labelText: 'Minimum Peers Seeding', controller: minimumPeerSeedingController, @@ -1096,7 +1130,9 @@ class ConnectivitySection extends StatelessWidget { ), SizedBox(height: 22), SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'Maximum Peers Seeding', labelText: 'Maximum Peers Seeding', controller: maximumPeerSeedingController, @@ -1104,7 +1140,9 @@ class ConnectivitySection extends StatelessWidget { ), SizedBox(height: 22), SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'Peers Desired', labelText: 'Peers Desired', controller: peerDesiredController, @@ -1155,7 +1193,9 @@ class BandwidthSection extends StatelessWidget { SText(text: 'Transfer Rate Throttles'), SizedBox(height: 15), SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'Global Download Rate Throttle', labelText: 'Global Download Rate Throttle', isText: false, @@ -1163,7 +1203,9 @@ class BandwidthSection extends StatelessWidget { ), SizedBox(height: 22), SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'Global Upload Rate Throttle', labelText: 'Global Upload Rate Throttle', isText: false, @@ -1173,7 +1215,9 @@ class BandwidthSection extends StatelessWidget { SText(text: 'Slot Availability'), SizedBox(height: 15), SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'Upload Slots Per Torrent', labelText: 'Upload Slots Per Torrent', isText: false, @@ -1181,7 +1225,9 @@ class BandwidthSection extends StatelessWidget { ), SizedBox(height: 22), SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'Upload Slots Global', labelText: 'Upload Slots Global', controller: uploadSlotGlobalController, @@ -1189,7 +1235,9 @@ class BandwidthSection extends StatelessWidget { ), SizedBox(height: 22), SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'Download Slots Per Torrent', labelText: 'Download Slots Per Torrent', controller: downloadSlotPerTorrentController, @@ -1197,7 +1245,9 @@ class BandwidthSection extends StatelessWidget { ), SizedBox(height: 22), SettingsTextField( - validator: (value) {}, + validator: (value) { + return null; + }, hintText: 'Download Slots Global', labelText: 'Download Slots Global', controller: downloadSlotGlobalController, diff --git a/lib/Pages/torrent_content_screen.dart b/lib/Pages/torrent_content_screen.dart index e3d945b0..190206b9 100644 --- a/lib/Pages/torrent_content_screen.dart +++ b/lib/Pages/torrent_content_screen.dart @@ -63,7 +63,7 @@ class _TorrentContentScreenState extends State { child: IconButton( icon: Icon( Icons.add, - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), onPressed: () { model.setSelectionMode(newIsSelected: false); @@ -77,7 +77,7 @@ class _TorrentContentScreenState extends State { IconButton( icon: Icon( Icons.download_rounded, - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), onPressed: () async { try { @@ -122,10 +122,10 @@ class _TorrentContentScreenState extends State { }, ), PopupMenuButton( - color: ThemeProvider.theme.backgroundColor, + color: ThemeProvider.theme.colorScheme.surface, icon: Icon( Icons.more_vert, - color: ThemeProvider.theme.textTheme.bodyText1?.color, + color: ThemeProvider.theme.textTheme.bodyLarge?.color, ), onSelected: (value) { if (value == 'High Priority') { @@ -211,7 +211,7 @@ class _TorrentContentScreenState extends State { 'Files', style: GoogleFonts.notoSans( color: - ThemeProvider.theme.textTheme.bodyText1?.color, + ThemeProvider.theme.textTheme.bodyLarge?.color, fontWeight: FontWeight.bold, fontSize: 30, ), diff --git a/lib/Pages/torrent_screen.dart b/lib/Pages/torrent_screen.dart index 5c348b85..d48dde1c 100644 --- a/lib/Pages/torrent_screen.dart +++ b/lib/Pages/torrent_screen.dart @@ -110,14 +110,14 @@ class _TorrentScreenState extends State { Icon( Icons.arrow_downward_rounded, color: - ThemeProvider.theme.accentColor, + ThemeProvider.theme.colorScheme.secondary, size: 25, ), Text( model.downSpeed, style: TextStyle( color: ThemeProvider - .theme.accentColor, + .theme.colorScheme.secondary, fontSize: 20, fontWeight: FontWeight.bold, ), @@ -203,7 +203,7 @@ class _TorrentScreenState extends State { isScrollControlled: true, context: context, backgroundColor: ThemeProvider - .theme.backgroundColor, + .theme.colorScheme.surface, builder: (context) { return FilterByStatus(); }, diff --git a/lib/Pages/video_stream_screen.dart b/lib/Pages/video_stream_screen.dart index 3fa5c12f..f235b2ca 100644 --- a/lib/Pages/video_stream_screen.dart +++ b/lib/Pages/video_stream_screen.dart @@ -39,7 +39,7 @@ class _VideoStreamScreenState extends State { ApiProvider.playTorrentVideo + '${widget.args.hash}/contents/${widget.args.index}/data'; - videoPlayerController = VideoPlayerController.network(url, httpHeaders: { + videoPlayerController = VideoPlayerController.networkUrl(Uri.parse(url), httpHeaders: { 'Cookie': Provider.of(context, listen: false).token }) ..initialize().then((_) { diff --git a/lib/Provider/sse_provider.dart b/lib/Provider/sse_provider.dart index 4269b682..736fc1e1 100644 --- a/lib/Provider/sse_provider.dart +++ b/lib/Provider/sse_provider.dart @@ -4,6 +4,7 @@ import 'package:flood_mobile/Constants/event_names.dart'; import 'package:flood_mobile/Provider/user_detail_provider.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter_client_sse/flutter_client_sse.dart'; +import 'package:flutter_client_sse/constants/sse_request_type_enum.dart'; import 'package:provider/provider.dart'; import 'home_provider.dart'; @@ -18,9 +19,13 @@ class SSEProvider extends ChangeNotifier { void listenToSSE(BuildContext context) { SSEClient.subscribeToSSE( - Provider.of(context).baseUrl + - ApiProvider.eventsStreamUrl, - Provider.of(context).token) + method: SSERequestType.GET, + url: Provider.of(context).baseUrl + + ApiProvider.eventsStreamUrl, + header: { + 'Cookie': Provider.of(context).token, + }, + ) .listen((event) { if (event.id != '' && event.data != '' && event.event != '') { // print('Id: ' + event.id!); diff --git a/lib/Route/route_generator.dart b/lib/Route/route_generator.dart index 3e19522a..711fce80 100644 --- a/lib/Route/route_generator.dart +++ b/lib/Route/route_generator.dart @@ -1,6 +1,5 @@ import 'package:flood_mobile/Pages/home_screen.dart'; import 'package:flood_mobile/Pages/login_screen.dart'; -import 'package:flood_mobile/Pages/onboarding_main_page.dart'; import 'package:flood_mobile/Pages/splash_screen.dart'; import 'package:flood_mobile/Pages/torrent_content_screen.dart'; import 'package:flood_mobile/Pages/video_stream_screen.dart'; diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 26b2804b..b7df486c 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,16 +5,24 @@ import FlutterMacOS import Foundation +import app_links import awesome_notifications -import path_provider_macos -import shared_preferences_macos +import file_picker +import package_info_plus +import path_provider_foundation +import shared_preferences_foundation import url_launcher_macos -import wakelock_macos +import video_player_avfoundation +import wakelock_plus func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + AppLinksMacosPlugin.register(with: registry.registrar(forPlugin: "AppLinksMacosPlugin")) AwesomeNotificationsPlugin.register(with: registry.registrar(forPlugin: "AwesomeNotificationsPlugin")) + FilePickerPlugin.register(with: registry.registrar(forPlugin: "FilePickerPlugin")) + FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) - WakelockMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockMacosPlugin")) + FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin")) + WakelockPlusMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockPlusMacosPlugin")) } diff --git a/packages/flutter_client_sse/lib/flutter_client_sse.dart b/packages/flutter_client_sse/lib/flutter_client_sse.dart index 8760c41c..42d781e1 100644 --- a/packages/flutter_client_sse/lib/flutter_client_sse.dart +++ b/packages/flutter_client_sse/lib/flutter_client_sse.dart @@ -2,12 +2,11 @@ library flutter_client_sse; import 'dart:async'; import 'dart:convert'; -import 'package:flutter/cupertino.dart'; import 'package:http/http.dart' as http; part 'sse_event_model.dart'; class SSEClient { - static http.Client _client; + static http.Client? _client; static Stream subscribeToSSE(String url, String token) { //Regex to be used var lineRegex = RegExp(r'^([^:]*)(?::)?(?: )?(.*)?$'); @@ -24,7 +23,7 @@ class SSEClient { request.headers["Cache-Control"] = "no-cache"; request.headers["Accept"] = "text/event-stream"; request.headers["Cookie"] = token; - Future response = _client.send(request); + Future response = _client!.send(request); //Listening to the response as a stream response.asStream().listen((data) { @@ -38,9 +37,10 @@ class SSEClient { currentSSEModel = SSEModel(data: '', id: '', event: ''); return; } - Match match = lineRegex.firstMatch(dataLine); + RegExpMatch? match = lineRegex.firstMatch(dataLine); + if (match == null) return; var field = match.group(1); - if (field.isEmpty) { + if (field == null || field.isEmpty) { return; } var value = ''; @@ -79,6 +79,6 @@ class SSEClient { } static void unsubscribeFromSSE() { - _client.close(); + _client?.close(); } } diff --git a/packages/flutter_client_sse/lib/sse_event_model.dart b/packages/flutter_client_sse/lib/sse_event_model.dart index 537516bc..50ce7895 100644 --- a/packages/flutter_client_sse/lib/sse_event_model.dart +++ b/packages/flutter_client_sse/lib/sse_event_model.dart @@ -4,7 +4,7 @@ class SSEModel { String id = ''; String event = ''; String data = ''; - SSEModel({@required this.data, @required this.id, @required this.event}); + SSEModel({required this.data, required this.id, required this.event}); SSEModel.fromData(String data) { id = data.split("\n")[0].split('id:')[1]; event = data.split("\n")[1].split('event:')[1]; diff --git a/pubspec.lock b/pubspec.lock index 77d63344..93dbfff0 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,289 +5,362 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.dartlang.org" + sha256: e6dd5609f0945ef6bc72bdcd28af6eeabefef99a6d62b7790320133789217759 + url: "https://pub.dev" source: hosted version: "38.0.0" analyzer: dependency: "direct overridden" description: name: analyzer - url: "https://pub.dartlang.org" + sha256: c71e50e4e1674c9ffeaf053bb8d38e4a03b94d08af6a27fb352f3ff569becc44 + url: "https://pub.dev" source: hosted version: "3.4.1" + app_links: + dependency: "direct main" + description: + name: app_links + sha256: "5f88447519add627fe1cbcab4fd1da3d4fed15b9baf29f28b22535c95ecee3e8" + url: "https://pub.dev" + source: hosted + version: "6.4.1" + app_links_linux: + dependency: transitive + description: + name: app_links_linux + sha256: f5f7173a78609f3dfd4c2ff2c95bd559ab43c80a87dc6a095921d96c05688c81 + url: "https://pub.dev" + source: hosted + version: "1.0.3" + app_links_platform_interface: + dependency: transitive + description: + name: app_links_platform_interface + sha256: "05f5379577c513b534a29ddea68176a4d4802c46180ee8e2e966257158772a3f" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + app_links_web: + dependency: transitive + description: + name: app_links_web + sha256: af060ed76183f9e2b87510a9480e56a5352b6c249778d07bd2c95fc35632a555 + url: "https://pub.dev" + source: hosted + version: "1.0.4" args: dependency: transitive description: name: args - url: "https://pub.dartlang.org" + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 + url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.7.0" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.13.0" awesome_notifications: dependency: "direct main" description: name: awesome_notifications - url: "https://pub.dartlang.org" + sha256: "0d5fa4457f2ba4e536adc3ef6af709cdcecf4a05a1f3035981e9afa2f899b2a8" + url: "https://pub.dev" source: hosted - version: "0.7.4+1" + version: "0.10.1" badges: dependency: "direct main" description: name: badges - url: "https://pub.dartlang.org" + sha256: a7b6bbd60dce418df0db3058b53f9d083c22cdb5132a052145dc267494df0b84 + url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "3.1.2" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" bottom_inset_observer: dependency: transitive description: name: bottom_inset_observer - url: "https://pub.dartlang.org" + sha256: cbfb01e0e07cc4922052701786d5e607765a6f54e1844f41061abf8744519a7d + url: "https://pub.dev" source: hosted version: "3.1.0" bottom_sheet: dependency: "direct main" description: name: bottom_sheet - url: "https://pub.dartlang.org" + sha256: efd28f52357d23e1c01eaeb45466b407f1e29318305bd6d10baf814fda18bd7e + url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.4" build: dependency: transitive description: name: build - url: "https://pub.dartlang.org" + sha256: c1668065e9ba04752570ad7e038288559d1e2ca5c6d0131c0f5f55e39e777413 + url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "4.0.3" build_config: dependency: transitive description: name: build_config - url: "https://pub.dartlang.org" + sha256: "4f64382b97504dc2fcdf487d5aae33418e08b4703fc21249e4db6d804a4d0187" + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.2.0" build_daemon: dependency: transitive description: name: build_daemon - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - build_resolvers: - dependency: transitive - description: - name: build_resolvers - url: "https://pub.dartlang.org" + sha256: bf05f6e12cfea92d3c09308d7bcdab1906cd8a179b023269eed00c071004b957 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "4.1.1" build_runner: dependency: "direct dev" description: name: build_runner - url: "https://pub.dartlang.org" + sha256: "110c56ef29b5eb367b4d17fc79375fa8c18a6cd7acd92c05bb3986c17a079057" + url: "https://pub.dev" source: hosted - version: "2.1.11" - build_runner_core: - dependency: transitive - description: - name: build_runner_core - url: "https://pub.dartlang.org" - source: hosted - version: "7.2.2" + version: "2.10.4" built_collection: dependency: transitive description: name: built_collection - url: "https://pub.dartlang.org" + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" source: hosted version: "5.1.1" built_value: dependency: transitive description: name: built_value - url: "https://pub.dartlang.org" + sha256: "426cf75afdb23aa74bd4e471704de3f9393f3c7b04c1e2d9c6f1073ae0b8b139" + url: "https://pub.dev" source: hosted - version: "8.4.2" + version: "8.12.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.4.0" checked_yaml: dependency: transitive description: name: checked_yaml - url: "https://pub.dartlang.org" + sha256: "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f" + url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.4" chewie: dependency: "direct main" description: name: chewie - url: "https://pub.dartlang.org" + sha256: "44bcfc5f0dfd1de290c87c9d86a61308b3282a70b63435d5557cfd60f54a69ca" + url: "https://pub.dev" source: hosted - version: "1.2.2" + version: "1.13.0" clipboard: dependency: "direct main" description: name: clipboard - url: "https://pub.dartlang.org" + sha256: "619f4e9e946cfd637ac994f49af356bb590ab88b0c4aded03204ee566fd69d9e" + url: "https://pub.dev" source: hosted - version: "0.1.3" + version: "3.0.8" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" code_builder: dependency: transitive description: name: code_builder - url: "https://pub.dartlang.org" + sha256: "11654819532ba94c34de52ff5feb52bd81cba1de00ef2ed622fd50295f9d4243" + url: "https://pub.dev" source: hosted - version: "4.3.0" + version: "4.11.0" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.19.1" contained_tab_bar_view: dependency: "direct main" description: name: contained_tab_bar_view - url: "https://pub.dartlang.org" + sha256: "87e35f47992764e45ab6205493f2f90c1e3fac4ad84f2b2285b73414727b756e" + url: "https://pub.dev" source: hosted version: "0.8.0" container_tab_indicator: dependency: transitive description: name: container_tab_indicator - url: "https://pub.dartlang.org" + sha256: b0bdd73bb495c31c5711cefa363511b10bb3ebcfc007b603a2599401ebe6b2d9 + url: "https://pub.dev" source: hosted version: "0.3.0" convert: dependency: transitive description: name: convert - url: "https://pub.dartlang.org" + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" source: hosted - version: "3.1.1" - coverage: + version: "3.1.2" + cross_file: dependency: transitive description: - name: coverage - url: "https://pub.dartlang.org" + name: cross_file + sha256: "701dcfc06da0882883a2657c445103380e53e647060ad8d9dfb710c100996608" + url: "https://pub.dev" source: hosted - version: "1.6.1" + version: "0.3.5+1" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf + url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.7" csslib: dependency: transitive description: name: csslib - url: "https://pub.dartlang.org" + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" + url: "https://pub.dev" source: hosted - version: "0.17.2" + version: "1.0.2" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.dartlang.org" + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.8" dart_style: dependency: transitive description: name: dart_style - url: "https://pub.dartlang.org" + sha256: a9c30492da18ff84efe2422ba2d319a89942d93e58eb0b73d32abe822ef54b7b + url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "3.1.3" + dbus: + dependency: transitive + description: + name: dbus + sha256: "79e0c23480ff85dc68de79e2cd6334add97e48f7f4865d17686dd6ea81a47e8c" + url: "https://pub.dev" + source: hosted + version: "0.7.11" dio: dependency: "direct main" description: name: dio - url: "https://pub.dartlang.org" + sha256: d90ee57923d1828ac14e492ca49440f65477f4bb1263575900be731a3dac66a9 + url: "https://pub.dev" + source: hosted + version: "5.9.0" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "7586e476d70caecaf1686d21eee7247ea43ef5c345eab9e0cc3583ff13378d78" + url: "https://pub.dev" source: hosted - version: "4.0.6" + version: "2.1.1" dropdown_button2: dependency: "direct main" description: name: dropdown_button2 - url: "https://pub.dartlang.org" + sha256: b0fe8d49a030315e9eef6c7ac84ca964250155a6224d491c1365061bc974a9e1 + url: "https://pub.dev" source: hosted - version: "1.9.2" + version: "2.3.9" duration: dependency: "direct main" description: name: duration - url: "https://pub.dartlang.org" + sha256: "13e5d20723c9c1dde8fb318cf86716d10ce294734e81e44ae1a817f3ae714501" + url: "https://pub.dev" source: hosted - version: "3.0.12" + version: "4.0.3" expansion_tile_card: dependency: "direct main" description: name: expansion_tile_card - url: "https://pub.dartlang.org" + sha256: "27ce4cb518f00e21d0f2309aaa6462b26b148e93cee2029a73088cecf42b1eb0" + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "3.0.0" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" + url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.3" ffi: dependency: transitive description: name: ffi - url: "https://pub.dartlang.org" + sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" + url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.1.4" file: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.1" file_picker: dependency: "direct main" description: name: file_picker - url: "https://pub.dartlang.org" + sha256: "7872545770c277236fd32b022767576c562ba28366204ff1a5628853cf8f2200" + url: "https://pub.dev" source: hosted - version: "3.0.4" + version: "10.3.7" fixnum: dependency: transitive description: name: fixnum - url: "https://pub.dartlang.org" + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.1.1" flutter: dependency: "direct main" description: flutter @@ -297,93 +370,106 @@ packages: dependency: "direct main" description: name: flutter_client_sse - url: "https://pub.dartlang.org" + sha256: "4ce0297206473dfc064b255fe086713240002e149f52519bd48c21423e4aa5d2" + url: "https://pub.dev" source: hosted - version: "0.1.0" + version: "2.0.3" flutter_downloader: dependency: "direct main" description: name: flutter_downloader - url: "https://pub.dartlang.org" + sha256: "93a9ddbd561f8a3f5483b4189453fba145a0a1014a88143c96a966296b78a118" + url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.12.0" flutter_keyboard_visibility: dependency: "direct main" description: name: flutter_keyboard_visibility - url: "https://pub.dartlang.org" + sha256: "4983655c26ab5b959252ee204c2fffa4afeb4413cd030455194ec0caa3b8e7cb" + url: "https://pub.dev" source: hosted - version: "5.4.0" + version: "5.4.1" flutter_keyboard_visibility_linux: dependency: transitive description: name: flutter_keyboard_visibility_linux - url: "https://pub.dartlang.org" + sha256: "6fba7cd9bb033b6ddd8c2beb4c99ad02d728f1e6e6d9b9446667398b2ac39f08" + url: "https://pub.dev" source: hosted version: "1.0.0" flutter_keyboard_visibility_macos: dependency: transitive description: name: flutter_keyboard_visibility_macos - url: "https://pub.dartlang.org" + sha256: c5c49b16fff453dfdafdc16f26bdd8fb8d55812a1d50b0ce25fc8d9f2e53d086 + url: "https://pub.dev" source: hosted version: "1.0.0" flutter_keyboard_visibility_platform_interface: dependency: transitive description: name: flutter_keyboard_visibility_platform_interface - url: "https://pub.dartlang.org" + sha256: e43a89845873f7be10cb3884345ceb9aebf00a659f479d1c8f4293fcb37022a4 + url: "https://pub.dev" source: hosted version: "2.0.0" flutter_keyboard_visibility_web: dependency: transitive description: name: flutter_keyboard_visibility_web - url: "https://pub.dartlang.org" + sha256: d3771a2e752880c79203f8d80658401d0c998e4183edca05a149f5098ce6e3d1 + url: "https://pub.dev" source: hosted version: "2.0.0" flutter_keyboard_visibility_windows: dependency: transitive description: name: flutter_keyboard_visibility_windows - url: "https://pub.dartlang.org" + sha256: fc4b0f0b6be9b93ae527f3d527fb56ee2d918cd88bbca438c478af7bcfd0ef73 + url: "https://pub.dev" source: hosted version: "1.0.0" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - url: "https://pub.dartlang.org" + sha256: ee8068e0e1cd16c4a82714119918efdeed33b3ba7772c54b5d094ab53f9b7fd1 + url: "https://pub.dev" source: hosted - version: "2.0.7" + version: "2.0.33" flutter_slidable: dependency: "direct main" description: name: flutter_slidable - url: "https://pub.dartlang.org" + sha256: ea369262929d3cc6ebf9d8a00c196127966f117fe433a5e5cb47fb08008ca203 + url: "https://pub.dev" source: hosted - version: "0.6.0" + version: "4.0.3" flutter_speed_dial: dependency: "direct main" description: name: flutter_speed_dial - url: "https://pub.dartlang.org" + sha256: "698a037274a66dbae8697c265440e6acb6ab6cae9ac5f95c749e7944d8f28d41" + url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "7.0.0" flutter_spinkit: dependency: "direct main" description: name: flutter_spinkit - url: "https://pub.dartlang.org" + sha256: "77850df57c00dc218bfe96071d576a8babec24cf58b2ed121c83cca4a2fdce7f" + url: "https://pub.dev" source: hosted - version: "5.1.0" + version: "5.2.2" flutter_svg: dependency: "direct main" description: name: flutter_svg - url: "https://pub.dartlang.org" + sha256: "87fbd7c534435b6c5d9d98b01e1fd527812b82e68ddd8bd35fc45ed0fa8f0a95" + url: "https://pub.dev" source: hosted - version: "0.22.0" + version: "2.2.3" flutter_test: dependency: "direct dev" description: flutter @@ -398,777 +484,839 @@ packages: dependency: "direct main" description: name: fluttertoast - url: "https://pub.dartlang.org" + sha256: "144ddd74d49c865eba47abe31cbc746c7b311c82d6c32e571fd73c4264b740e2" + url: "https://pub.dev" source: hosted - version: "8.1.1" + version: "9.0.0" focused_menu: dependency: "direct main" description: name: focused_menu - url: "https://pub.dartlang.org" + sha256: bd06bf580a8573e100571a1d9bc27c2200a38681de30eeda96246df1eac06749 + url: "https://pub.dev" source: hosted version: "1.0.5" font_awesome_flutter: dependency: "direct main" description: name: font_awesome_flutter - url: "https://pub.dartlang.org" + sha256: b9011df3a1fa02993630b8fb83526368cf2206a711259830325bab2f1d2a4eb0 + url: "https://pub.dev" source: hosted - version: "9.2.0" - frontend_server_client: - dependency: transitive - description: - name: frontend_server_client - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.3" + version: "10.12.0" glob: dependency: transitive description: name: glob - url: "https://pub.dartlang.org" + sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de + url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.3" google_fonts: dependency: "direct main" description: name: google_fonts - url: "https://pub.dartlang.org" + sha256: ba03d03bcaa2f6cb7bd920e3b5027181db75ab524f8891c8bc3aa603885b8055 + url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "6.3.3" graphs: dependency: transitive description: name: graphs - url: "https://pub.dartlang.org" + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" + url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.2" + gtk: + dependency: transitive + description: + name: gtk + sha256: e8ce9ca4b1df106e4d72dad201d345ea1a036cc12c360f1a7d5a758f78ffa42c + url: "https://pub.dev" + source: hosted + version: "2.1.0" hidden_drawer_menu: dependency: "direct main" description: name: hidden_drawer_menu - url: "https://pub.dartlang.org" + sha256: "74ca9c4ffc45c05dec3fd4e12cd6bd0851029d909ee5531bf31244b7160f96b9" + url: "https://pub.dev" source: hosted version: "3.0.1" html: dependency: transitive description: name: html - url: "https://pub.dartlang.org" + sha256: "6d1264f2dffa1b1101c25a91dff0dc2daee4c18e87cd8538729773c073dbf602" + url: "https://pub.dev" source: hosted - version: "0.15.1" + version: "0.15.6" http: dependency: "direct main" description: name: http - url: "https://pub.dartlang.org" + sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412" + url: "https://pub.dev" source: hosted - version: "0.13.5" + version: "1.6.0" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.dartlang.org" + sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 + url: "https://pub.dev" source: hosted - version: "3.2.1" + version: "3.2.2" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" + url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.1.2" intl: dependency: transitive description: name: intl - url: "https://pub.dartlang.org" + sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5" + url: "https://pub.dev" source: hosted - version: "0.17.0" + version: "0.20.2" io: dependency: transitive description: name: io - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.3" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b + url: "https://pub.dev" source: hosted - version: "0.6.4" + version: "1.0.5" json_annotation: dependency: "direct main" description: name: json_annotation - url: "https://pub.dartlang.org" + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "4.9.0" json_patch: dependency: "direct main" description: name: json_patch - url: "https://pub.dartlang.org" + sha256: "1b0c2a9cae3bb4e59b8fbc7705b223ee43a6eb08ffc0fbe9b7ecb45957059341" + url: "https://pub.dev" source: hosted version: "3.0.0" json_serializable: dependency: "direct dev" description: name: json_serializable - url: "https://pub.dartlang.org" + sha256: "6b253f7851cf1626a05c8b49c792e04a14897349798c03798137f2b5f7e0b5b1" + url: "https://pub.dev" + source: hosted + version: "6.11.3" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" + url: "https://pub.dev" + source: hosted + version: "11.0.2" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" + url: "https://pub.dev" source: hosted - version: "5.0.2" + version: "3.0.10" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" + url: "https://pub.dev" + source: hosted + version: "3.0.2" loading_overlay: dependency: "direct main" description: name: loading_overlay - url: "https://pub.dartlang.org" + sha256: "3f8ac2ceec2188ebb4704bd3036c9425f726fb4b67edab9f20db894274eef7dc" + url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.0" logging: dependency: transitive description: name: logging - url: "https://pub.dartlang.org" + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.3.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.17" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.11.1" meta: dependency: "direct overridden" description: name: meta - url: "https://pub.dartlang.org" + sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.17.0" mime: dependency: transitive description: name: mime - url: "https://pub.dartlang.org" + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" + url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "2.0.0" mocktail: dependency: "direct dev" description: name: mocktail - url: "https://pub.dartlang.org" + sha256: "890df3f9688106f25755f26b1c60589a92b3ab91a22b8b224947ad041bf172d8" + url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "1.0.4" nested: dependency: transitive description: name: nested - url: "https://pub.dartlang.org" + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" source: hosted version: "1.0.0" - node_preamble: - dependency: transitive - description: - name: node_preamble - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" optimize_battery: dependency: "direct main" description: name: optimize_battery - url: "https://pub.dartlang.org" + sha256: "4f0f974addbe54d3a705c1da5bf3a4bdae39502b1b2d2a17f9da1e558a34a4f8" + url: "https://pub.dev" source: hosted version: "0.0.4" package_config: dependency: transitive description: name: package_config - url: "https://pub.dartlang.org" + sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc + url: "https://pub.dev" source: hosted - version: "2.1.0" - path: + version: "2.2.0" + package_info_plus: dependency: transitive description: - name: path - url: "https://pub.dartlang.org" + name: package_info_plus + sha256: f69da0d3189a4b4ceaeb1a3defb0f329b3b352517f52bed4290f83d4f06bc08d + url: "https://pub.dev" source: hosted - version: "1.8.2" - path_drawing: + version: "9.0.0" + package_info_plus_platform_interface: + dependency: transitive + description: + name: package_info_plus_platform_interface + sha256: "202a487f08836a592a6bd4f901ac69b3a8f146af552bbd14407b6b41e1c3f086" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + path: dependency: transitive description: - name: path_drawing - url: "https://pub.dartlang.org" + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" source: hosted - version: "0.5.1+1" + version: "1.9.1" path_parsing: dependency: transitive description: name: path_parsing - url: "https://pub.dartlang.org" + sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" + url: "https://pub.dev" source: hosted - version: "0.2.1" + version: "1.1.0" path_provider: dependency: "direct main" description: name: path_provider - url: "https://pub.dartlang.org" + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" + url: "https://pub.dev" source: hosted - version: "2.0.11" + version: "2.1.5" path_provider_android: dependency: transitive description: name: path_provider_android - url: "https://pub.dartlang.org" + sha256: f2c65e21139ce2c3dad46922be8272bb5963516045659e71bb16e151c93b580e + url: "https://pub.dev" source: hosted - version: "2.0.22" - path_provider_ios: + version: "2.2.22" + path_provider_foundation: dependency: transitive description: - name: path_provider_ios - url: "https://pub.dartlang.org" + name: path_provider_foundation + sha256: "6d13aece7b3f5c5a9731eaf553ff9dcbc2eff41087fd2df587fd0fed9a3eb0c4" + url: "https://pub.dev" source: hosted - version: "2.0.11" + version: "2.5.1" path_provider_linux: dependency: transitive description: name: path_provider_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.7" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" source: hosted - version: "2.0.6" + version: "2.2.1" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - url: "https://pub.dartlang.org" + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" source: hosted - version: "2.0.5" + version: "2.1.2" path_provider_windows: dependency: transitive description: name: path_provider_windows - url: "https://pub.dartlang.org" + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.3.0" percent_indicator: dependency: "direct main" description: name: percent_indicator - url: "https://pub.dartlang.org" + sha256: "157d29133bbc6ecb11f923d36e7960a96a3f28837549a20b65e5135729f0f9fd" + url: "https://pub.dev" source: hosted - version: "3.4.0" + version: "4.2.5" permission_handler: dependency: "direct main" description: name: permission_handler - url: "https://pub.dartlang.org" + sha256: bc917da36261b00137bbc8896bf1482169cd76f866282368948f032c8c1caae1 + url: "https://pub.dev" + source: hosted + version: "12.0.1" + permission_handler_android: + dependency: transitive + description: + name: permission_handler_android + sha256: "1e3bc410ca1bf84662104b100eb126e066cb55791b7451307f9708d4007350e6" + url: "https://pub.dev" + source: hosted + version: "13.0.1" + permission_handler_apple: + dependency: transitive + description: + name: permission_handler_apple + sha256: f000131e755c54cf4d84a5d8bd6e4149e262cc31c5a8b1d698de1ac85fa41023 + url: "https://pub.dev" + source: hosted + version: "9.4.7" + permission_handler_html: + dependency: transitive + description: + name: permission_handler_html + sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24" + url: "https://pub.dev" source: hosted - version: "8.3.0" + version: "0.1.3+5" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface - url: "https://pub.dartlang.org" + sha256: eb99b295153abce5d683cac8c02e22faab63e50679b937fa1bf67d58bb282878 + url: "https://pub.dev" source: hosted - version: "3.9.0" + version: "4.3.0" + permission_handler_windows: + dependency: transitive + description: + name: permission_handler_windows + sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" + url: "https://pub.dev" + source: hosted + version: "0.2.1" petitparser: dependency: transitive description: name: petitparser - url: "https://pub.dartlang.org" + sha256: "1a97266a94f7350d30ae522c0af07890c70b8e62c71e8e3920d1db4d23c057d1" + url: "https://pub.dev" source: hosted - version: "5.1.0" + version: "7.0.1" platform: dependency: transitive description: name: platform - url: "https://pub.dartlang.org" + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.6" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.8" pool: dependency: transitive description: name: pool - url: "https://pub.dartlang.org" - source: hosted - version: "1.5.1" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" + sha256: "978783255c543aa3586a1b3c21f6e9d720eb315376a915872c61ef8b5c20177d" + url: "https://pub.dev" source: hosted - version: "4.2.4" + version: "1.5.2" provider: dependency: "direct main" description: name: provider - url: "https://pub.dartlang.org" + sha256: "4e82183fa20e5ca25703ead7e05de9e4cceed1fbd1eadc1ac3cb6f565a09f272" + url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "6.1.5+1" pub_semver: dependency: transitive description: name: pub_semver - url: "https://pub.dartlang.org" + sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" + url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.2.0" pubspec_parse: dependency: transitive description: name: pubspec_parse - url: "https://pub.dartlang.org" + sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.5.0" pull_to_reveal: dependency: "direct main" description: name: pull_to_reveal - url: "https://pub.dartlang.org" + sha256: cfe9d0922e6564b01c580a18d5a2317cf45bcccc94f1ab9a94c4efa4d0c22841 + url: "https://pub.dev" source: hosted version: "0.0.3-nullsafety.0" shared_preferences: dependency: "direct main" description: name: shared_preferences - url: "https://pub.dartlang.org" + sha256: "2939ae520c9024cb197fc20dee269cd8cdbf564c8b5746374ec6cacdc5169e64" + url: "https://pub.dev" source: hosted - version: "2.0.15" + version: "2.5.4" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - url: "https://pub.dartlang.org" + sha256: "83af5c682796c0f7719c2bbf74792d113e40ae97981b8f266fa84574573556bc" + url: "https://pub.dev" source: hosted - version: "2.0.14" - shared_preferences_ios: + version: "2.4.18" + shared_preferences_foundation: dependency: transitive description: - name: shared_preferences_ios - url: "https://pub.dartlang.org" + name: shared_preferences_foundation + sha256: "4e7eaffc2b17ba398759f1151415869a34771ba11ebbccd1b0145472a619a64f" + url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.5.6" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" - shared_preferences_macos: - dependency: transitive - description: - name: shared_preferences_macos - url: "https://pub.dartlang.org" + sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" + url: "https://pub.dev" source: hosted - version: "2.0.4" + version: "2.4.1" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - url: "https://pub.dartlang.org" + sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.4.1" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - url: "https://pub.dartlang.org" + sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019 + url: "https://pub.dev" source: hosted - version: "2.0.4" + version: "2.4.3" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - url: "https://pub.dartlang.org" + sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" + url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.4.1" shelf: dependency: transitive description: name: shelf - url: "https://pub.dartlang.org" + sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 + url: "https://pub.dev" source: hosted - version: "1.4.0" - shelf_packages_handler: - dependency: transitive - description: - name: shelf_packages_handler - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" - shelf_static: - dependency: transitive - description: - name: shelf_static - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.1" + version: "1.4.2" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.dartlang.org" + sha256: "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925" + url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "3.0.0" sky_engine: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" smooth_page_indicator: dependency: "direct main" description: name: smooth_page_indicator - url: "https://pub.dartlang.org" + sha256: "4b497e9898d095de40d246db943371183fa7482492a88391cfa8415ef94d57ba" + url: "https://pub.dev" source: hosted - version: "1.0.0+2" + version: "2.0.1" source_gen: dependency: transitive description: name: source_gen - url: "https://pub.dartlang.org" + sha256: "07b277b67e0096c45196cbddddf2d8c6ffc49342e88bf31d460ce04605ddac75" + url: "https://pub.dev" source: hosted - version: "1.2.6" + version: "4.1.1" source_helper: dependency: transitive description: name: source_helper - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.3" - source_map_stack_trace: - dependency: transitive - description: - name: source_map_stack_trace - url: "https://pub.dartlang.org" + sha256: e82b1996c63da42aa3e6a34cc1ec17427728a1baf72ed017717a5669a7123f0d + url: "https://pub.dev" source: hosted - version: "2.1.1" - source_maps: - dependency: transitive - description: - name: source_maps - url: "https://pub.dartlang.org" - source: hosted - version: "0.10.11" + version: "1.3.9" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.10.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.1" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.4" stream_transform: dependency: transitive description: name: stream_transform - url: "https://pub.dartlang.org" + sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.4.1" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" source: hosted - version: "1.2.1" - test: - dependency: transitive - description: - name: test - url: "https://pub.dartlang.org" - source: hosted - version: "1.21.4" + version: "1.2.2" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" + url: "https://pub.dev" source: hosted - version: "0.4.12" - test_core: - dependency: transitive - description: - name: test_core - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.16" - timing: - dependency: transitive - description: - name: timing - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" + version: "0.7.6" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - uni_links: - dependency: "direct main" - description: - name: uni_links - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.1" - uni_links_platform_interface: - dependency: transitive - description: - name: uni_links_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - uni_links_web: - dependency: transitive - description: - name: uni_links_web - url: "https://pub.dartlang.org" + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" source: hosted - version: "0.1.0" + version: "1.4.0" uri_to_file: dependency: "direct main" description: name: uri_to_file - url: "https://pub.dartlang.org" + sha256: cbbb38f975d22311efacc9a53cdcb806708606666d8092314b81c5cb7983b700 + url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "1.0.0" url_launcher: dependency: "direct main" description: name: url_launcher - url: "https://pub.dartlang.org" + sha256: f6a7e5c4835bb4e3026a04793a4199ca2d14c739ec378fdfe23fc8075d0439f8 + url: "https://pub.dev" source: hosted - version: "6.1.7" + version: "6.3.2" url_launcher_android: dependency: transitive description: name: url_launcher_android - url: "https://pub.dartlang.org" + sha256: "767344bf3063897b5cf0db830e94f904528e6dd50a6dfaf839f0abf509009611" + url: "https://pub.dev" source: hosted - version: "6.0.22" + version: "6.3.28" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - url: "https://pub.dartlang.org" + sha256: cfde38aa257dae62ffe79c87fab20165dfdf6988c1d31b58ebf59b9106062aad + url: "https://pub.dev" source: hosted - version: "6.0.17" + version: "6.3.6" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - url: "https://pub.dartlang.org" + sha256: d5e14138b3bc193a0f63c10a53c94b91d399df0512b1f29b94a043db7482384a + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.2.2" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - url: "https://pub.dartlang.org" + sha256: "368adf46f71ad3c21b8f06614adb38346f193f3a59ba8fe9a2fd74133070ba18" + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.2.5" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface - url: "https://pub.dartlang.org" + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.3.2" url_launcher_web: dependency: transitive description: name: url_launcher_web - url: "https://pub.dartlang.org" + sha256: "4bd2b7b4dc4d4d0b94e5babfffbca8eac1a126c7f3d6ecbc1a11013faa3abba2" + url: "https://pub.dev" source: hosted - version: "2.0.13" + version: "2.4.1" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - url: "https://pub.dartlang.org" + sha256: "712c70ab1b99744ff066053cbe3e80c73332b38d46e5e945c98689b2e66fc15f" + url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.1.5" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6 + url: "https://pub.dev" + source: hosted + version: "1.1.19" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146" + url: "https://pub.dev" + source: hosted + version: "1.1.13" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: d354a7ec6931e6047785f4db12a1f61ec3d43b207fc0790f863818543f8ff0dc + url: "https://pub.dev" + source: hosted + version: "1.1.19" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.2.0" video_player: dependency: "direct main" description: name: video_player - url: "https://pub.dartlang.org" + sha256: "096bc28ce10d131be80dfb00c223024eb0fba301315a406728ab43dd99c45bdf" + url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.10.1" video_player_android: dependency: transitive description: name: video_player_android - url: "https://pub.dartlang.org" + sha256: d74b66f283afff135d5be0ceccca2ca74dff7df1e9b1eaca6bd4699875d3ae60 + url: "https://pub.dev" source: hosted - version: "2.3.9" + version: "2.8.22" video_player_avfoundation: dependency: transitive description: name: video_player_avfoundation - url: "https://pub.dartlang.org" + sha256: e4d33b79a064498c6eb3a6a492b6a5012573d4943c28d566caf1a6c0840fe78d + url: "https://pub.dev" source: hosted - version: "2.3.7" + version: "2.8.8" video_player_platform_interface: dependency: transitive description: name: video_player_platform_interface - url: "https://pub.dartlang.org" + sha256: "57c5d73173f76d801129d0531c2774052c5a7c11ccb962f1830630decd9f24ec" + url: "https://pub.dev" source: hosted - version: "5.1.4" + version: "6.6.0" video_player_web: dependency: transitive description: name: video_player_web - url: "https://pub.dartlang.org" + sha256: "9f3c00be2ef9b76a95d94ac5119fb843dca6f2c69e6c9968f6f2b6c9e7afbdeb" + url: "https://pub.dev" source: hosted - version: "2.0.12" + version: "2.4.0" vm_service: dependency: transitive description: name: vm_service - url: "https://pub.dartlang.org" - source: hosted - version: "9.4.0" - wakelock: - dependency: transitive - description: - name: wakelock - url: "https://pub.dartlang.org" + sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60" + url: "https://pub.dev" source: hosted - version: "0.5.6" - wakelock_macos: + version: "15.0.2" + wakelock_plus: dependency: transitive description: - name: wakelock_macos - url: "https://pub.dartlang.org" + name: wakelock_plus + sha256: "9296d40c9adbedaba95d1e704f4e0b434be446e2792948d0e4aa977048104228" + url: "https://pub.dev" source: hosted - version: "0.4.0" - wakelock_platform_interface: + version: "1.4.0" + wakelock_plus_platform_interface: dependency: transitive description: - name: wakelock_platform_interface - url: "https://pub.dartlang.org" + name: wakelock_plus_platform_interface + sha256: "036deb14cd62f558ca3b73006d52ce049fabcdcb2eddfe0bf0fe4e8a943b5cf2" + url: "https://pub.dev" source: hosted - version: "0.3.0" - wakelock_web: + version: "1.3.0" + watcher: dependency: transitive description: - name: wakelock_web - url: "https://pub.dartlang.org" + name: watcher + sha256: f52385d4f73589977c80797e60fe51014f7f2b957b5e9a62c3f6ada439889249 + url: "https://pub.dev" source: hosted - version: "0.4.0" - wakelock_windows: + version: "1.2.0" + web: dependency: transitive description: - name: wakelock_windows - url: "https://pub.dartlang.org" + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + url: "https://pub.dev" source: hosted - version: "0.2.1" - watcher: + version: "1.1.1" + web_socket: dependency: transitive description: - name: watcher - url: "https://pub.dartlang.org" + name: web_socket + sha256: "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c" + url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.0.1" web_socket_channel: dependency: transitive description: name: web_socket_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.0" - webkit_inspection_protocol: - dependency: transitive - description: - name: webkit_inspection_protocol - url: "https://pub.dartlang.org" + sha256: d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8 + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "3.0.3" win32: dependency: transitive description: name: win32 - url: "https://pub.dartlang.org" + sha256: d7cb55e04cd34096cd3a79b3330245f54cb96a370a1c27adb3c84b917de8b08e + url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "5.15.0" xdg_directories: dependency: transitive description: name: xdg_directories - url: "https://pub.dartlang.org" + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" + url: "https://pub.dev" source: hosted - version: "0.2.0+2" + version: "1.1.0" xml: dependency: transitive description: name: xml - url: "https://pub.dartlang.org" + sha256: "971043b3a0d3da28727e40ed3e0b5d18b742fa5a68665cca88e74b7876d5e025" + url: "https://pub.dev" source: hosted - version: "5.4.1" + version: "6.6.1" yaml: dependency: transitive description: name: yaml - url: "https://pub.dartlang.org" + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce + url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.3" sdks: - dart: ">=2.18.0 <3.0.0" - flutter: ">=3.0.0" + dart: ">=3.9.0 <4.0.0" + flutter: ">=3.35.0" diff --git a/pubspec.yaml b/pubspec.yaml index 7b32b30f..2237c475 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=2.14.0 <3.0.0" + sdk: ">=3.0.0 <4.0.0" dependencies: @@ -29,46 +29,46 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. # flutter pub run build_runner watch --delete-conflicting-outputs - dropdown_button2: ^1.5.2 - clipboard: ^0.1.3 + dropdown_button2: ^2.3.9 + clipboard: ^3.0.8 cupertino_icons: ^1.0.3 chewie: ^1.2.2 - dio: ^4.0.0 - duration: ^3.0.6 - expansion_tile_card: ^2.0.0 + dio: ^5.9.0 + duration: ^4.0.3 + expansion_tile_card: ^3.0.0 flutter_keyboard_visibility: ^5.0.3 - flutter_svg: ^0.22.0 - flutter_slidable: ^0.6.0 + flutter_svg: ^2.2.3 + flutter_slidable: ^4.0.3 flutter_spinkit: ^5.0.0 - fluttertoast: ^8.0.8 - file_picker: ^3.0.4 + fluttertoast: ^9.0.0 + file_picker: ^10.3.7 focused_menu: ^1.0.5 - font_awesome_flutter: ^9.1.0 - google_fonts: ^2.1.0 + font_awesome_flutter: ^10.12.0 + google_fonts: ^6.3.3 hidden_drawer_menu: ^3.0.0 - http: ^0.13.3 + http: ^1.6.0 json_annotation: ^4.1.0 json_patch: ^3.0.0 - loading_overlay: ^0.3.0 - percent_indicator: ^3.0.1 - provider: ^5.0.0 + loading_overlay: ^0.5.0 + percent_indicator: ^4.2.5 + provider: ^6.1.5+1 pull_to_reveal: ^0.0.3-nullsafety.0 shared_preferences: ^2.0.6 video_player: ^2.1.12 - badges: ^2.0.1 + badges: ^3.1.2 flutter_downloader: ^1.6.1 path_provider: ^2.0.2 - permission_handler: ^8.1.4+2 - flutter_client_sse: ^0.1.0 + permission_handler: ^12.0.1 + flutter_client_sse: ^2.0.3 url_launcher: ^6.0.12 optimize_battery: ^0.0.4 - smooth_page_indicator: ^1.0.0+2 - awesome_notifications: ^0.7.0-beta.1 - uri_to_file: ^0.2.0 - bottom_sheet: ^3.1.1 + smooth_page_indicator: ^2.0.1 + awesome_notifications: ^0.10.1 + uri_to_file: ^1.0.0 + bottom_sheet: ^4.0.4 contained_tab_bar_view: ^0.8.0 - uni_links: ^0.5.1 - flutter_speed_dial: ^6.0.0 + flutter_speed_dial: ^7.0.0 + app_links: ^6.4.1 # git: # url: https://github.com/pratikbaid3/flutter_client_sse # path: @@ -80,10 +80,10 @@ dependency_overrides: dev_dependencies: build_runner: ^2.1.1 - json_serializable: ^5.0.0 + json_serializable: ^6.8.0 flutter_test: sdk: flutter - mocktail: ^0.3.0 + mocktail: ^1.0.4 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/test/onboarding_widget_test.dart b/test/onboarding_widget_test.dart new file mode 100644 index 00000000..81ea4012 --- /dev/null +++ b/test/onboarding_widget_test.dart @@ -0,0 +1,48 @@ +import 'package:flood_mobile/Pages/onboarding_main_page.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Onboarding screen renders without overflow', (WidgetTester tester) async { + // Set a specific screen size to reproduce the issue if possible, + // or just a standard size. + // The overflow was 18 pixels on bottom of a 250px container, + // so it likely happens on any screen size where the text wraps enough. + + // We'll use a standard phone size. + tester.view.physicalSize = Size(1080, 1920); + tester.view.devicePixelRatio = 3.0; + + await tester.pumpWidget(MaterialApp( + home: OnboardingMainPage(), + )); + + // Check for the first page text + expect(find.text('INSIGHT'), findsOneWidget); + expect(find.text('FLOOD-MOBILE'), findsOneWidget); + + // Verify no overflow errors + expect(tester.takeException(), isNull); + + // Swipe to next page + await tester.drag(find.byType(PageView), Offset(-500, 0)); + await tester.pumpAndSettle(); + + // Check for second page text + expect(find.text('CORE'), findsOneWidget); + + // Swipe to third page + await tester.drag(find.byType(PageView), Offset(-500, 0)); + await tester.pumpAndSettle(); + + // Check for third page text + expect(find.text('SOME MORE'), findsOneWidget); + + // Verify no overflow errors again + expect(tester.takeException(), isNull); + + // Reset view + addTearDown(tester.view.resetPhysicalSize); + addTearDown(tester.view.resetDevicePixelRatio); + }); +} diff --git a/test/settings_screen_widget_test.dart b/test/settings_screen_widget_test.dart index 7fbd2c94..5a3ebd00 100644 --- a/test/settings_screen_widget_test.dart +++ b/test/settings_screen_widget_test.dart @@ -1,4 +1,3 @@ -import 'dart:math'; import 'package:flood_mobile/Components/settings_text_field.dart'; import 'package:flood_mobile/Constants/theme_provider.dart';