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