From e693246d527addca69b06c9f556498c99a69ba4c Mon Sep 17 00:00:00 2001 From: Yazeed AlKhalaf Date: Thu, 8 Aug 2024 13:42:26 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=9A=80=20upgrade=20SDK,=20deps,?= =?UTF-8?q?=20and=20fix=20any=20deprecations=20in=20the=20way=20+=20FVM=20?= =?UTF-8?q?(#18)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add fvm * upgrade all deps to latest possible, and do any required changes - path_provider, shared_preferences, url_launcher doesn't support iOS 11 anymore - freezed was left at 2.5.2 instead of 2.5.3 because of analyzer version issues * fix almost all deprecations and things that got removed * disable impeller on android * setup firebase with flutterfire, and run it on iOS * disable m3 * fix android not working and follow docs of flutter_local_notifications for both iOS and Android * remove a launch.json in android folder related to dart :D * migrate to the declarative way of gradle plugin https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply * make android work after recreating the folder!!! * remove PopScope, it doesn't work as expected and not needed --- .fvmrc | 3 + .gitignore | 12 +- .metadata | 13 +- .vscode/settings.json | 11 +- README.md | 45 +++- android/.gitignore | 2 + android/app/build.gradle | 77 +++--- android/app/src/debug/AndroidManifest.xml | 8 +- android/app/src/main/AndroidManifest.xml | 77 ++++-- .../main/kotlin/com/noor/noor/MainActivity.kt | 3 +- .../app/src/main/res/values-night/styles.xml | 4 +- android/app/src/main/res/values/styles.xml | 17 +- android/app/src/profile/AndroidManifest.xml | 8 +- android/build.gradle | 20 +- android/gradle.properties | 15 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- android/launch.json | 18 -- android/settings.gradle | 22 +- android/settings_aar.gradle | 1 - devtools_options.yaml | 3 + ios/Flutter/AppFrameworkInfo.plist | 2 +- ios/Podfile | 2 +- ios/Podfile.lock | 147 ++++++----- ios/Runner.xcodeproj/project.pbxproj | 20 +- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- ios/Runner/AppDelegate.swift | 5 + lib/app/app.dart | 20 +- lib/components/adaptive_icon.dart | 3 +- lib/components/add_dialog.dart | 2 +- lib/components/alert_dialog.dart | 2 +- lib/components/allah_names_title.dart | 2 +- lib/components/athkar_title.dart | 2 +- lib/components/bottom_nav.dart | 4 +- lib/components/card_template.dart | 5 +- lib/components/card_text.dart | 13 +- lib/components/copy_action.dart | 3 +- lib/components/custom_scroll_bhaviour.dart | 9 - lib/components/dialog_button.dart | 2 +- lib/components/dialog_text_input.dart | 2 +- lib/components/glowing_stars.dart | 4 +- lib/components/list_item.dart | 2 +- lib/exports/components.dart | 15 +- lib/exports/constants.dart | 8 +- lib/main.dart | 10 +- lib/models/theme.dart | 5 +- lib/pages/root.dart | 15 +- .../tabs/page_1_home/ad3yah_expanded.dart | 9 +- .../page_1_home/allah_names_expanded.dart | 17 +- .../tabs/page_1_home/athkar_expanded.dart | 13 +- lib/pages/tabs/page_1_home/home.dart | 185 +++++++------- lib/pages/tabs/page_1_home/my_ad3yah.dart | 15 +- lib/pages/tabs/page_2_fav.dart | 17 +- .../page_3_counter/counter_list_view.dart | 15 +- .../page_3_counter/counter_main_view.dart | 19 +- lib/pages/tabs/page_4_settings.dart | 48 ++-- lib/theme/custom_colors.dart | 30 +++ lib/{constants => theme}/theme.dart | 79 +++--- lib/utils/build_context.dart | 8 + lib/utils/to_color_filter.dart | 10 + pubspec.lock | 232 +++++++++++------- pubspec.yaml | 30 +-- 61 files changed, 772 insertions(+), 622 deletions(-) create mode 100644 .fvmrc delete mode 100644 android/launch.json delete mode 100644 android/settings_aar.gradle create mode 100644 devtools_options.yaml delete mode 100644 lib/components/custom_scroll_bhaviour.dart create mode 100644 lib/theme/custom_colors.dart rename lib/{constants => theme}/theme.dart (73%) create mode 100644 lib/utils/build_context.dart create mode 100644 lib/utils/to_color_filter.dart diff --git a/.fvmrc b/.fvmrc new file mode 100644 index 0000000..4efffa7 --- /dev/null +++ b/.fvmrc @@ -0,0 +1,3 @@ +{ + "flutter": "3.22.1" +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index dec2ecb..da1e5b0 100644 --- a/.gitignore +++ b/.gitignore @@ -60,14 +60,12 @@ assets/icons/* /assets/icons/bottom-nav/* !/assets/icons/bottom-nav/p_* - /assets/icons/fav/* !/assets/icons/fav/p_* /assets/icons/settings/* !/assets/icons/settings/p_* - /assets/images/* !/assets/images/p_* @@ -88,10 +86,16 @@ assets/icons/* !/assets/images/home-cards/light/p_* !/assets/images/home-cards/dark/p_* - # Exclude some assets !assets/json/ # Google Service File android/app/google-services.json -GoogleService-Info.plist \ No newline at end of file +GoogleService-Info.plist + +# FVM Version Cache +.fvm/ + +# firebase stuff from flutterfire +firebase.json +lib/firebase_options.dart \ No newline at end of file diff --git a/.metadata b/.metadata index 4026312..30cb34c 100644 --- a/.metadata +++ b/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: "12fccda598477eddd19f93040a1dba24f915b9be" + revision: "a14f74ff3a1cbd521163c5f03d68113d50af93d3" channel: "stable" project_type: app @@ -13,11 +13,14 @@ project_type: app migration: platforms: - platform: root - create_revision: 12fccda598477eddd19f93040a1dba24f915b9be - base_revision: 12fccda598477eddd19f93040a1dba24f915b9be + create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 + base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 - platform: android - create_revision: 12fccda598477eddd19f93040a1dba24f915b9be - base_revision: 12fccda598477eddd19f93040a1dba24f915b9be + create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 + base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 + - platform: ios + create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 + base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 # User provided section diff --git a/.vscode/settings.json b/.vscode/settings.json index 98beb6c..4f2a90d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,7 @@ { - "dart.lineLength": 80, - "editor.formatOnPaste": true, - "editor.formatOnSave": true, - "editor.formatOnType": true, - } \ No newline at end of file + "dart.lineLength": 80, + "editor.formatOnPaste": true, + "editor.formatOnSave": true, + "editor.formatOnType": true, + "dart.flutterSdkPath": ".fvm/versions/3.22.1" +} \ No newline at end of file diff --git a/README.md b/README.md index ab60579..19b3c7f 100644 --- a/README.md +++ b/README.md @@ -26,18 +26,42 @@ This project contains the codebase for the Android version that is on Play Store ## How to run -*Note: the assets were replaced by placeholders, so the version you will run locally is different in look than the version in stores.* +_Note: the assets were replaced by placeholders, so the version you will run locally is different in look than the version in stores._ + ### 1. Firebase Setup + It's important to put your own Firebase service file in order to run the app, as it uses Remote Config and Firebase Messaging. 1. Create a [new Firebase project](https://console.firebase.google.com/). -2. Add a new Android or iOS app, depending on which device you want to use, and follow the configuration steps to connect Noor to your Firebase project. +2. Add a new Android or iOS app, depending on which device you want to use, and follow the configuration steps to connect Noor to your Firebase project. This could help: https://firebase.google.com/docs/flutter/setup 3. Go to Remote Config page. 4. Add a new parameter with name `noorThker`, with any value of your choice. 5. Go to Cloud Messaging page, and enable it for your project. 6. To setup the cloud function that trigger a notification each time the Remote Config variable changes on the console, find the code in [this repo](https://github.com/Maryom/Noor_RemoteConfig). -### 2. Run +> **NOTE:** You can't really run the app without it, so make sure to set it up. +> +> The app needs some files generated the `flutterfire_cli`, specifically `lib/firebase_options.dart`, `android/app/google-services.json`, and `ios/Runner/GoogleService-Info.plist`. +> +> So make sure to follow the link in **step 2** if you haven't already. + +### 2. (optional) FVM Setup + +FVM is used to make sure everyone working on the project uses the same version. It is also easier to maintain since the `.fvmrc` file has the config you need to get started quickly. + +It also makes it easy for **Noor** to stay on an older version without needing to do lots of upgrades and downgrades, since developers usually work on projects with different versions. + +> FVM website: [https://fvm.app/](https://fvm.app/) + +Once FVM is installed, run the following command to get things ready: + +``` +fvm use 3.22.1 +``` + +> Be sure to check `.fvmrc` for the correct version this project uses, in case the version above is old. + +### 3. Run 1. Clone the project: @@ -51,7 +75,18 @@ git clone https://github.com/pr-Mais/noor.git flutter pub get ``` -4. Run: +3. (for android only) Edit the `android/app/build.gradle`: + +This will allow you to sign the app with the debug keystore, no need to make a keystore just for development :D + +```diff +- // signingConfig signingConfigs.debug +- signingConfig signingConfigs.release ++ signingConfig signingConfigs.debug ++ // signingConfig signingConfigs.release +``` + +1. Run: ```bash flutter run @@ -65,6 +100,6 @@ If you encounter any bug while using the apps in store, or running it locally, p For features request, contact us on [noorathkarapplication@gmail.com](mailto:noorathkarapplication@gmail.com?subject=%D8%A7%D9%82%D8%AA%D8%B1%D8%A7%D8%AD&body=%D8%A7%D9%84%D8%B3%D9%84%D8%A7%D9%85%20%D8%B9%D9%84%D9%8A%D9%83%D9%85%D8%8C) ## Credits + Shout out to the amazing designer [Shaikha Alqahtani](https://twitter.com/Ishaiookh).
The iOS version from Noor was made with native Swift by [Maryam Aljamea](https://twitter.com/0_1Mary). - diff --git a/android/.gitignore b/android/.gitignore index 0a741cb..6f56801 100644 --- a/android/.gitignore +++ b/android/.gitignore @@ -9,3 +9,5 @@ GeneratedPluginRegistrant.java # Remember to never publicly share your keystore. # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app key.properties +**/*.keystore +**/*.jks diff --git a/android/app/build.gradle b/android/app/build.gradle index 7b302eb..faf732f 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,14 +1,17 @@ plugins { id "com.android.application" + // START: FlutterFire Configuration + id 'com.google.gms.google-services' + // END: FlutterFire Configuration id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id "dev.flutter.flutter-gradle-plugin" - id 'com.google.gms.google-services' } def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') +def localPropertiesFile = rootProject.file("local.properties") if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> + localPropertiesFile.withReader("UTF-8") { reader -> localProperties.load(reader) } } @@ -23,63 +26,53 @@ if (keyPropertiesFile.exists()) { def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { - flutterVersionCode = '1' + flutterVersionCode = "1" } -def flutterVersionName = localProperties.getProperty('flutter.versionName') +def flutterVersionName = localProperties.getProperty("flutter.versionName") if (flutterVersionName == null) { - flutterVersionName = '1.0' + flutterVersionName = "1.0" } android { - namespace 'com.noor.sa' - compileSdkVersion 33 - ndkVersion flutter.ndkVersion + namespace = "com.noor.sa" + compileSdk = 34 + ndkVersion = flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = '1.8' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } defaultConfig { - applicationId "com.noor.sa" - minSdkVersion 21 - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName + applicationId = "com.noor.sa" + minSdk = 21 + targetSdk = flutter.targetSdkVersion + versionCode = flutterVersionCode.toInteger() + versionName = flutterVersionName + // i added this back cuz it was there before the android folder recreation testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } - signingConfigs { - release { - keyAlias keyProperties['keyAlias'] - keyPassword keyProperties['keyPassword'] - storeFile keyProperties['storeFile'] ? file(keyProperties['storeFile']) : null - storePassword keyProperties['storePassword'] - } - } - buildTypes { - release { + signingConfigs { + release { + keyAlias keyProperties['keyAlias'] + keyPassword keyProperties['keyPassword'] + storeFile keyProperties['storeFile'] ? file(keyProperties['storeFile']) : null + storePassword keyProperties['storePassword'] + } + } + + buildTypes { + release { + // signingConfig signingConfigs.debug signingConfig signingConfigs.release shrinkResources false minifyEnabled true - } - } + } + } } flutter { - source '../..' + source = "../.." } - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} - diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index ea1aafb..399f698 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,9 +1,7 @@ - - - - diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 9442ec6..bac3389 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,58 +1,83 @@ - - - - + + + - + + + - + + + + - + - - + + android:name="io.flutter.embedding.android.NormalTheme" + android:resource="@style/NormalTheme" + /> + + android:name="io.flutter.app.android.SplashScreenUntilFirstFrame" + android:value="true" + /> + - + + + + + + + - \ No newline at end of file + + + + + + + + diff --git a/android/app/src/main/kotlin/com/noor/noor/MainActivity.kt b/android/app/src/main/kotlin/com/noor/noor/MainActivity.kt index c3eb871..50fa84b 100644 --- a/android/app/src/main/kotlin/com/noor/noor/MainActivity.kt +++ b/android/app/src/main/kotlin/com/noor/noor/MainActivity.kt @@ -2,5 +2,4 @@ package com.noor.sa import io.flutter.embedding.android.FlutterActivity -class MainActivity: FlutterActivity() { -} +class MainActivity: FlutterActivity() diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml index 449a9f9..06952be 100644 --- a/android/app/src/main/res/values-night/styles.xml +++ b/android/app/src/main/res/values-night/styles.xml @@ -3,14 +3,14 @@ + + - \ No newline at end of file + diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml index 1074994..399f698 100644 --- a/android/app/src/profile/AndroidManifest.xml +++ b/android/app/src/profile/AndroidManifest.xml @@ -1,9 +1,7 @@ - - - - diff --git a/android/build.gradle b/android/build.gradle index a53f320..d2ffbff 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,19 +1,3 @@ -buildscript { - ext.kotlin_version = '1.9.10' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.4.2' - // START: FlutterFire Configuration - classpath 'com.google.gms:google-services:4.4.0' - // END: FlutterFire Configuration - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - allprojects { repositories { google() @@ -21,12 +5,12 @@ allprojects { } } -rootProject.buildDir = '../build' +rootProject.buildDir = "../build" subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { - project.evaluationDependsOn(':app') + project.evaluationDependsOn(":app") } tasks.register("clean", Delete) { diff --git a/android/gradle.properties b/android/gradle.properties index 721e601..3b5b324 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,16 +1,3 @@ -## For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html -# -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -# Default value: -Xmx1024m -XX:MaxPermSize=256m -# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -# -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true -#Sat Aug 26 03:31:07 AST 2023 +org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true -org.gradle.jvmargs=-Xmx2048M diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 3c472b9..e1ca574 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.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip diff --git a/android/launch.json b/android/launch.json deleted file mode 100644 index f0e96d7..0000000 --- a/android/launch.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Flutter", - "program": "lib/main.dart", - "request": "launch", - "type": "dart" - }, - { - "name": "Flutter --profile", - "program": "lib/main.dart", - "request": "launch", - "type": "dart", - "flutterMode": "profile" - } - ] -} \ No newline at end of file diff --git a/android/settings.gradle b/android/settings.gradle index 55c4ca8..7fb86d7 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -5,16 +5,24 @@ pluginManagement { def flutterSdkPath = properties.getProperty("flutter.sdk") assert flutterSdkPath != null, "flutter.sdk not set in local.properties" return flutterSdkPath - } - settings.ext.flutterSdkPath = flutterSdkPath() + }() - includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") - plugins { - id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false + repositories { + google() + mavenCentral() + gradlePluginPortal() } } -include ":app" +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.3.0" apply false + // START: FlutterFire Configuration + id "com.google.gms.google-services" version "4.3.15" apply false + // END: FlutterFire Configuration + id "org.jetbrains.kotlin.android" version "1.7.10" apply false +} -apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle" +include ":app" diff --git a/android/settings_aar.gradle b/android/settings_aar.gradle deleted file mode 100644 index e7b4def..0000000 --- a/android/settings_aar.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/devtools_options.yaml b/devtools_options.yaml new file mode 100644 index 0000000..fa0b357 --- /dev/null +++ b/devtools_options.yaml @@ -0,0 +1,3 @@ +description: This file stores settings for Dart & Flutter DevTools. +documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states +extensions: diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist index 9625e10..7c56964 100644 --- a/ios/Flutter/AppFrameworkInfo.plist +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 12.0 diff --git a/ios/Podfile b/ios/Podfile index 4409c58..bef90db 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -platform :ios, '11.0' +platform :ios, '12.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 8111d2b..0e8528e 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,87 +1,96 @@ PODS: - - Firebase/CoreOnly (10.15.0): - - FirebaseCore (= 10.15.0) - - Firebase/Messaging (10.15.0): + - Firebase/CoreOnly (10.25.0): + - FirebaseCore (= 10.25.0) + - Firebase/Messaging (10.25.0): - Firebase/CoreOnly - - FirebaseMessaging (~> 10.15.0) - - Firebase/RemoteConfig (10.15.0): + - FirebaseMessaging (~> 10.25.0) + - Firebase/RemoteConfig (10.25.0): - Firebase/CoreOnly - - FirebaseRemoteConfig (~> 10.15.0) - - firebase_core (2.16.0): - - Firebase/CoreOnly (= 10.15.0) + - FirebaseRemoteConfig (~> 10.25.0) + - firebase_core (2.32.0): + - Firebase/CoreOnly (= 10.25.0) - Flutter - - firebase_messaging (14.6.8): - - Firebase/Messaging (= 10.15.0) + - firebase_messaging (14.9.4): + - Firebase/Messaging (= 10.25.0) - firebase_core - Flutter - - firebase_remote_config (4.2.6): - - Firebase/RemoteConfig (= 10.15.0) + - firebase_remote_config (4.4.7): + - Firebase/RemoteConfig (= 10.25.0) - firebase_core - Flutter - - FirebaseABTesting (10.16.0): + - FirebaseABTesting (10.27.0): - FirebaseCore (~> 10.0) - - FirebaseCore (10.15.0): + - FirebaseCore (10.25.0): - FirebaseCoreInternal (~> 10.0) - - GoogleUtilities/Environment (~> 7.8) - - GoogleUtilities/Logger (~> 7.8) - - FirebaseCoreInternal (10.16.0): + - GoogleUtilities/Environment (~> 7.12) + - GoogleUtilities/Logger (~> 7.12) + - FirebaseCoreInternal (10.27.0): - "GoogleUtilities/NSData+zlib (~> 7.8)" - - FirebaseInstallations (10.16.0): + - FirebaseInstallations (10.27.0): - FirebaseCore (~> 10.0) - GoogleUtilities/Environment (~> 7.8) - GoogleUtilities/UserDefaults (~> 7.8) - PromisesObjC (~> 2.1) - - FirebaseMessaging (10.15.0): + - FirebaseMessaging (10.25.0): - FirebaseCore (~> 10.0) - FirebaseInstallations (~> 10.0) - - GoogleDataTransport (~> 9.2) + - GoogleDataTransport (~> 9.3) - GoogleUtilities/AppDelegateSwizzler (~> 7.8) - GoogleUtilities/Environment (~> 7.8) - GoogleUtilities/Reachability (~> 7.8) - GoogleUtilities/UserDefaults (~> 7.8) - - nanopb (< 2.30910.0, >= 2.30908.0) - - FirebaseRemoteConfig (10.15.0): + - nanopb (< 2.30911.0, >= 2.30908.0) + - FirebaseRemoteConfig (10.25.0): - FirebaseABTesting (~> 10.0) - FirebaseCore (~> 10.0) - FirebaseInstallations (~> 10.0) + - FirebaseRemoteConfigInterop (~> 10.23) + - FirebaseSharedSwift (~> 10.0) - GoogleUtilities/Environment (~> 7.8) - "GoogleUtilities/NSData+zlib (~> 7.8)" + - FirebaseRemoteConfigInterop (10.27.0) + - FirebaseSharedSwift (10.27.0) - Flutter (1.0.0) - flutter_local_notifications (0.0.1): - Flutter - - FMDB (2.7.5): - - FMDB/standard (= 2.7.5) - - FMDB/standard (2.7.5) - - GoogleDataTransport (9.2.5): + - GoogleDataTransport (9.4.1): - GoogleUtilities/Environment (~> 7.7) - - nanopb (< 2.30910.0, >= 2.30908.0) + - nanopb (< 2.30911.0, >= 2.30908.0) - PromisesObjC (< 3.0, >= 1.2) - - GoogleUtilities/AppDelegateSwizzler (7.11.5): + - GoogleUtilities/AppDelegateSwizzler (7.13.3): - GoogleUtilities/Environment - GoogleUtilities/Logger - GoogleUtilities/Network - - GoogleUtilities/Environment (7.11.5): + - GoogleUtilities/Privacy + - GoogleUtilities/Environment (7.13.3): + - GoogleUtilities/Privacy - PromisesObjC (< 3.0, >= 1.2) - - GoogleUtilities/Logger (7.11.5): + - GoogleUtilities/Logger (7.13.3): - GoogleUtilities/Environment - - GoogleUtilities/Network (7.11.5): + - GoogleUtilities/Privacy + - GoogleUtilities/Network (7.13.3): - GoogleUtilities/Logger - "GoogleUtilities/NSData+zlib" + - GoogleUtilities/Privacy - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (7.11.5)" - - GoogleUtilities/Reachability (7.11.5): + - "GoogleUtilities/NSData+zlib (7.13.3)": + - GoogleUtilities/Privacy + - GoogleUtilities/Privacy (7.13.3) + - GoogleUtilities/Reachability (7.13.3): - GoogleUtilities/Logger - - GoogleUtilities/UserDefaults (7.11.5): + - GoogleUtilities/Privacy + - GoogleUtilities/UserDefaults (7.13.3): - GoogleUtilities/Logger - - nanopb (2.30909.0): - - nanopb/decode (= 2.30909.0) - - nanopb/encode (= 2.30909.0) - - nanopb/decode (2.30909.0) - - nanopb/encode (2.30909.0) + - GoogleUtilities/Privacy + - nanopb (2.30910.0): + - nanopb/decode (= 2.30910.0) + - nanopb/encode (= 2.30910.0) + - nanopb/decode (2.30910.0) + - nanopb/encode (2.30910.0) - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS - - PromisesObjC (2.3.1) + - PromisesObjC (2.4.0) - share_plus (0.0.1): - Flutter - shared_preferences_foundation (0.0.1): @@ -89,7 +98,7 @@ PODS: - FlutterMacOS - sqflite (0.0.3): - Flutter - - FMDB (>= 2.7.5) + - FlutterMacOS - url_launcher_ios (0.0.1): - Flutter @@ -102,7 +111,7 @@ DEPENDENCIES: - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - share_plus (from `.symlinks/plugins/share_plus/ios`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - - sqflite (from `.symlinks/plugins/sqflite/ios`) + - sqflite (from `.symlinks/plugins/sqflite/darwin`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) SPEC REPOS: @@ -114,7 +123,8 @@ SPEC REPOS: - FirebaseInstallations - FirebaseMessaging - FirebaseRemoteConfig - - FMDB + - FirebaseRemoteConfigInterop + - FirebaseSharedSwift - GoogleDataTransport - GoogleUtilities - nanopb @@ -138,34 +148,35 @@ EXTERNAL SOURCES: shared_preferences_foundation: :path: ".symlinks/plugins/shared_preferences_foundation/darwin" sqflite: - :path: ".symlinks/plugins/sqflite/ios" + :path: ".symlinks/plugins/sqflite/darwin" url_launcher_ios: :path: ".symlinks/plugins/url_launcher_ios/ios" SPEC CHECKSUMS: - Firebase: 66043bd4579e5b73811f96829c694c7af8d67435 - firebase_core: 77172d0a9d8d19d07606e24406e4c2fc14d3265b - firebase_messaging: 6aff54d420b7ce7080c26dd131b08bc632666852 - firebase_remote_config: 1c6248049dbcb610764f5ccf567674b2ebb20813 - FirebaseABTesting: 03f0a8b88cf618350527f2c6a2234e29b9c65064 - FirebaseCore: 2cec518b43635f96afe7ac3a9c513e47558abd2e - FirebaseCoreInternal: 26233f705cc4531236818a07ac84d20c333e505a - FirebaseInstallations: b822f91a61f7d1ba763e5ccc9d4f2e6f2ed3b3ee - FirebaseMessaging: 0c0ae1eb722ef0c07f7801e5ded8dccd1357d6d4 - FirebaseRemoteConfig: 64b6ada098c649304114a817effd7e5f87229b11 - Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 - flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743 - FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a - GoogleDataTransport: 54dee9d48d14580407f8f5fbf2f496e92437a2f2 - GoogleUtilities: 13e2c67ede716b8741c7989e26893d151b2b2084 - nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431 - path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 - PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4 - share_plus: 599aa54e4ea31d4b4c0e9c911bcc26c55e791028 - shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 - sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a - url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de + Firebase: 0312a2352584f782ea56f66d91606891d4607f06 + firebase_core: a626d00494efa398e7c54f25f1454a64c8abf197 + firebase_messaging: 06391e8f35dc65a00c56580266285263d2861f10 + firebase_remote_config: 7b05c80210ab558c80f7a756681022b4ee98eea0 + FirebaseABTesting: 038a7d5f1e36ba7208cf34f6f596946d8f70d6c3 + FirebaseCore: 7ec4d0484817f12c3373955bc87762d96842d483 + FirebaseCoreInternal: 4b297a2d56063dbea2c1d0d04222d44a8d058862 + FirebaseInstallations: 766dabca09fd94aef922538aaf144cc4a6fb6869 + FirebaseMessaging: 88950ba9485052891ebe26f6c43a52bb62248952 + FirebaseRemoteConfig: 9f3935cefecd85d5b312192117f444957de24a75 + FirebaseRemoteConfigInterop: c55a739f5ab121792776e191d9fd437dc624a541 + FirebaseSharedSwift: a03fe7a59ee646fef71099a887f774fe25d745b8 + Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + flutter_local_notifications: 4cde75091f6327eb8517fa068a0a5950212d2086 + GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a + GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15 + nanopb: 438bc412db1928dac798aa6fd75726007be04262 + path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 + PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 + share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad + shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 + sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec + url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe -PODFILE CHECKSUM: 779af41b1bf7002fe3cf5887309d1d6f91642aaa +PODFILE CHECKSUM: 9ae156eded43278f9f02e7315c8c3ab1f9099dcf -COCOAPODS: 1.11.3 +COCOAPODS: 1.15.2 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 968b23b..165da22 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -142,6 +142,7 @@ 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, A61FA8606BA171A577D868B8 /* [CP] Embed Pods Frameworks */, + 72EB7E72329705E6E4DA51FE /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -158,7 +159,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -217,6 +218,23 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; + 72EB7E72329705E6E4DA51FE /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index b52b2e6..e67b280 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ Bool { GeneratedPluginRegistrant.register(with: self) + + if #available(iOS 10.0, *) { + UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate + } + return super.application(application, didFinishLaunchingWithOptions: launchOptions) } } diff --git a/lib/app/app.dart b/lib/app/app.dart index 58b33f6..6dc682d 100644 --- a/lib/app/app.dart +++ b/lib/app/app.dart @@ -1,15 +1,13 @@ import 'package:flutter/material.dart'; -import 'package:get_it/get_it.dart'; -import 'package:provider/provider.dart'; -import 'package:provider/single_child_widget.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; - -import 'package:noor/exports/pages.dart' show SplashScreen; +import 'package:get_it/get_it.dart'; +import 'package:noor/exports/constants.dart' show lightTheme, darkTheme; +import 'package:noor/exports/controllers.dart' show ThemeModel; import 'package:noor/exports/models.dart' show DataModel, AppSettings, CounterViewModel; -import 'package:noor/exports/components.dart' show CustomScrollBehavior; -import 'package:noor/exports/controllers.dart' show ThemeModel; -import 'package:noor/exports/constants.dart' show lightTheme, darkTheme; +import 'package:noor/exports/pages.dart' show SplashScreen; +import 'package:provider/provider.dart'; +import 'package:provider/single_child_widget.dart'; class NoorApp extends StatelessWidget { const NoorApp({Key? key}) : super(key: key); @@ -62,9 +60,11 @@ class MaterialAppWithTheme extends StatelessWidget { builder: (BuildContext context, Widget? child) { final MediaQueryData data = MediaQuery.of(context); return MediaQuery( - data: data.copyWith(textScaleFactor: 1.0), + data: data.copyWith( + textScaler: const TextScaler.linear(1), + ), child: ScrollConfiguration( - behavior: CustomScrollBehavior(), + behavior: const ScrollBehavior(), child: child!, ), ); diff --git a/lib/components/adaptive_icon.dart b/lib/components/adaptive_icon.dart index 666c81c..0f59f67 100644 --- a/lib/components/adaptive_icon.dart +++ b/lib/components/adaptive_icon.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; +import 'package:noor/utils/to_color_filter.dart'; class AdaptiveIcon extends StatelessWidget { const AdaptiveIcon(this.icon, {Key? key}) : super(key: key); @@ -12,7 +13,7 @@ class AdaptiveIcon extends StatelessWidget { height: 40, child: SvgPicture.asset( icon, - color: Theme.of(context).iconTheme.color, + colorFilter: Theme.of(context).iconTheme.color.toColorFilter(), ), ); } diff --git a/lib/components/add_dialog.dart b/lib/components/add_dialog.dart index 5263688..583f137 100644 --- a/lib/components/add_dialog.dart +++ b/lib/components/add_dialog.dart @@ -135,7 +135,7 @@ class _AddDialogState extends State child: TextField( autofocus: true, controller: controller, - style: Theme.of(context).textTheme.bodyText1, + style: Theme.of(context).textTheme.bodyLarge, decoration: InputDecoration( filled: false, contentPadding: diff --git a/lib/components/alert_dialog.dart b/lib/components/alert_dialog.dart index bbc4b9c..0528ea2 100644 --- a/lib/components/alert_dialog.dart +++ b/lib/components/alert_dialog.dart @@ -51,7 +51,7 @@ class NoorAlertDialog extends StatelessWidget { child: TextField( autofocus: true, controller: controller, - style: Theme.of(context).textTheme.bodyText1, + style: Theme.of(context).textTheme.bodyLarge, decoration: InputDecoration( filled: false, contentPadding: diff --git a/lib/components/allah_names_title.dart b/lib/components/allah_names_title.dart index f2a405b..d8f3212 100644 --- a/lib/components/allah_names_title.dart +++ b/lib/components/allah_names_title.dart @@ -16,7 +16,7 @@ class NameTitleCard extends StatelessWidget { title!, overflow: TextOverflow.clip, textAlign: TextAlign.center, - style: Theme.of(context).textTheme.headline2, + style: Theme.of(context).textTheme.displayMedium, ), margin: const EdgeInsets.symmetric( horizontal: viewPadding, vertical: 10.0), diff --git a/lib/components/athkar_title.dart b/lib/components/athkar_title.dart index 8c75d13..dc5c6fa 100644 --- a/lib/components/athkar_title.dart +++ b/lib/components/athkar_title.dart @@ -22,7 +22,7 @@ class ThekrTitleCard extends StatelessWidget { title!, textAlign: TextAlign.center, overflow: TextOverflow.clip, - style: Theme.of(context).textTheme.headline2, + style: Theme.of(context).textTheme.displayMedium, ), alignment: Alignment.center, padding: const EdgeInsets.only( diff --git a/lib/components/bottom_nav.dart b/lib/components/bottom_nav.dart index 794a06b..c36eb9f 100644 --- a/lib/components/bottom_nav.dart +++ b/lib/components/bottom_nav.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import 'package:noor/exports/constants.dart' show NoorIcons; +import 'package:noor/utils/to_color_filter.dart'; class BottomNav extends StatefulWidget { const BottomNav({ @@ -163,7 +164,8 @@ class _BottomItemState extends State height: 50, child: SvgPicture.asset( widget.icon, - color: Theme.of(context).iconTheme.color, + colorFilter: + Theme.of(context).iconTheme.color.toColorFilter(), height: 35, ), ), diff --git a/lib/components/card_template.dart b/lib/components/card_template.dart index 7b2939b..8311556 100644 --- a/lib/components/card_template.dart +++ b/lib/components/card_template.dart @@ -1,8 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; - import 'package:noor/exports/constants.dart' show Ribbon, viewPadding; import 'package:noor/exports/models.dart' show AppSettings; +import 'package:provider/provider.dart'; class CardTemplate extends StatelessWidget { CardTemplate({ @@ -105,7 +104,7 @@ class CardTemplate extends StatelessWidget { child: SingleChildScrollView( child: DefaultTextStyle.merge( textAlign: TextAlign.justify, - style: Theme.of(context).textTheme.bodyText1!.copyWith( + style: Theme.of(context).textTheme.bodyLarge!.copyWith( fontFamily: settings.fontType, color: Theme.of(context).primaryColor, ), diff --git a/lib/components/card_text.dart b/lib/components/card_text.dart index 2b18c49..f7f5c9e 100644 --- a/lib/components/card_text.dart +++ b/lib/components/card_text.dart @@ -1,10 +1,9 @@ import 'package:flutter/material.dart'; +import 'package:noor/exports/controllers.dart' show AppSettings; +import 'package:noor/exports/utils.dart' show Tashkeel; import 'package:noor/models/allah_name.dart'; import 'package:provider/provider.dart'; -import 'package:noor/exports/utils.dart' show Tashkeel; -import 'package:noor/exports/controllers.dart' show AppSettings; - extension RegExpExtension on RegExp { List allMatchesWithSep(String input, [int start = 0]) { List result = []; @@ -164,11 +163,11 @@ class CardText extends StatelessWidget { child: DefaultTextStyle.merge( textAlign: TextAlign.justify, style: color != null - ? Theme.of(context).textTheme.bodyText1!.copyWith( + ? Theme.of(context).textTheme.bodyLarge!.copyWith( color: color, fontFamily: settings.fontType, ) - : Theme.of(context).textTheme.bodyText1!.copyWith( + : Theme.of(context).textTheme.bodyLarge!.copyWith( fontFamily: settings.fontType, ), child: Builder( @@ -177,7 +176,7 @@ class CardText extends StatelessWidget { duration: const Duration(milliseconds: 200), child: item is AllahName ? RichText( - textScaleFactor: settings.fontSize, + textScaler: TextScaler.linear(settings.fontSize), textAlign: TextAlign.justify, text: TextSpan( children: highlightOccurrences( @@ -196,7 +195,7 @@ class CardText extends StatelessWidget { : Text( settings.tashkeel ? text : Tashkeel.remove(text), key: ValueKey(settings.tashkeel), - textScaleFactor: settings.fontSize, + textScaler: TextScaler.linear(settings.fontSize), ), ); }, diff --git a/lib/components/copy_action.dart b/lib/components/copy_action.dart index 62e0b67..2d22492 100644 --- a/lib/components/copy_action.dart +++ b/lib/components/copy_action.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; - import 'package:noor/exports/constants.dart' show Images; class CopyAction extends StatelessWidget { @@ -33,7 +32,7 @@ class CopyAction extends StatelessWidget { textDirection: TextDirection.rtl, style: Theme.of(context) .textTheme - .bodyText1 + .bodyLarge ?.copyWith(color: Colors.white), ), margin: const EdgeInsets.only(bottom: 30, left: 30, right: 30), diff --git a/lib/components/custom_scroll_bhaviour.dart b/lib/components/custom_scroll_bhaviour.dart deleted file mode 100644 index c6e2212..0000000 --- a/lib/components/custom_scroll_bhaviour.dart +++ /dev/null @@ -1,9 +0,0 @@ -import 'package:flutter/material.dart'; - -class CustomScrollBehavior extends ScrollBehavior { - @override - Widget buildViewportChrome( - BuildContext context, Widget child, AxisDirection axisDirection) { - return child; - } -} diff --git a/lib/components/dialog_button.dart b/lib/components/dialog_button.dart index 58c7ecc..c6ab863 100644 --- a/lib/components/dialog_button.dart +++ b/lib/components/dialog_button.dart @@ -32,7 +32,7 @@ class DialogButton extends StatelessWidget { child: DefaultTextStyle.merge( child: Text( label, - textScaleFactor: 1, + textScaler: const TextScaler.linear(1), style: TextStyle(color: textColor), ), ), diff --git a/lib/components/dialog_text_input.dart b/lib/components/dialog_text_input.dart index 71b137f..f2dbdf3 100644 --- a/lib/components/dialog_text_input.dart +++ b/lib/components/dialog_text_input.dart @@ -25,7 +25,7 @@ class DialogTextInput extends StatelessWidget { child: SingleChildScrollView( child: TextField( controller: controller, - style: Theme.of(context).textTheme.bodyText1, + style: Theme.of(context).textTheme.bodyLarge, decoration: InputDecoration( filled: false, contentPadding: diff --git a/lib/components/glowing_stars.dart b/lib/components/glowing_stars.dart index 5e7c839..bd1b254 100644 --- a/lib/components/glowing_stars.dart +++ b/lib/components/glowing_stars.dart @@ -13,8 +13,8 @@ class GlowingStars extends StatelessWidget { return SizedBox( height: 140, width: width, - child: Stack( - children: const [ + child: const Stack( + children: [ //star 0 Positioned( top: 10, diff --git a/lib/components/list_item.dart b/lib/components/list_item.dart index c045222..e7b8b2e 100644 --- a/lib/components/list_item.dart +++ b/lib/components/list_item.dart @@ -26,7 +26,7 @@ class ListItem extends StatelessWidget { title: Text( title, overflow: TextOverflow.ellipsis, - style: Theme.of(context).textTheme.bodyText1, + style: Theme.of(context).textTheme.bodyLarge, ), trailing: Icon( Icons.arrow_forward_ios, diff --git a/lib/exports/components.dart b/lib/exports/components.dart index 0caa8b1..2075dce 100644 --- a/lib/exports/components.dart +++ b/lib/exports/components.dart @@ -1,20 +1,19 @@ -export 'package:noor/components/card_template.dart'; export 'package:noor/components/allah_names_title.dart'; export 'package:noor/components/athkar_card.dart'; export 'package:noor/components/athkar_title.dart'; export 'package:noor/components/bottom_nav.dart'; -export 'package:noor/components/home_card.dart'; +export 'package:noor/components/card_sliver_app_bar.dart'; +export 'package:noor/components/card_template.dart'; +export 'package:noor/components/card_text.dart'; export 'package:noor/components/close_button.dart'; +export 'package:noor/components/copy_action.dart'; export 'package:noor/components/delete_dialog.dart'; -export 'package:noor/components/custom_scroll_bhaviour.dart'; +export 'package:noor/components/dialog_text_input.dart'; +export 'package:noor/components/fav_action.dart'; export 'package:noor/components/glowing_stars.dart'; +export 'package:noor/components/home_card.dart'; export 'package:noor/components/image_button.dart'; export 'package:noor/components/list_item.dart'; export 'package:noor/components/logo.dart'; export 'package:noor/components/noor_icons.dart'; export 'package:noor/components/noor_settings_icons.dart'; -export 'package:noor/components/card_text.dart'; -export 'package:noor/components/copy_action.dart'; -export 'package:noor/components/fav_action.dart'; -export 'package:noor/components/card_sliver_app_bar.dart'; -export 'package:noor/components/dialog_text_input.dart'; diff --git a/lib/exports/constants.dart b/lib/exports/constants.dart index aeb300b..04aab15 100644 --- a/lib/exports/constants.dart +++ b/lib/exports/constants.dart @@ -1,9 +1,9 @@ +export 'package:noor/constants/categories.dart'; export 'package:noor/constants/default_settings.dart'; +export 'package:noor/constants/icons.dart'; export 'package:noor/constants/images.dart'; export 'package:noor/constants/links.dart'; export 'package:noor/constants/ribbons.dart'; -export 'package:noor/constants/theme.dart'; -export 'package:noor/constants/titles.dart'; -export 'package:noor/constants/categories.dart'; -export 'package:noor/constants/icons.dart'; export 'package:noor/constants/strings.dart'; +export 'package:noor/constants/titles.dart'; +export 'package:noor/theme/theme.dart'; diff --git a/lib/main.dart b/lib/main.dart index f7e678b..dfc85fe 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,18 +1,20 @@ +import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/material.dart'; import 'package:get_it/get_it.dart'; -import 'package:firebase_core/firebase_core.dart'; - import 'package:noor/app/app.dart'; import 'package:noor/exports/controllers.dart' show DataController; +import 'package:noor/exports/models.dart' show AppSettings; import 'package:noor/exports/models.dart' show DataModel; import 'package:noor/exports/services.dart' show DBService, SharedPrefsService, FCMService; -import 'package:noor/exports/models.dart' show AppSettings; +import 'package:noor/firebase_options.dart'; import 'package:noor/pages/tabs/page_3_counter/counter_view_model.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); - await Firebase.initializeApp(); + await Firebase.initializeApp( + options: DefaultFirebaseOptions.currentPlatform, + ); await SharedPrefsService.getInstance(); await FCMService.instance.init(); diff --git a/lib/models/theme.dart b/lib/models/theme.dart index e506942..c401f5f 100644 --- a/lib/models/theme.dart +++ b/lib/models/theme.dart @@ -8,8 +8,9 @@ class ThemeModel with ChangeNotifier { String _userTheme = SharedPrefsService.getString('theme'); String get userTheme => _userTheme; - get brightness => MediaQueryData.fromWindow(WidgetsBinding.instance!.window) - .platformBrightness; + Brightness get brightness => + MediaQueryData.fromView(WidgetsBinding.instance.window) + .platformBrightness; set userTheme(String value) { _userTheme = value; diff --git a/lib/pages/root.dart b/lib/pages/root.dart index 1ffc870..6f24254 100644 --- a/lib/pages/root.dart +++ b/lib/pages/root.dart @@ -1,7 +1,7 @@ import 'dart:async'; + import 'package:flutter/material.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; - import 'package:noor/exports/components.dart' show BottomNav; import 'package:noor/exports/controllers.dart' show ThemeModel; import 'package:noor/exports/pages.dart' @@ -32,11 +32,16 @@ class _RootHomeState extends State precacheImage(AssetImage(images.noAd3yahFav), context); }); - AndroidInitializationSettings initializationSettingsAndroid = - const AndroidInitializationSettings('ic_notification'); + const androidInitializationSettings = AndroidInitializationSettings( + 'ic_notification', + ); - InitializationSettings initializationSettings = - InitializationSettings(android: initializationSettingsAndroid); + const darwinInitializationSettings = DarwinInitializationSettings(); + + const initializationSettings = InitializationSettings( + android: androidInitializationSettings, + iOS: darwinInitializationSettings, + ); flutterLocalNotificationsPlugin.initialize(initializationSettings); } diff --git a/lib/pages/tabs/page_1_home/ad3yah_expanded.dart b/lib/pages/tabs/page_1_home/ad3yah_expanded.dart index ad7c48d..8c46793 100644 --- a/lib/pages/tabs/page_1_home/ad3yah_expanded.dart +++ b/lib/pages/tabs/page_1_home/ad3yah_expanded.dart @@ -1,12 +1,11 @@ import 'package:flutter/material.dart'; import 'package:noor/constants/categories.dart'; -import 'package:noor/constants/theme.dart'; -import 'package:provider/provider.dart'; -import 'package:scrollable_positioned_list/scrollable_positioned_list.dart'; - import 'package:noor/exports/components.dart' show NoorCloseButton, CardTemplate, FavAction, CardText, CopyAction; import 'package:noor/exports/models.dart' show Doaa, DataModel; +import 'package:noor/theme/theme.dart'; +import 'package:provider/provider.dart'; +import 'package:scrollable_positioned_list/scrollable_positioned_list.dart'; class Ad3yahList extends StatefulWidget { const Ad3yahList({ @@ -56,7 +55,7 @@ class _Ad3yahListState extends State { Text( categoryTitle[widget.category] ?? '', textAlign: TextAlign.center, - style: Theme.of(context).textTheme.headline1, + style: Theme.of(context).textTheme.displayLarge, ), NoorCloseButton( color: Theme.of(context).colorScheme.secondary), diff --git a/lib/pages/tabs/page_1_home/allah_names_expanded.dart b/lib/pages/tabs/page_1_home/allah_names_expanded.dart index 10d6cfd..5443bb6 100644 --- a/lib/pages/tabs/page_1_home/allah_names_expanded.dart +++ b/lib/pages/tabs/page_1_home/allah_names_expanded.dart @@ -1,9 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:provider/provider.dart'; -import 'package:scrollable_positioned_list/scrollable_positioned_list.dart'; - -import 'package:noor/exports/models.dart' show DataModel, AllahName; -import 'package:noor/exports/constants.dart' show Images, Ribbon; import 'package:noor/exports/components.dart' show NoorCloseButton, @@ -12,6 +7,10 @@ import 'package:noor/exports/components.dart' FavAction, CopyAction, CardText; +import 'package:noor/exports/constants.dart' show Images, Ribbon; +import 'package:noor/exports/models.dart' show DataModel, AllahName; +import 'package:provider/provider.dart'; +import 'package:scrollable_positioned_list/scrollable_positioned_list.dart'; class AllahNamesList extends StatefulWidget { const AllahNamesList({ @@ -66,8 +65,8 @@ class _AllahNamesListState extends State icon: Image.asset(Images.referenceIcon), label: Text( 'ذُكِرَ في', - style: Theme.of(context).textTheme.button, - textScaleFactor: 1, + style: Theme.of(context).textTheme.labelLarge, + textScaler: const TextScaler.linear(1), ), onPressed: () { Navigator.of(context).push( @@ -112,7 +111,7 @@ class _AllahNamesListState extends State key: ValueKey( allahNames[position.value].name, ), - style: Theme.of(context).textTheme.headline1, + style: Theme.of(context).textTheme.displayLarge, ), ); }, @@ -222,7 +221,7 @@ class ReferenceList extends StatelessWidget { Text( name.name, textAlign: TextAlign.center, - style: Theme.of(context).textTheme.headline1, + style: Theme.of(context).textTheme.displayLarge, ), NoorCloseButton( color: Theme.of(context).colorScheme.secondary), diff --git a/lib/pages/tabs/page_1_home/athkar_expanded.dart b/lib/pages/tabs/page_1_home/athkar_expanded.dart index e27320c..9da5a19 100644 --- a/lib/pages/tabs/page_1_home/athkar_expanded.dart +++ b/lib/pages/tabs/page_1_home/athkar_expanded.dart @@ -1,13 +1,12 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:provider/provider.dart'; -import 'package:scrollable_positioned_list/scrollable_positioned_list.dart'; - -import 'package:noor/exports/models.dart' show AthkarCounter, DataModel, Thekr; -import 'package:noor/exports/controllers.dart' show AppSettings; import 'package:noor/exports/components.dart' show NoorCloseButton, ThekrTitleCard, AthkarCard; import 'package:noor/exports/constants.dart' show viewPadding; +import 'package:noor/exports/controllers.dart' show AppSettings; +import 'package:noor/exports/models.dart' show AthkarCounter, DataModel, Thekr; +import 'package:provider/provider.dart'; +import 'package:scrollable_positioned_list/scrollable_positioned_list.dart'; class AthkarList extends StatefulWidget { const AthkarList({Key? key, required this.index}) : super(key: key); @@ -31,7 +30,7 @@ class _AthkarListState extends State pagePosition = widget.index; controller = ItemScrollController(); - WidgetsBinding.instance!.addPostFrameCallback((_) { + WidgetsBinding.instance.addPostFrameCallback((_) { listener.itemPositions.addListener(changeAppBar); }); } @@ -114,7 +113,7 @@ class _AthkarListState extends State key: ValueKey( model.athkar[pagePosition].sectionName, ), - style: Theme.of(context).textTheme.headline1, + style: Theme.of(context).textTheme.displayLarge, ), duration: const Duration(milliseconds: 250), ); diff --git a/lib/pages/tabs/page_1_home/home.dart b/lib/pages/tabs/page_1_home/home.dart index 2b6e84f..13f8bbe 100644 --- a/lib/pages/tabs/page_1_home/home.dart +++ b/lib/pages/tabs/page_1_home/home.dart @@ -1,21 +1,20 @@ import 'dart:async'; + +import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:flutter_svg/svg.dart'; import 'package:get_it/get_it.dart'; import 'package:noor/env_config.dart'; -import 'package:noor/services/remote_config.dart'; - -import 'package:provider/provider.dart'; -import 'package:firebase_messaging/firebase_messaging.dart'; -import 'package:flutter_local_notifications/flutter_local_notifications.dart'; - -import 'package:noor/exports/constants.dart' show Images; -import 'package:noor/exports/pages.dart' show AllahNames, AthkarPage, Ad3yah; import 'package:noor/exports/components.dart' show GlowingStars, HomeCard; -import 'package:noor/exports/utils.dart' show backToExactLocation, Tashkeel; +import 'package:noor/exports/constants.dart' show Images; import 'package:noor/exports/controllers.dart' show ThemeModel; -import 'package:noor/exports/services.dart' show SharedPrefsService; import 'package:noor/exports/models.dart' show AllahName, DataModel; +import 'package:noor/exports/pages.dart' show AllahNames, AthkarPage, Ad3yah; +import 'package:noor/exports/services.dart' show SharedPrefsService; +import 'package:noor/exports/utils.dart' show backToExactLocation, Tashkeel; +import 'package:noor/services/remote_config.dart'; +import 'package:provider/provider.dart'; export 'package:noor/pages/tabs/page_1_home/ad3yah_expanded.dart'; export 'package:noor/pages/tabs/page_1_home/allah_names_expanded.dart'; @@ -129,103 +128,85 @@ class _HomeState extends State with AutomaticKeepAliveClientMixin { final Images images = context.watch().images; - return WillPopScope( - onWillPop: () async { - /// Clean the search then return `false` to not pop the app - /// if the user is in search mode - if (_focusNode.hasFocus || _searchController.text.isNotEmpty) { - _searchController.clear(); - _focusNode.unfocus(); - setState(() { - isWriting = false; - }); - - return false; - } - - /// Return `true` to allow for android's back button to pop the app - return true; - }, - child: Scaffold( - resizeToAvoidBottomInset: false, - body: Column( - children: [ - AnimatedHeader( - focusNode: _focusNode, - isWriting: isWriting, - ), - Expanded( - flex: isWriting ? 0 : 1, - child: SingleChildScrollView( - child: Column( - children: [ - if (_focusNode.hasFocus) const SizedBox(height: 10), - searchBar(), - const SizedBox(height: 10), - if (!isWriting) - Stack( - children: [ - if (!isWriting) - Column( - children: [ - HomeCard( - page: const AthkarPage(), - image: images.athkarCard, - tag: 'athkar', - ), - HomeCard( - page: const Ad3yah(), - image: images.ad3yahCard, - tag: 'ad3yah', - ), - HomeCard( - page: const AllahNames(), - image: images.allahNamesCard, - tag: 'allah names', - ), - ], - ), - Visibility( - visible: !isWriting && _focusNode.hasFocus, - child: AnimatedOpacity( - duration: const Duration(milliseconds: 400), - opacity: _focusNode.hasFocus ? 1.0 : 0.0, - child: GestureDetector( - onTap: () { - if (_focusNode.hasFocus) { - _searchController.clear(); - FocusScope.of(context) - .requestFocus(FocusNode()); - setState(() { - isWriting = false; - }); - } - }, - child: Container( - color: Colors.transparent, - height: _focusNode.hasFocus && !isWriting - ? MediaQuery.of(context).size.height - : 0, - ), + return Scaffold( + resizeToAvoidBottomInset: false, + body: Column( + children: [ + AnimatedHeader( + focusNode: _focusNode, + isWriting: isWriting, + ), + Expanded( + flex: isWriting ? 0 : 1, + child: SingleChildScrollView( + child: Column( + children: [ + if (_focusNode.hasFocus) const SizedBox(height: 10), + searchBar(), + const SizedBox(height: 10), + if (!isWriting) + Stack( + children: [ + if (!isWriting) + Column( + children: [ + HomeCard( + page: const AthkarPage(), + image: images.athkarCard, + tag: 'athkar', + ), + HomeCard( + page: const Ad3yah(), + image: images.ad3yahCard, + tag: 'ad3yah', + ), + HomeCard( + page: const AllahNames(), + image: images.allahNamesCard, + tag: 'allah names', + ), + ], + ), + Visibility( + visible: !isWriting && _focusNode.hasFocus, + child: AnimatedOpacity( + duration: const Duration(milliseconds: 400), + opacity: _focusNode.hasFocus ? 1.0 : 0.0, + child: GestureDetector( + onTap: () { + if (_focusNode.hasFocus) { + _searchController.clear(); + FocusScope.of(context) + .requestFocus(FocusNode()); + setState(() { + isWriting = false; + }); + } + }, + child: Container( + color: Colors.transparent, + height: _focusNode.hasFocus && !isWriting + ? MediaQuery.of(context).size.height + : 0, ), ), ), - ], - ), - ], - ), + ), + ], + ), + ], ), ), - if (isWriting) - Expanded( - child: SearchResults( - query: searchWord, - results: results, - title: title, - ), + ), + if (isWriting) + Expanded( + child: SearchResults( + query: searchWord, + results: results, + title: title, ), - ], - ), + ), + ], ), ); } @@ -244,7 +225,7 @@ class _HomeState extends State with AutomaticKeepAliveClientMixin { }, style: TextStyle( fontSize: 14, - color: Theme.of(context).textTheme.bodyText1!.color, + color: Theme.of(context).textTheme.bodyLarge!.color, fontWeight: FontWeight.normal, ), decoration: InputDecoration( diff --git a/lib/pages/tabs/page_1_home/my_ad3yah.dart b/lib/pages/tabs/page_1_home/my_ad3yah.dart index 6e44045..f3357c3 100644 --- a/lib/pages/tabs/page_1_home/my_ad3yah.dart +++ b/lib/pages/tabs/page_1_home/my_ad3yah.dart @@ -1,13 +1,6 @@ import 'package:flutter/material.dart'; import 'package:get_it/get_it.dart'; import 'package:noor/components/dialog_button.dart'; -import 'package:provider/provider.dart'; -import 'package:reorderables/reorderables.dart'; - -import 'package:noor/exports/controllers.dart' show ThemeModel, DataController; -import 'package:noor/exports/constants.dart' - show Images, Ribbon, Strings, viewPadding; -import 'package:noor/exports/models.dart' show DataModel, Doaa; import 'package:noor/exports/components.dart' show CardTemplate, @@ -18,6 +11,12 @@ import 'package:noor/exports/components.dart' CopyAction, FavAction, DialogTextInput; +import 'package:noor/exports/constants.dart' + show Images, Ribbon, Strings, viewPadding; +import 'package:noor/exports/controllers.dart' show ThemeModel, DataController; +import 'package:noor/exports/models.dart' show DataModel, Doaa; +import 'package:provider/provider.dart'; +import 'package:reorderables/reorderables.dart'; enum SaveType { insert, update } @@ -366,7 +365,7 @@ class _AddDoaaDialogState extends State { child: SingleChildScrollView( child: TextField( controller: controller, - style: Theme.of(context).textTheme.bodyText1, + style: Theme.of(context).textTheme.bodyLarge, decoration: InputDecoration( filled: false, contentPadding: diff --git a/lib/pages/tabs/page_2_fav.dart b/lib/pages/tabs/page_2_fav.dart index 4842793..435a800 100644 --- a/lib/pages/tabs/page_2_fav.dart +++ b/lib/pages/tabs/page_2_fav.dart @@ -1,18 +1,17 @@ import 'package:flutter/material.dart'; import 'package:get_it/get_it.dart'; -import 'package:noor/models/data.dart'; -import 'package:provider/provider.dart'; -import 'package:reorderables/reorderables.dart'; - import 'package:noor/exports/components.dart' show CardTemplate, DeleteConfirmationDialog, ImageButton; -import 'package:noor/exports/models.dart' show AllahName; +import 'package:noor/exports/components.dart' show CardText; import 'package:noor/exports/constants.dart' show Images, NoorCategory; +import 'package:noor/exports/controllers.dart' show DataController, ThemeModel; +import 'package:noor/exports/models.dart' show AllahName; import 'package:noor/exports/pages.dart' show Ad3yahList, AllahNamesList, AthkarList, MyAd3yah; -import 'package:noor/exports/controllers.dart' show DataController, ThemeModel; import 'package:noor/exports/utils.dart' show backToExactLocation; -import 'package:noor/exports/components.dart' show CardText; +import 'package:noor/models/data.dart'; +import 'package:provider/provider.dart'; +import 'package:reorderables/reorderables.dart'; class Favorite extends StatefulWidget { const Favorite({ @@ -296,8 +295,8 @@ class FavCard extends StatelessWidget { icon: Image.asset(Images.referenceIcon), label: Text( item is AllahName ? item.name : item.sectionName, - textScaleFactor: 1, - style: Theme.of(context).textTheme.button, + textScaler: const TextScaler.linear(1), + style: Theme.of(context).textTheme.labelLarge, ), onPressed: backToLocation, ), diff --git a/lib/pages/tabs/page_3_counter/counter_list_view.dart b/lib/pages/tabs/page_3_counter/counter_list_view.dart index db70bfe..dd3990f 100644 --- a/lib/pages/tabs/page_3_counter/counter_list_view.dart +++ b/lib/pages/tabs/page_3_counter/counter_list_view.dart @@ -7,8 +7,9 @@ import 'package:noor/exports/constants.dart'; import 'package:noor/exports/controllers.dart'; import 'package:noor/exports/pages.dart'; import 'package:noor/pages/tabs/page_3_counter/counter_view_model.dart'; -import 'package:provider/provider.dart'; +import 'package:noor/utils/build_context.dart'; import 'package:noor/utils/to_arabic.dart'; +import 'package:provider/provider.dart'; const kMaxLength = 75; @@ -162,7 +163,7 @@ class _CounterListViewState extends State { 'قائمة الأذكار', style: Theme.of(context) .textTheme - .headline2! + .displayMedium! .copyWith(fontWeight: FontWeight.bold), ), NoorIconButton( @@ -213,7 +214,7 @@ class SubhaListItem extends StatelessWidget { onTap: isEditMode ? null : () => onTap(item), borderRadius: BorderRadius.circular(8.0), splashColor: Colors.transparent, - highlightColor: Theme.of(context).selectedRowColor, + highlightColor: context.customColors?.selectedRowColor, child: Container( constraints: const BoxConstraints(minHeight: 80), margin: const EdgeInsets.all(5.0), @@ -225,7 +226,7 @@ class SubhaListItem extends StatelessWidget { boxShadow: [ BoxShadow( color: item.selected - ? Theme.of(context).selectedRowColor + ? context.customColors?.selectedRowColor ?? Colors.black : Colors.transparent, spreadRadius: 6, ) @@ -237,8 +238,8 @@ class SubhaListItem extends StatelessWidget { Expanded( child: Text( item.key, - textScaleFactor: settings.fontSize, - style: Theme.of(context).textTheme.bodyText1?.copyWith( + textScaler: TextScaler.linear(settings.fontSize), + style: Theme.of(context).textTheme.bodyLarge?.copyWith( fontFamily: context.read().fontType, height: 1.4), overflow: TextOverflow.ellipsis, @@ -301,7 +302,7 @@ class SubhaListItem extends StatelessWidget { overflow: TextOverflow.ellipsis, style: Theme.of(context) .textTheme - .headline2 + .displayMedium ?.copyWith( fontWeight: FontWeight.bold), ), diff --git a/lib/pages/tabs/page_3_counter/counter_main_view.dart b/lib/pages/tabs/page_3_counter/counter_main_view.dart index dac206e..e738e2d 100644 --- a/lib/pages/tabs/page_3_counter/counter_main_view.dart +++ b/lib/pages/tabs/page_3_counter/counter_main_view.dart @@ -1,12 +1,11 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_svg/svg.dart'; -import 'package:noor/exports/models.dart'; -import 'package:provider/provider.dart'; - import 'package:noor/exports/constants.dart'; - import 'package:noor/exports/controllers.dart' show AppSettings, ThemeModel; +import 'package:noor/exports/models.dart'; +import 'package:noor/utils/to_color_filter.dart'; +import 'package:provider/provider.dart'; import 'counter_list_view.dart'; @@ -118,7 +117,7 @@ class _CounterViewState extends State { counterModel.selectedItem?.counter ?? 0, ), textAlign: TextAlign.center, - textScaleFactor: settings.fontSize, + textScaler: TextScaler.linear(settings.fontSize), style: TextStyle( color: Colors.white, fontSize: 16, @@ -134,9 +133,11 @@ class _CounterViewState extends State { child: Text( '${counterModel.selectedItem!.counter}', key: ValueKey(counterModel.selectedItem!.counter), - style: Theme.of(context).textTheme.subtitle2?.copyWith( - fontSize: 30, fontWeight: FontWeight.bold), - textScaleFactor: settings.fontSize, + style: Theme.of(context).textTheme.titleSmall?.copyWith( + fontSize: 30, + fontWeight: FontWeight.bold, + ), + textScaler: TextScaler.linear(settings.fontSize), ), ), ], @@ -185,7 +186,7 @@ class NoorIconButton extends StatelessWidget { icon, width: 30, height: 30, - color: Colors.white, + colorFilter: Colors.white.toColorFilter(), ) : Icon( icon, diff --git a/lib/pages/tabs/page_4_settings.dart b/lib/pages/tabs/page_4_settings.dart index 10cfb25..8c52e70 100644 --- a/lib/pages/tabs/page_4_settings.dart +++ b/lib/pages/tabs/page_4_settings.dart @@ -2,21 +2,20 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; +import 'package:intl/intl.dart' as intl; import 'package:noor/components/adaptive_icon.dart'; +import 'package:noor/exports/components.dart' show CardTemplate, CardText; +import 'package:noor/exports/constants.dart' + show Images, Links, NoorIcons, Strings; +import 'package:noor/exports/controllers.dart' show ThemeModel, AppSettings; +import 'package:noor/exports/services.dart' show SharedPrefsService; import 'package:noor/models/data.dart'; import 'package:noor/services/fcm.dart'; import 'package:provider/provider.dart'; import 'package:share_plus/share_plus.dart'; -import 'package:url_launcher/url_launcher.dart'; -import 'package:intl/intl.dart' as intl; import 'package:timezone/data/latest.dart' as tz; import 'package:timezone/timezone.dart' as tz; - -import 'package:noor/exports/components.dart' show CardTemplate, CardText; -import 'package:noor/exports/services.dart' show SharedPrefsService; -import 'package:noor/exports/controllers.dart' show ThemeModel, AppSettings; -import 'package:noor/exports/constants.dart' - show Images, Links, NoorIcons, Strings; +import 'package:url_launcher/url_launcher.dart' as url_launcher; class Settings extends StatefulWidget { const Settings({ @@ -74,8 +73,8 @@ class _SettingsState extends State child: Text( text, textAlign: TextAlign.start, - style: Theme.of(context).textTheme.subtitle1, - textScaleFactor: 1, + style: Theme.of(context).textTheme.titleMedium, + textScaler: const TextScaler.linear(1), ), ); } @@ -88,12 +87,12 @@ class _SettingsState extends State child: Text( text, textAlign: TextAlign.start, - style: Theme.of(context).textTheme.bodyText1?.copyWith( + style: Theme.of(context).textTheme.bodyLarge?.copyWith( height: 1, fontSize: 12, fontWeight: FontWeight.bold, ), - textScaleFactor: 1, + textScaler: const TextScaler.linear(1), ), ); } @@ -107,7 +106,7 @@ class _SettingsState extends State AdaptiveIcon(icon), Text( text, - style: Theme.of(context).textTheme.bodyText1?.copyWith( + style: Theme.of(context).textTheme.bodyLarge?.copyWith( height: 1, fontSize: 12, ), @@ -247,7 +246,7 @@ class _SettingsState extends State matchDateTimeComponents: DateTimeComponents.time, uiLocalNotificationDateInterpretation: UILocalNotificationDateInterpretation.absoluteTime, - androidAllowWhileIdle: true, + androidScheduleMode: AndroidScheduleMode.exactAllowWhileIdle, ); } @@ -258,7 +257,10 @@ class _SettingsState extends State } launchURL(String url) async { - await launch(url); + final uri = Uri.tryParse(url); + if (uri != null) { + await url_launcher.launchUrl(uri); + } } final ScrollController _scrollController = ScrollController(); @@ -560,7 +562,7 @@ class _SettingsState extends State 'حفظ', style: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .copyWith( fontWeight: FontWeight @@ -619,7 +621,7 @@ class _SettingsState extends State 'إلغاء', style: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .copyWith( fontWeight: FontWeight @@ -652,7 +654,7 @@ class _SettingsState extends State dateTimePickerTextStyle: Theme.of(context) .textTheme - .bodyText1, + .bodyLarge, ), ), child: CupertinoDatePicker( @@ -693,7 +695,7 @@ class _SettingsState extends State formatTime(morningNotiTime), style: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .copyWith(fontSize: 12), ), ), @@ -759,7 +761,7 @@ class _SettingsState extends State 'حفظ', style: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .copyWith( fontWeight: FontWeight @@ -817,7 +819,7 @@ class _SettingsState extends State 'إلغاء', style: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .copyWith( fontWeight: FontWeight @@ -855,7 +857,7 @@ class _SettingsState extends State fontSize: 16, color: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .color, ), ), @@ -897,7 +899,7 @@ class _SettingsState extends State formatTime(nightNotiTime), style: Theme.of(context) .textTheme - .bodyText1! + .bodyLarge! .copyWith(fontSize: 12), ), ), diff --git a/lib/theme/custom_colors.dart b/lib/theme/custom_colors.dart new file mode 100644 index 0000000..ed8c743 --- /dev/null +++ b/lib/theme/custom_colors.dart @@ -0,0 +1,30 @@ +import 'package:flutter/material.dart'; + +@immutable +class CustomColors extends ThemeExtension { + const CustomColors({ + required this.selectedRowColor, + }); + + final Color? selectedRowColor; + + @override + CustomColors copyWith({Color? selectedRowColor}) { + return CustomColors( + selectedRowColor: selectedRowColor, + ); + } + + @override + CustomColors lerp(CustomColors? other, double t) { + if (other is! CustomColors) { + return this; + } + return CustomColors( + selectedRowColor: Color.lerp(selectedRowColor, other.selectedRowColor, t), + ); + } + + @override + String toString() => 'CustomColors(selectedRowColor: $selectedRowColor)'; +} diff --git a/lib/constants/theme.dart b/lib/theme/theme.dart similarity index 73% rename from lib/constants/theme.dart rename to lib/theme/theme.dart index 3a3ddb5..8de4540 100644 --- a/lib/constants/theme.dart +++ b/lib/theme/theme.dart @@ -1,11 +1,13 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:noor/constants/colors.dart'; +import 'package:noor/theme/custom_colors.dart'; const kContentFontSize = 16.0; const viewPadding = 20.0; ThemeData lightTheme() => ThemeData( + useMaterial3: false, brightness: Brightness.light, appBarTheme: const AppBarTheme(systemOverlayStyle: SystemUiOverlayStyle.light), @@ -22,37 +24,36 @@ ThemeData lightTheme() => ThemeData( dialogTheme: const DialogTheme(backgroundColor: Colors.white), highlightColor: Colors.black.withOpacity(0.1), splashColor: Colors.black.withOpacity(0.1), - selectedRowColor: const Color(0xffB3B3FF), textTheme: TextTheme( - bodyText1: const TextStyle( + bodyLarge: const TextStyle( fontSize: 16, height: 1.6, color: Colors.black, fontWeight: FontWeight.normal, ), - subtitle1: const TextStyle( + titleMedium: const TextStyle( color: Color(0xff6f85d5), fontWeight: FontWeight.bold, fontSize: 14, ), - subtitle2: TextStyle( + titleSmall: TextStyle( fontSize: 16, height: 1.5, color: Colors.lightBlue[100], fontWeight: FontWeight.bold, ), - headline1: const TextStyle( + displayLarge: const TextStyle( fontSize: 16, height: 1.5, color: Color(0xff6f85d5), fontWeight: FontWeight.bold, ), - headline2: const TextStyle( + displayMedium: const TextStyle( fontSize: 16, height: 1.5, color: Colors.white, ), - button: const TextStyle( + labelLarge: const TextStyle( fontSize: 14, color: Color(0xff6f85d5), height: 1, @@ -60,23 +61,23 @@ ThemeData lightTheme() => ThemeData( ), elevatedButtonTheme: ElevatedButtonThemeData( style: ButtonStyle( - elevation: MaterialStateProperty.all(0.0), - backgroundColor: MaterialStateProperty.resolveWith( - (Set states) { - if (states.contains(MaterialState.disabled)) { + elevation: WidgetStateProperty.all(0.0), + backgroundColor: WidgetStateProperty.resolveWith( + (Set states) { + if (states.contains(WidgetState.disabled)) { return const Color(0xff6f85d5).withOpacity(0.7); } return const Color(0xff6f85d5); }, ), - foregroundColor: MaterialStateProperty.resolveWith( - (Set states) { - return (states.contains(MaterialState.disabled)) + foregroundColor: WidgetStateProperty.resolveWith( + (Set states) { + return (states.contains(WidgetState.disabled)) ? Colors.white30 : Colors.lightBlue[100]; }, ), - textStyle: MaterialStateProperty.all( + textStyle: WidgetStateProperty.all( const TextStyle( fontFamily: 'SST Arabic', fontWeight: FontWeight.w600, @@ -84,12 +85,12 @@ ThemeData lightTheme() => ThemeData( height: 1, ), ), - overlayColor: MaterialStateProperty.all(Colors.white24), + overlayColor: WidgetStateProperty.all(Colors.white24), ), ), scrollbarTheme: ScrollbarThemeData( radius: const Radius.circular(5), - thumbColor: MaterialStateProperty.all(Colors.grey[300]), + thumbColor: WidgetStateProperty.all(Colors.grey[300]), ), iconTheme: IconThemeData(color: Colors.grey[400], size: 30), inputDecorationTheme: InputDecorationTheme( @@ -103,15 +104,20 @@ ThemeData lightTheme() => ThemeData( brightness: Brightness.light, outline: const Color(0xff6f85d5), ), + extensions: const >[ + CustomColors( + selectedRowColor: Color(0xffB3B3FF), + ), + ], ); ThemeData darkTheme() => ThemeData( + useMaterial3: false, brightness: Brightness.dark, appBarTheme: const AppBarTheme(systemOverlayStyle: SystemUiOverlayStyle.dark), fontFamily: 'SST Arabic', primaryColor: Color(NoorColors.dark.primary), - selectedRowColor: const Color(0xff33477F), pageTransitionsTheme: const PageTransitionsTheme( builders: { TargetPlatform.android: FadeUpwardsPageTransitionsBuilder(), @@ -127,35 +133,35 @@ ThemeData darkTheme() => ThemeData( hintStyle: TextStyle(color: Colors.white38), ), textTheme: const TextTheme( - bodyText1: TextStyle( + bodyLarge: TextStyle( fontSize: 16, height: 1.6, color: Colors.white, fontWeight: FontWeight.normal, ), - subtitle1: TextStyle( + titleMedium: TextStyle( color: Colors.white, fontWeight: FontWeight.bold, fontSize: 14, ), - subtitle2: TextStyle( + titleSmall: TextStyle( fontSize: 16, height: 1.5, color: Color(0xff6f85d5), fontWeight: FontWeight.bold, ), - headline1: TextStyle( + displayLarge: TextStyle( fontSize: 16, height: 1.5, color: Colors.white, fontWeight: FontWeight.bold, ), - headline2: TextStyle( + displayMedium: TextStyle( fontSize: 16, height: 1.5, color: Colors.white, ), - button: TextStyle( + labelLarge: TextStyle( fontSize: 14, color: Color(0xff6f85d5), height: 1, @@ -163,23 +169,23 @@ ThemeData darkTheme() => ThemeData( ), elevatedButtonTheme: ElevatedButtonThemeData( style: ButtonStyle( - elevation: MaterialStateProperty.all(0.0), - backgroundColor: MaterialStateProperty.resolveWith( - (Set states) { - if (states.contains(MaterialState.disabled)) { + elevation: WidgetStateProperty.all(0.0), + backgroundColor: WidgetStateProperty.resolveWith( + (Set states) { + if (states.contains(WidgetState.disabled)) { return const Color(0xff6f85d5).withOpacity(0.6); } return const Color(0xff6f85d5); }, ), - foregroundColor: MaterialStateProperty.resolveWith( - (Set states) { - return (states.contains(MaterialState.disabled)) + foregroundColor: WidgetStateProperty.resolveWith( + (Set states) { + return (states.contains(WidgetState.disabled)) ? Colors.white30 : Colors.lightBlue[100]; }, ), - textStyle: MaterialStateProperty.all( + textStyle: WidgetStateProperty.all( const TextStyle( fontFamily: 'SST Arabic', fontWeight: FontWeight.w600, @@ -187,7 +193,7 @@ ThemeData darkTheme() => ThemeData( height: 1, ), ), - overlayColor: MaterialStateProperty.all(Colors.white10), + overlayColor: WidgetStateProperty.all(Colors.white10), ), ), splashColor: Colors.black.withOpacity(0.1), @@ -196,7 +202,7 @@ ThemeData darkTheme() => ThemeData( cardColor: const Color(0xff10122C), scrollbarTheme: ScrollbarThemeData( radius: const Radius.circular(5), - thumbColor: MaterialStateProperty.all( + thumbColor: WidgetStateProperty.all( const Color(0xff3C387B).withOpacity(0.5), ), ), @@ -205,4 +211,9 @@ ThemeData darkTheme() => ThemeData( brightness: Brightness.dark, outline: const Color(0xff6f85d5), ), + extensions: const >[ + CustomColors( + selectedRowColor: Color(0xff33477F), + ), + ], ); diff --git a/lib/utils/build_context.dart b/lib/utils/build_context.dart new file mode 100644 index 0000000..d2bf646 --- /dev/null +++ b/lib/utils/build_context.dart @@ -0,0 +1,8 @@ +import 'package:flutter/material.dart'; +import 'package:noor/theme/custom_colors.dart'; + +extension BuildContextExtension on BuildContext { + ThemeData get themeData => Theme.of(this); + + CustomColors? get customColors => themeData.extension(); +} diff --git a/lib/utils/to_color_filter.dart b/lib/utils/to_color_filter.dart new file mode 100644 index 0000000..ea96379 --- /dev/null +++ b/lib/utils/to_color_filter.dart @@ -0,0 +1,10 @@ +import 'package:flutter/material.dart'; + +extension ToColorFilter on Color? { + ColorFilter? toColorFilter([BlendMode mode = BlendMode.srcIn]) { + final color = this; + if (color == null) return null; + + return ColorFilter.mode(color, mode); + } +} diff --git a/pubspec.lock b/pubspec.lock index b1de3fa..24d0a2d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -13,10 +13,10 @@ packages: dependency: transitive description: name: _flutterfire_internals - sha256: "2d8e8e123ca3675625917f535fcc0d3a50092eef44334168f9b18adc050d4c6e" + sha256: "37a42d06068e2fe3deddb2da079a8c4d105f241225ba27b7122b37e9865fd8f7" url: "https://pub.dev" source: hosted - version: "1.3.6" + version: "1.3.35" analyzer: dependency: transitive description: @@ -29,10 +29,10 @@ packages: dependency: "direct main" description: name: animations - sha256: ef57563eed3620bd5d75ad96189846aca1e033c0c45fc9a7d26e80ab02b88a70 + sha256: d3d6dcfb218225bbe68e87ccf6378bbb2e32a94900722c5f81611dad089911cb url: "https://pub.dev" source: hosted - version: "2.0.8" + version: "2.0.11" archive: dependency: transitive description: @@ -117,10 +117,10 @@ packages: dependency: transitive description: name: collection - sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.2" + version: "1.18.0" convert: dependency: transitive description: @@ -189,74 +189,74 @@ packages: dependency: "direct main" description: name: firebase_core - sha256: "675c209c94a1817649137cbd113fc4c9ae85e48d03dd578629abbec6d8a4d93d" + sha256: "26de145bb9688a90962faec6f838247377b0b0d32cc0abecd9a4e43525fc856c" url: "https://pub.dev" source: hosted - version: "2.16.0" + version: "2.32.0" firebase_core_platform_interface: dependency: transitive description: name: firebase_core_platform_interface - sha256: b63e3be6c96ef5c33bdec1aab23c91eb00696f6452f0519401d640938c94cba2 + sha256: c437ae5d17e6b5cc7981cf6fd458a5db4d12979905f9aafd1fea930428a9fe63 url: "https://pub.dev" source: hosted - version: "4.8.0" + version: "5.0.0" firebase_core_web: dependency: transitive description: name: firebase_core_web - sha256: e8c408923cd3a25bd342c576a114f2126769cd1a57106a4edeaa67ea4a84e962 + sha256: "43d9e951ac52b87ae9cc38ecdcca1e8fa7b52a1dd26a96085ba41ce5108db8e9" url: "https://pub.dev" source: hosted - version: "2.8.0" + version: "2.17.0" firebase_messaging: dependency: "direct main" description: name: firebase_messaging - sha256: "4544524c22de3ffdc7e0ffaeeba212a04d09e76d0549ae6f42ce285d9d8f0513" + sha256: a1662cc95d9750a324ad9df349b873360af6f11414902021f130c68ec02267c4 url: "https://pub.dev" source: hosted - version: "14.6.8" + version: "14.9.4" firebase_messaging_platform_interface: dependency: transitive description: name: firebase_messaging_platform_interface - sha256: a6e1fae8242a14d5d8f5ab1cf94693511f06bab49ff1d46e3d83c0af3c4becb8 + sha256: "87c4a922cb6f811cfb7a889bdbb3622702443c52a0271636cbc90d813ceac147" url: "https://pub.dev" source: hosted - version: "4.5.7" + version: "4.5.37" firebase_messaging_web: dependency: transitive description: name: firebase_messaging_web - sha256: a9fe837dc2dcdd3e32e6109a6b0ce62592d7a44cb8f69cb5b73190865c5aa28e + sha256: "0d34dca01a7b103ed7f20138bffbb28eb0e61a677bf9e78a028a932e2c7322d5" url: "https://pub.dev" source: hosted - version: "3.5.7" + version: "3.8.7" firebase_remote_config: dependency: "direct main" description: name: firebase_remote_config - sha256: "945fbf4afe6a5eb5fe1bebe9e310c019d2896e15b9dc579914a2be1c832a7030" + sha256: "653bd94b68e2c4e89eca10db90576101f1024151f39f2d4e7c64ae6a90a5f9c5" url: "https://pub.dev" source: hosted - version: "4.2.6" + version: "4.4.7" firebase_remote_config_platform_interface: dependency: transitive description: name: firebase_remote_config_platform_interface - sha256: "9d424edcbfb6ff43f5829c67d22cf834083fc7636dee07b4c3e04936818814f9" + sha256: "24a2c445b15de3af7e4582ebceb2aa9a1e3731d0202cb3e7a1e03012440fa07d" url: "https://pub.dev" source: hosted - version: "1.4.6" + version: "1.4.35" firebase_remote_config_web: dependency: transitive description: name: firebase_remote_config_web - sha256: b4bb823426ef65c7af3e7829c1d8babc167951bec11712ac4ac7d884ad57ab3c + sha256: "525aa3000fd27cd023841c802010a06515e564aab2f147aa964b35f54abbf449" url: "https://pub.dev" source: hosted - version: "1.4.6" + version: "1.6.7" flutter: dependency: "direct main" description: flutter @@ -290,10 +290,10 @@ packages: dependency: "direct main" description: name: flutter_local_notifications - sha256: "3002092e5b8ce2f86c3361422e52e6db6776c23ee21e0b2f71b892bf4259ef04" + sha256: "40e6fbd2da7dcc7ed78432c5cdab1559674b4af035fddbfb2f9a8f9c2112fcef" url: "https://pub.dev" source: hosted - version: "15.1.1" + version: "17.1.2" flutter_local_notifications_linux: dependency: transitive description: @@ -306,10 +306,10 @@ packages: dependency: transitive description: name: flutter_local_notifications_platform_interface - sha256: "7cf643d6d5022f3baed0be777b0662cce5919c0a7b86e700299f22dc4ae660ef" + sha256: "340abf67df238f7f0ef58f4a26d2a83e1ab74c77ab03cd2b2d5018ac64db30b7" url: "https://pub.dev" source: hosted - version: "7.0.0+1" + version: "7.1.0" flutter_localizations: dependency: "direct main" description: flutter @@ -319,10 +319,10 @@ packages: dependency: "direct main" description: name: flutter_svg - sha256: "8c5d68a82add3ca76d792f058b186a0599414f279f00ece4830b9b231b570338" + sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" url: "https://pub.dev" source: hosted - version: "2.0.7" + version: "2.0.10+1" flutter_test: dependency: "direct dev" description: flutter @@ -337,10 +337,10 @@ packages: dependency: "direct main" description: name: freezed - sha256: be7826ed5d87e98c924a839542674fc14edbcb3e4fc0adbc058d680f2b241837 + sha256: a434911f643466d78462625df76fd9eb13e57348ff43fe1f77bbe909522c67a1 url: "https://pub.dev" source: hosted - version: "2.4.3" + version: "2.5.2" freezed_annotation: dependency: transitive description: @@ -353,10 +353,10 @@ packages: dependency: "direct main" description: name: get_it - sha256: f79870884de16d689cf9a7d15eedf31ed61d750e813c538a6efb92660fea83c3 + sha256: d85128a5dae4ea777324730dc65edd9c9f43155c109d5cc0a69cab74139fbac1 url: "https://pub.dev" source: hosted - version: "7.6.4" + version: "7.7.0" glob: dependency: transitive description: @@ -365,6 +365,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.2" + http: + dependency: transitive + description: + name: http + sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" + url: "https://pub.dev" + source: hosted + version: "1.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" image: dependency: transitive description: @@ -377,10 +393,10 @@ packages: dependency: "direct main" description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" js: dependency: transitive description: @@ -397,6 +413,30 @@ packages: url: "https://pub.dev" source: hosted version: "4.8.1" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + url: "https://pub.dev" + source: hosted + version: "10.0.4" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" lints: dependency: transitive description: @@ -417,26 +457,26 @@ packages: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.12.0" mime: dependency: transitive description: @@ -465,10 +505,10 @@ packages: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_parsing: dependency: transitive description: @@ -481,10 +521,10 @@ packages: dependency: "direct main" description: name: path_provider - sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa + sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.3" path_provider_android: dependency: transitive description: @@ -497,10 +537,10 @@ packages: dependency: transitive description: name: path_provider_foundation - sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d" + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.0" path_provider_linux: dependency: transitive description: @@ -569,10 +609,10 @@ packages: dependency: "direct main" description: name: provider - sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f + sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c url: "https://pub.dev" source: hosted - version: "6.0.5" + version: "6.1.2" pub_semver: dependency: transitive description: @@ -609,26 +649,26 @@ packages: dependency: "direct main" description: name: share_plus - sha256: "6cec740fa0943a826951223e76218df002804adb588235a8910dc3d6b0654e11" + sha256: ef3489a969683c4f3d0239010cc8b7a2a46543a8d139e111c06c558875083544 url: "https://pub.dev" source: hosted - version: "7.1.0" + version: "9.0.0" share_plus_platform_interface: dependency: transitive description: name: share_plus_platform_interface - sha256: "357412af4178d8e11d14f41723f80f12caea54cf0d5cd29af9dcdab85d58aea7" + sha256: "0f9e4418835d1b2c3ae78fdb918251959106cefdbc4dd43526e182f80e82f6d4" url: "https://pub.dev" source: hosted - version: "3.3.0" + version: "4.0.0" shared_preferences: dependency: "direct main" description: name: shared_preferences - sha256: b7f41bad7e521d205998772545de63ff4e6c97714775902c199353f8bf1511ac + sha256: d3bbe5553a986e83980916ded2f0b435ef2e1893dfaa29d5a7a790d0eca12180 url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.2.3" shared_preferences_android: dependency: transitive description: @@ -641,10 +681,10 @@ packages: dependency: transitive description: name: shared_preferences_foundation - sha256: "7bf53a9f2d007329ee6f3df7268fd498f8373602f943c975598bbb34649b62a7" + sha256: "0a8a893bf4fd1152f93fec03a415d11c27c74454d96e2318a7ac38dd18683ab7" url: "https://pub.dev" source: hosted - version: "2.3.4" + version: "2.4.0" shared_preferences_linux: dependency: transitive description: @@ -702,10 +742,10 @@ packages: dependency: "direct main" description: name: sqflite - sha256: "591f1602816e9c31377d5f008c2d9ef7b8aca8941c3f89cc5fd9d84da0c38a9a" + sha256: a43e5a27235518c03ca238e7b4732cf35eabe863a369ceba6cbefa537a66f16d url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.3.3+1" sqflite_common: dependency: transitive description: @@ -718,18 +758,18 @@ packages: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" string_scanner: dependency: transitive description: @@ -758,10 +798,10 @@ packages: dependency: transitive description: name: test_api - sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.0" + version: "0.7.0" timezone: dependency: transitive description: @@ -782,66 +822,66 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: "47e208a6711459d813ba18af120d9663c20bdf6985d6ad39fe165d2538378d27" + sha256: "6ce1e04375be4eed30548f10a315826fd933c1e493206eab82eed01f438c8d2e" url: "https://pub.dev" source: hosted - version: "6.1.14" + version: "6.2.6" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: b693e6698f7e6985710d67a050e3acbdda3b9cfc4b43b9f1c40cdbe42c705b92 + sha256: "507dc655b1d9cb5ebc756032eb785f114e415f91557b73bf60b7e201dfedeb2f" url: "https://pub.dev" source: hosted - version: "6.0.15" + version: "6.2.2" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: e51a93f0da65733beb69fdbc43cea524d86ed8e524479e9faefc9304cec34a57 + sha256: "7068716403343f6ba4969b4173cbf3b84fc768042124bc2c011e5d782b24fe89" url: "https://pub.dev" source: hosted - version: "6.0.15" + version: "6.3.0" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: b651aad005e0cb06a01dbd84b428a301916dc75f0e7ea6165f80057fee2d8e8e + sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 url: "https://pub.dev" source: hosted - version: "3.0.6" + version: "3.1.1" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - sha256: c028c7f80fdb99cf48b94c471c0f8b9b855a188f4865df76e2a7663ae640e9d2 + sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.2.0" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface - sha256: "95465b39f83bfe95fcb9d174829d6476216f2d548b79c38ab2506e0458787618" + sha256: "4aca1e060978e19b2998ee28503f40b5ba6226819c2b5e3e4d1821e8ccd92198" url: "https://pub.dev" source: hosted - version: "2.1.5" + version: "2.3.0" url_launcher_web: dependency: transitive description: name: url_launcher_web - sha256: "2942294a500b4fa0b918685aff406773ba0a4cd34b7f42198742a94083020ce5" + sha256: "8d9e750d8c9338601e709cd0885f95825086bd8b642547f26bda435aade95d8a" url: "https://pub.dev" source: hosted - version: "2.0.20" + version: "2.3.1" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: "95fef3129dc7cfaba2bc3d5ba2e16063bb561fc6d78e63eee16162bc70029069" + sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7 url: "https://pub.dev" source: hosted - version: "3.0.8" + version: "3.1.1" uuid: dependency: transitive description: @@ -854,26 +894,26 @@ packages: dependency: transitive description: name: vector_graphics - sha256: "670f6e07aca990b4a2bcdc08a784193c4ccdd1932620244c3a86bb72a0eac67f" + sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" url: "https://pub.dev" source: hosted - version: "1.1.7" + version: "1.1.11+1" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: "7451721781d967db9933b63f5733b1c4533022c0ba373a01bdd79d1a5457f69f" + sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da url: "https://pub.dev" source: hosted - version: "1.1.7" + version: "1.1.11+1" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: "80a13c613c8bde758b1464a1755a7b3a8f2b6cec61fbf0f5a53c94c30f03ba2e" + sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" url: "https://pub.dev" source: hosted - version: "1.1.7" + version: "1.1.11+1" vector_math: dependency: transitive description: @@ -882,6 +922,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + url: "https://pub.dev" + source: hosted + version: "14.2.1" watcher: dependency: transitive description: @@ -894,10 +942,10 @@ packages: dependency: transitive description: name: web - sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.1.4-beta" + version: "0.5.1" win32: dependency: transitive description: @@ -931,5 +979,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.1.2 <4.0.0" - flutter: ">=3.13.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.19.0" diff --git a/pubspec.yaml b/pubspec.yaml index 88ab937..0790e73 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,28 +6,28 @@ environment: sdk: ">=3.1.2 <4.0.0" dependencies: - animations: ^2.0.8 - firebase_core: ^2.16.0 - firebase_messaging: ^14.6.8 - firebase_remote_config: ^4.2.6 + animations: ^2.0.11 + firebase_core: ^2.32.0 + firebase_messaging: ^14.9.4 + firebase_remote_config: ^4.4.7 flutter: sdk: flutter flutter_datetime_picker: ^1.5.1 - flutter_local_notifications: ^15.1.1 + flutter_local_notifications: ^17.1.2 flutter_localizations: sdk: flutter - flutter_svg: ^2.0.7 - freezed: ^2.4.3 - get_it: ^7.6.4 - intl: ^0.18.1 - path_provider: ^2.1.1 - provider: ^6.0.5 + flutter_svg: ^2.0.10+1 + freezed: ^2.5.2 + get_it: ^7.7.0 + intl: ^0.19.0 + path_provider: ^2.1.3 + provider: ^6.1.2 reorderables: ^0.6.0 scrollable_positioned_list: ^0.3.8 - share_plus: ^7.1.0 - shared_preferences: ^2.2.1 - sqflite: ^2.3.0 - url_launcher: ^6.1.14 + share_plus: ^9.0.0 + shared_preferences: ^2.2.3 + sqflite: ^2.3.3+1 + url_launcher: ^6.2.6 dev_dependencies: flutter_launcher_icons: ^0.13.1