From 836a59e4da6982918d1dc3f961ca49cc3a7d951d Mon Sep 17 00:00:00 2001
From: GibreelAbdullah
Date: Thu, 26 Oct 2023 14:40:23 +0530
Subject: [PATCH] Refactor, Updated Dependency
---
.github/workflows/main.yml | 12 +-
.gitignore | 9 +-
.metadata | 31 +-
.vscode/launch.json | 13 -
analysis_options.yaml | 28 -
android/app/build.gradle | 2 +-
android/app/google-services.json | 39 --
android/app/src/debug/AndroidManifest.xml | 6 +-
.../app/FlutterMultiDexApplication.java | 25 +
.../com/example/hans_wehr/MainActivity.kt | 4 +-
android/app/src/profile/AndroidManifest.xml | 6 +-
android/build.gradle | 4 +-
.../gradle/wrapper/gradle-wrapper.properties | 3 +-
.../muslimtechnet/hanswehr/BuildConfig.java | 8 -
gen/com/muslimtechnet/hanswehr/Manifest.java | 7 -
gen/com/muslimtechnet/hanswehr/R.java | 7 -
ios/._Podfile | Bin 4096 -> 0 bytes
ios/.gitignore | 2 +
ios/Flutter/AppFrameworkInfo.plist | 4 +-
ios/Flutter/Debug.xcconfig | 1 -
ios/Flutter/Release.xcconfig | 1 -
ios/Podfile | 41 --
ios/Podfile.lock | 79 ---
ios/Runner.xcodeproj/project.pbxproj | 243 ++++---
.../xcshareddata/xcschemes/Runner.xcscheme | 21 +-
.../contents.xcworkspacedata | 3 -
.../LaunchBackground.imageset/Contents.json | 21 -
.../LaunchBackground.imageset/background.png | Bin 68 -> 0 bytes
.../LaunchImage.imageset/Contents.json | 10 +-
.../LaunchImage.imageset/LaunchImage.png | Bin 68 -> 68 bytes
.../LaunchImage.imageset/LaunchImage@2x.png | Bin 68 -> 68 bytes
.../LaunchImage.imageset/LaunchImage@3x.png | Bin 68 -> 68 bytes
ios/Runner/Base.lproj/LaunchScreen.storyboard | 17 +-
ios/Runner/Info.plist | 90 +--
ios/RunnerTests/RunnerTests.swift | 12 +
lib/classes/{appTheme.dart => app_theme.dart} | 28 +-
lib/classes/definitionClass.dart | 29 -
lib/classes/definition_provider.dart | 48 ++
....dart => search_suggestions_provider.dart} | 8 +-
.../{themeModel.dart => theme_model.dart} | 26 +-
.../{appConstants.dart => app_constants.dart} | 84 +--
lib/main.dart | 38 +-
lib/routes.dart | 28 +-
lib/screens/abbreviations.dart | 69 +-
lib/screens/{aboutApp.dart => about_app.dart} | 80 +--
lib/screens/browse.dart | 74 +-
lib/screens/donate.dart | 28 +-
lib/screens/favorites.dart | 24 +-
lib/screens/history.dart | 19 +-
lib/screens/{moreApps.dart => more_apps.dart} | 22 +-
lib/screens/preface.dart | 42 +-
.../{quranicWords.dart => quranic_words.dart} | 24 +-
lib/screens/search.dart | 161 ++---
lib/screens/settings.dart | 136 ++--
...rviceLocator.dart => service_locator.dart} | 2 +-
lib/services/LocalStorageService.dart | 147 ----
.../{appReview.dart => app_review.dart} | 7 +-
...dates.dart => check_database_updates.dart} | 0
lib/services/{getData.dart => get_data.dart} | 61 +-
lib/services/local_storage_service.dart | 138 ++++
...nitionSpace.dart => definition_space.dart} | 166 ++---
lib/widgets/drawer.dart | 94 +--
...Alert.dart => quran_occurrence_alert.dart} | 24 +-
linux/CMakeLists.txt | 1 +
macos/Flutter/GeneratedPluginRegistrant.swift | 12 +-
macos/Runner.xcodeproj/project.pbxproj | 125 +++-
.../xcshareddata/xcschemes/Runner.xcscheme | 19 +-
macos/Runner/MainFlutterWindow.swift | 2 +-
macos/RunnerTests/RunnerTests.swift | 12 +
pubspec.lock | 656 +++++++++---------
pubspec.yaml | 46 +-
test/widget_test.dart | 30 -
web/favicon.png | Bin 0 -> 917 bytes
web/icons/Icon-192.png | Bin 0 -> 5292 bytes
web/icons/Icon-512.png | Bin 0 -> 8252 bytes
web/icons/Icon-maskable-192.png | Bin 0 -> 5594 bytes
web/icons/Icon-maskable-512.png | Bin 0 -> 20998 bytes
web/index.html | 59 ++
web/manifest.json | 35 +
windows/CMakeLists.txt | 3 +-
windows/runner/flutter_window.cpp | 5 +
windows/runner/utils.cpp | 9 +-
windows/runner/win32_window.cpp | 2 +-
windows/runner/win32_window.h | 2 +-
84 files changed, 1740 insertions(+), 1634 deletions(-)
delete mode 100644 .vscode/launch.json
delete mode 100644 android/app/google-services.json
create mode 100644 android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java
delete mode 100644 gen/com/muslimtechnet/hanswehr/BuildConfig.java
delete mode 100644 gen/com/muslimtechnet/hanswehr/Manifest.java
delete mode 100644 gen/com/muslimtechnet/hanswehr/R.java
delete mode 100644 ios/._Podfile
delete mode 100644 ios/Podfile
delete mode 100644 ios/Podfile.lock
delete mode 100644 ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json
delete mode 100644 ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png
create mode 100644 ios/RunnerTests/RunnerTests.swift
rename lib/classes/{appTheme.dart => app_theme.dart} (88%)
delete mode 100644 lib/classes/definitionClass.dart
create mode 100644 lib/classes/definition_provider.dart
rename lib/classes/{searchModel.dart => search_suggestions_provider.dart} (89%)
rename lib/classes/{themeModel.dart => theme_model.dart} (89%)
rename lib/constants/{appConstants.dart => app_constants.dart} (96%)
rename lib/screens/{aboutApp.dart => about_app.dart} (63%)
rename lib/screens/{moreApps.dart => more_apps.dart} (70%)
rename lib/screens/{quranicWords.dart => quranic_words.dart} (87%)
rename lib/{serviceLocator.dart => service_locator.dart} (82%)
delete mode 100644 lib/services/LocalStorageService.dart
rename lib/services/{appReview.dart => app_review.dart} (78%)
rename lib/services/{checkDatabaseUpdates.dart => check_database_updates.dart} (100%)
rename lib/services/{getData.dart => get_data.dart} (86%)
create mode 100644 lib/services/local_storage_service.dart
rename lib/widgets/{definitionSpace.dart => definition_space.dart} (73%)
rename lib/widgets/{quranOccurrenceAlert.dart => quran_occurrence_alert.dart} (88%)
create mode 100644 macos/RunnerTests/RunnerTests.swift
delete mode 100644 test/widget_test.dart
create mode 100644 web/favicon.png
create mode 100644 web/icons/Icon-192.png
create mode 100644 web/icons/Icon-512.png
create mode 100644 web/icons/Icon-maskable-192.png
create mode 100644 web/icons/Icon-maskable-512.png
create mode 100644 web/index.html
create mode 100644 web/manifest.json
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 81df50f..950fd97 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -26,7 +26,7 @@ jobs:
uses: thedoctor0/zip-release@master
with:
type: 'zip'
- filename: MacRecoveryX-${{github.ref_name}}-linux.zip
+ filename: HansWehrDictionary-${{github.ref_name}}-linux.zip
directory: build/linux/x64/release/bundle
- name: Linux Release
uses: softprops/action-gh-release@v1
@@ -34,7 +34,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
- files: build/linux/x64/release/bundle/MacRecoveryX-${{github.ref_name}}-linux.zip
+ files: build/linux/x64/release/bundle/HansWehrDictionary-${{github.ref_name}}-linux.zip
build-and-release-windows:
runs-on: windows-latest
@@ -57,7 +57,7 @@ jobs:
uses: thedoctor0/zip-release@master
with:
type: 'zip'
- filename: MacRecoveryX-${{github.ref_name}}-windows.zip
+ filename: HansWehrDictionary-${{github.ref_name}}-windows.zip
directory: build/windows/runner/Release
- name: Windows Release
uses: softprops/action-gh-release@v1
@@ -65,7 +65,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
- files: build/windows/runner/Release/MacRecoveryX-${{github.ref_name}}-windows.zip
+ files: build/windows/runner/Release/HansWehrDictionary-${{github.ref_name}}-windows.zip
build-and-release-macos:
runs-on: macos-latest
@@ -88,7 +88,7 @@ jobs:
uses: thedoctor0/zip-release@master
with:
type: 'zip'
- filename: MacRecoveryX-${{github.ref_name}}-macos.zip
+ filename: HansWehrDictionary-${{github.ref_name}}-macos.zip
directory: build/macos/Build/Products/Release
- name: macOS Release
uses: softprops/action-gh-release@v1
@@ -96,4 +96,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
- files: build/macos/Build/Products/Release/MacRecoveryX-${{github.ref_name}}-macos.zip
+ files: build/macos/Build/Products/Release/HansWehrDictionary-${{github.ref_name}}-macos.zip
diff --git a/.gitignore b/.gitignore
index 4ab6e6a..24476c5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,7 @@
.buildlog/
.history
.svn/
+migrate_working_dir/
# IntelliJ related
*.iml
@@ -31,13 +32,13 @@
.pub/
/build/
-# Web related
-lib/generated_plugin_registrant.dart
-
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
-lib/properties.dart
\ No newline at end of file
+# Android Studio will place build artifacts here
+/android/app/debug
+/android/app/profile
+/android/app/release
diff --git a/.metadata b/.metadata
index 7772fa1..acfc1cf 100644
--- a/.metadata
+++ b/.metadata
@@ -1,11 +1,11 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
-# This file should be version controlled.
+# This file should be version controlled and should not be manually edited.
version:
- revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
- channel: stable
+ revision: "6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e"
+ channel: "stable"
project_type: app
@@ -13,17 +13,26 @@ project_type: app
migration:
platforms:
- platform: root
- create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
- base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
+ create_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
+ base_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
+ - platform: android
+ create_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
+ base_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
+ - platform: ios
+ create_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
+ base_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
- platform: linux
- create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
- base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
+ create_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
+ base_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
- platform: macos
- create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
- base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
+ create_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
+ base_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
+ - platform: web
+ create_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
+ base_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
- platform: windows
- create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
- base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
+ create_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
+ base_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
# User provided section
diff --git a/.vscode/launch.json b/.vscode/launch.json
deleted file mode 100644
index b942668..0000000
--- a/.vscode/launch.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- // Use IntelliSense to learn about possible attributes.
- // Hover to view descriptions of existing attributes.
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
- "version": "0.2.0",
- "configurations": [
- {
- "name": "hans_wehr_dictionary",
- "request": "launch",
- "type": "dart"
- }
- ]
-}
\ No newline at end of file
diff --git a/analysis_options.yaml b/analysis_options.yaml
index 61b6c4d..f9b3034 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -1,29 +1 @@
-# This file configures the analyzer, which statically analyzes Dart code to
-# check for errors, warnings, and lints.
-#
-# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
-# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
-# invoked from the command line by running `flutter analyze`.
-
-# The following line activates a set of recommended lints for Flutter apps,
-# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
-
-linter:
- # The lint rules applied to this project can be customized in the
- # section below to disable rules from the `package:flutter_lints/flutter.yaml`
- # included above or to enable additional rules. A list of all available lints
- # and their documentation is published at
- # https://dart-lang.github.io/linter/lints/index.html.
- #
- # Instead of disabling a lint rule for the entire project in the
- # section below, it can also be suppressed for a single line of code
- # or a specific dart file by using the `// ignore: name_of_lint` and
- # `// ignore_for_file: name_of_lint` syntax on the line or in the file
- # producing the lint.
- rules:
- # avoid_print: false # Uncomment to disable the `avoid_print` rule
- # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
-
-# Additional information about this file can be found at
-# https://dart.dev/guides/language/analysis-options
diff --git a/android/app/build.gradle b/android/app/build.gradle
index d7a25c1..35d7d64 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -44,7 +44,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.muslimtechnet.hanswehr"
minSdkVersion 23
- targetSdkVersion 31
+ targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
diff --git a/android/app/google-services.json b/android/app/google-services.json
deleted file mode 100644
index 0a977d9..0000000
--- a/android/app/google-services.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "project_info": {
- "project_number": "1006524653782",
- "project_id": "hans-wehr-dictionary",
- "storage_bucket": "hans-wehr-dictionary.appspot.com"
- },
- "client": [
- {
- "client_info": {
- "mobilesdk_app_id": "1:1006524653782:android:d0ad77dfd4d68ee7ea2977",
- "android_client_info": {
- "package_name": "com.muslimtechnet.hanswehr"
- }
- },
- "oauth_client": [
- {
- "client_id": "1006524653782-mt7d7c5sluvbjs9tfotbkuhhg9rujkra.apps.googleusercontent.com",
- "client_type": 3
- }
- ],
- "api_key": [
- {
- "current_key": "AIzaSyBoHG4aA6EmO6qTYh4I9qX9LzmqN-rb_HA"
- }
- ],
- "services": {
- "appinvite_service": {
- "other_platform_oauth_client": [
- {
- "client_id": "1006524653782-mt7d7c5sluvbjs9tfotbkuhhg9rujkra.apps.googleusercontent.com",
- "client_type": 3
- }
- ]
- }
- }
- }
- ],
- "configuration_version": "1"
-}
\ No newline at end of file
diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml
index d867380..399f698 100644
--- a/android/app/src/debug/AndroidManifest.xml
+++ b/android/app/src/debug/AndroidManifest.xml
@@ -1,6 +1,6 @@
-
-
diff --git a/android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java b/android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java
new file mode 100644
index 0000000..752fc18
--- /dev/null
+++ b/android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java
@@ -0,0 +1,25 @@
+// Generated file.
+//
+// If you wish to remove Flutter's multidex support, delete this entire file.
+//
+// Modifications to this file should be done in a copy under a different name
+// as this file may be regenerated.
+
+package io.flutter.app;
+
+import android.app.Application;
+import android.content.Context;
+import androidx.annotation.CallSuper;
+import androidx.multidex.MultiDex;
+
+/**
+ * Extension of {@link android.app.Application}, adding multidex support.
+ */
+public class FlutterMultiDexApplication extends Application {
+ @Override
+ @CallSuper
+ protected void attachBaseContext(Context base) {
+ super.attachBaseContext(base);
+ MultiDex.install(this);
+ }
+}
diff --git a/android/app/src/main/kotlin/com/example/hans_wehr/MainActivity.kt b/android/app/src/main/kotlin/com/example/hans_wehr/MainActivity.kt
index a223911..91aad04 100644
--- a/android/app/src/main/kotlin/com/example/hans_wehr/MainActivity.kt
+++ b/android/app/src/main/kotlin/com/example/hans_wehr/MainActivity.kt
@@ -1,4 +1,6 @@
+package com.example.hans_wehr
+
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
-}
\ No newline at end of file
+}
diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml
index d867380..399f698 100644
--- a/android/app/src/profile/AndroidManifest.xml
+++ b/android/app/src/profile/AndroidManifest.xml
@@ -1,6 +1,6 @@
-
-
diff --git a/android/build.gradle b/android/build.gradle
index 4bb0eb4..9eb4834 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,5 +1,5 @@
buildscript {
- ext.kotlin_version = '1.6.21'
+ ext.kotlin_version = '1.9.10'
repositories {
jcenter()
google()
@@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}
-task clean(type: Delete) {
+tasks.register("clean", Delete) {
delete rootProject.buildDir
}
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index cc5527d..3c472b9 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,5 @@
-#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
diff --git a/gen/com/muslimtechnet/hanswehr/BuildConfig.java b/gen/com/muslimtechnet/hanswehr/BuildConfig.java
deleted file mode 100644
index fdb3ad5..0000000
--- a/gen/com/muslimtechnet/hanswehr/BuildConfig.java
+++ /dev/null
@@ -1,8 +0,0 @@
-/*___Generated_by_IDEA___*/
-
-package com.muslimtechnet.hanswehr;
-
-/* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */
-public final class BuildConfig {
- public final static boolean DEBUG = Boolean.parseBoolean(null);
-}
\ No newline at end of file
diff --git a/gen/com/muslimtechnet/hanswehr/Manifest.java b/gen/com/muslimtechnet/hanswehr/Manifest.java
deleted file mode 100644
index fd5f944..0000000
--- a/gen/com/muslimtechnet/hanswehr/Manifest.java
+++ /dev/null
@@ -1,7 +0,0 @@
-/*___Generated_by_IDEA___*/
-
-package com.muslimtechnet.hanswehr;
-
-/* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */
-public final class Manifest {
-}
\ No newline at end of file
diff --git a/gen/com/muslimtechnet/hanswehr/R.java b/gen/com/muslimtechnet/hanswehr/R.java
deleted file mode 100644
index 2a43694..0000000
--- a/gen/com/muslimtechnet/hanswehr/R.java
+++ /dev/null
@@ -1,7 +0,0 @@
-/*___Generated_by_IDEA___*/
-
-package com.muslimtechnet.hanswehr;
-
-/* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */
-public final class R {
-}
\ No newline at end of file
diff --git a/ios/._Podfile b/ios/._Podfile
deleted file mode 100644
index 24deed1c8577ba1ce313868548b0099b28e71c37..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 4096
zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDJkFz{^v(m+1nBL)UWIUt(=a103vvYvJF
zKST$^44`sLG%bukK2%&ZIX_n~v7jI)Rj;r#u_!UGBr`9S!N9=6*xJm%B+ZXA^|MKrSRBvsj@hwK%`DC^=OjEx#yR
uAv3Qe71-^}&r8h7sZ_{GO)F7I%1O-22KI%ax`s4`>VLRbWEkZB{|5jH9W^}w
diff --git a/ios/.gitignore b/ios/.gitignore
index e96ef60..7a7f987 100644
--- a/ios/.gitignore
+++ b/ios/.gitignore
@@ -1,3 +1,4 @@
+**/dgph
*.mode1v3
*.mode2v3
*.moved-aside
@@ -18,6 +19,7 @@ Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
+Flutter/ephemeral/
Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
index f2872cf..9625e10 100644
--- a/ios/Flutter/AppFrameworkInfo.plist
+++ b/ios/Flutter/AppFrameworkInfo.plist
@@ -3,7 +3,7 @@
CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
+ en
CFBundleExecutable
App
CFBundleIdentifier
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 9.0
+ 11.0
diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig
index ec97fc6..592ceee 100644
--- a/ios/Flutter/Debug.xcconfig
+++ b/ios/Flutter/Debug.xcconfig
@@ -1,2 +1 @@
-#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig
index c4855bf..592ceee 100644
--- a/ios/Flutter/Release.xcconfig
+++ b/ios/Flutter/Release.xcconfig
@@ -1,2 +1 @@
-#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
diff --git a/ios/Podfile b/ios/Podfile
deleted file mode 100644
index 1e8c3c9..0000000
--- a/ios/Podfile
+++ /dev/null
@@ -1,41 +0,0 @@
-# Uncomment this line to define a global platform for your project
-# platform :ios, '9.0'
-
-# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
-ENV['COCOAPODS_DISABLE_STATS'] = 'true'
-
-project 'Runner', {
- 'Debug' => :debug,
- 'Profile' => :release,
- 'Release' => :release,
-}
-
-def flutter_root
- generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
- unless File.exist?(generated_xcode_build_settings_path)
- raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
- end
-
- File.foreach(generated_xcode_build_settings_path) do |line|
- matches = line.match(/FLUTTER_ROOT\=(.*)/)
- return matches[1].strip if matches
- end
- raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
-end
-
-require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
-
-flutter_ios_podfile_setup
-
-target 'Runner' do
- use_frameworks!
- use_modular_headers!
-
- flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
-end
-
-post_install do |installer|
- installer.pods_project.targets.each do |target|
- flutter_additional_ios_build_settings(target)
- end
-end
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
deleted file mode 100644
index bc3c09d..0000000
--- a/ios/Podfile.lock
+++ /dev/null
@@ -1,79 +0,0 @@
-PODS:
- - Flutter (1.0.0)
- - FMDB (2.7.5):
- - FMDB/standard (= 2.7.5)
- - FMDB/standard (2.7.5)
- - in_app_review (0.2.0):
- - Flutter
- - path_provider (0.0.1):
- - Flutter
- - share (0.0.1):
- - Flutter
- - shared_preferences (0.0.1):
- - Flutter
- - sqflite (0.0.2):
- - Flutter
- - FMDB (>= 2.7.5)
- - url_launcher (0.0.1):
- - Flutter
- - video_player (0.0.1):
- - Flutter
- - wakelock (0.0.1):
- - Flutter
- - webview_flutter (0.0.1):
- - Flutter
-
-DEPENDENCIES:
- - Flutter (from `Flutter`)
- - in_app_review (from `.symlinks/plugins/in_app_review/ios`)
- - path_provider (from `.symlinks/plugins/path_provider/ios`)
- - share (from `.symlinks/plugins/share/ios`)
- - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- - sqflite (from `.symlinks/plugins/sqflite/ios`)
- - url_launcher (from `.symlinks/plugins/url_launcher/ios`)
- - video_player (from `.symlinks/plugins/video_player/ios`)
- - wakelock (from `.symlinks/plugins/wakelock/ios`)
- - webview_flutter (from `.symlinks/plugins/webview_flutter/ios`)
-
-SPEC REPOS:
- trunk:
- - FMDB
-
-EXTERNAL SOURCES:
- Flutter:
- :path: Flutter
- in_app_review:
- :path: ".symlinks/plugins/in_app_review/ios"
- path_provider:
- :path: ".symlinks/plugins/path_provider/ios"
- share:
- :path: ".symlinks/plugins/share/ios"
- shared_preferences:
- :path: ".symlinks/plugins/shared_preferences/ios"
- sqflite:
- :path: ".symlinks/plugins/sqflite/ios"
- url_launcher:
- :path: ".symlinks/plugins/url_launcher/ios"
- video_player:
- :path: ".symlinks/plugins/video_player/ios"
- wakelock:
- :path: ".symlinks/plugins/wakelock/ios"
- webview_flutter:
- :path: ".symlinks/plugins/webview_flutter/ios"
-
-SPEC CHECKSUMS:
- Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
- FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
- in_app_review: 4a97249f7a2f539a0f294c2d9196b7fe35e49541
- path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
- share: 0b2c3e82132f5888bccca3351c504d0003b3b410
- shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
- sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
- url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
- video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e
- wakelock: b0843b2479edbf6504d8d262c2959446f35373aa
- webview_flutter: 9f491a9b5a66f2573946a389b2677987b0ff8c0b
-
-PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
-
-COCOAPODS: 1.10.1
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 4828be7..5fc9859 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -3,19 +3,29 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 46;
+ objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
- 43E9CA89F47D1FDB34939265 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C8A13D8857D3BAD074F8435A /* Pods_Runner.framework */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+ 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
/* End PBXBuildFile section */
+/* Begin PBXContainerItemProxy section */
+ 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 97C146E61CF9000F007C117D /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 97C146ED1CF9000F007C117D;
+ remoteInfo = Runner;
+ };
+/* End PBXContainerItemProxy section */
+
/* Begin PBXCopyFilesBuildPhase section */
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
@@ -43,10 +53,8 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- ADB5DAD0D6C181B7E50A1001 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
- B91641690FDC10F7E695EDEE /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
- C4F3784223F898177F22886E /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
- C8A13D8857D3BAD074F8435A /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; };
+ 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -54,24 +62,12 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- 43E9CA89F47D1FDB34939265 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
- 549BAF9DDA4CAEB562D76A62 /* Pods */ = {
- isa = PBXGroup;
- children = (
- ADB5DAD0D6C181B7E50A1001 /* Pods-Runner.debug.xcconfig */,
- B91641690FDC10F7E695EDEE /* Pods-Runner.release.xcconfig */,
- C4F3784223F898177F22886E /* Pods-Runner.profile.xcconfig */,
- );
- name = Pods;
- path = Pods;
- sourceTree = "";
- };
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
@@ -83,14 +79,21 @@
name = Flutter;
sourceTree = "";
};
+ 331C8082294A63A400263BE5 /* RunnerTests */ = {
+ isa = PBXGroup;
+ children = (
+ 331C807B294A618700263BE5 /* RunnerTests.swift */,
+ );
+ path = RunnerTests;
+ sourceTree = "";
+ };
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
- 549BAF9DDA4CAEB562D76A62 /* Pods */,
- C14DB7DAA58D6214F0B8F980 /* Frameworks */,
+ 331C8082294A63A400263BE5 /* RunnerTests */,
);
sourceTree = "";
};
@@ -98,6 +101,7 @@
isa = PBXGroup;
children = (
97C146EE1CF9000F007C117D /* Runner.app */,
+ 331C8081294A63A400263BE5 /* RunnerTests.xctest */,
);
name = Products;
sourceTree = "";
@@ -117,29 +121,37 @@
path = Runner;
sourceTree = "";
};
- C14DB7DAA58D6214F0B8F980 /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- C8A13D8857D3BAD074F8435A /* Pods_Runner.framework */,
- );
- name = Frameworks;
- sourceTree = "";
- };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
+ 331C8080294A63A400263BE5 /* RunnerTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
+ buildPhases = (
+ 331C807D294A63A400263BE5 /* Sources */,
+ 331C807E294A63A400263BE5 /* Frameworks */,
+ 331C807F294A63A400263BE5 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 331C8086294A63A400263BE5 /* PBXTargetDependency */,
+ );
+ name = RunnerTests;
+ productName = RunnerTests;
+ productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
97C146ED1CF9000F007C117D /* Runner */ = {
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
- 9AE148C57AE2E9A95270378B /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
- 4ECFAF3E0D8DCA9597F9188D /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@@ -156,9 +168,14 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 1020;
+ BuildIndependentTargetsInParallel = YES;
+ LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "";
TargetAttributes = {
+ 331C8080294A63A400263BE5 = {
+ CreatedOnToolsVersion = 14.0;
+ TestTargetID = 97C146ED1CF9000F007C117D;
+ };
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
LastSwiftMigration = 1100;
@@ -179,11 +196,19 @@
projectRoot = "";
targets = (
97C146ED1CF9000F007C117D /* Runner */,
+ 331C8080294A63A400263BE5 /* RunnerTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
+ 331C807F294A63A400263BE5 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
97C146EC1CF9000F007C117D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@@ -200,10 +225,12 @@
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
+ "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
@@ -212,25 +239,9 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
- 4ECFAF3E0D8DCA9597F9188D /* [CP] Embed Pods Frameworks */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
- );
- name = "[CP] Embed Pods Frameworks";
- outputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
- showEnvVarsInLog = 0;
- };
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
@@ -243,31 +254,17 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
- 9AE148C57AE2E9A95270378B /* [CP] Check Pods Manifest.lock */ = {
- isa = PBXShellScriptBuildPhase;
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 331C807D294A63A400263BE5 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- );
- inputFileListPaths = (
- );
- inputPaths = (
- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
- "${PODS_ROOT}/Manifest.lock",
- );
- name = "[CP] Check Pods Manifest.lock";
- outputFileListPaths = (
- );
- outputPaths = (
- "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
+ 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
- showEnvVarsInLog = 0;
};
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
97C146EA1CF9000F007C117D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -279,6 +276,14 @@
};
/* End PBXSourcesBuildPhase section */
+/* Begin PBXTargetDependency section */
+ 331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 97C146ED1CF9000F007C117D /* Runner */;
+ targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
/* Begin PBXVariantGroup section */
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
isa = PBXVariantGroup;
@@ -340,7 +345,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -357,17 +362,12 @@
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Flutter",
- );
INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- LIBRARY_SEARCH_PATHS = (
+ LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
- "$(PROJECT_DIR)/Flutter",
+ "@executable_path/Frameworks",
);
- PRODUCT_BUNDLE_IDENTIFIER = com.muslimtechnet.hanswehr;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.hansWehr;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
@@ -375,6 +375,56 @@
};
name = Profile;
};
+ 331C8088294A63A400263BE5 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = AE0B7B92F70575B8D7E0D07E /* Pods-RunnerTests.debug.xcconfig */;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.hansWehr.RunnerTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
+ };
+ name = Debug;
+ };
+ 331C8089294A63A400263BE5 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 89B67EB44CE7B6631473024E /* Pods-RunnerTests.release.xcconfig */;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.hansWehr.RunnerTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 5.0;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
+ };
+ name = Release;
+ };
+ 331C808A294A63A400263BE5 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 640959BDD8F10B91D80A66BE /* Pods-RunnerTests.profile.xcconfig */;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.hansWehr.RunnerTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 5.0;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
+ };
+ name = Profile;
+ };
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -422,7 +472,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -471,11 +521,12 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
- SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
+ SWIFT_COMPILATION_MODE = wholemodule;
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
@@ -489,17 +540,12 @@
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Flutter",
- );
INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- LIBRARY_SEARCH_PATHS = (
+ LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
- "$(PROJECT_DIR)/Flutter",
+ "@executable_path/Frameworks",
);
- PRODUCT_BUNDLE_IDENTIFIER = com.muslimtechnet.hanswehr;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.hansWehr;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -516,17 +562,12 @@
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Flutter",
- );
INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- LIBRARY_SEARCH_PATHS = (
+ LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
- "$(PROJECT_DIR)/Flutter",
+ "@executable_path/Frameworks",
);
- PRODUCT_BUNDLE_IDENTIFIER = com.muslimtechnet.hanswehr;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.hansWehr;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
@@ -537,6 +578,16 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
+ 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 331C8088294A63A400263BE5 /* Debug */,
+ 331C8089294A63A400263BE5 /* Release */,
+ 331C808A294A63A400263BE5 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index a28140c..87131a0 100644
--- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,6 +1,6 @@
-
-
-
-
+
+
+
+
+
+
-
-
-
-
diff --git a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json
deleted file mode 100644
index 9f447e1..0000000
--- a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "images" : [
- {
- "filename" : "background.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
diff --git a/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png b/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png
deleted file mode 100644
index e29b3b59f99290135b0cf3745bc9993ce935b27c..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 68
zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx1|;Q0k8}blZci7-kP61+pZqKgT>LDI5tB{+
Q0fiYnUHx3vIVCg!0BB+iu>b%7
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
index 00cabce..0bedcf2 100644
--- a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
+++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
@@ -1,23 +1,23 @@
{
"images" : [
{
- "filename" : "LaunchImage.png",
"idiom" : "universal",
+ "filename" : "LaunchImage.png",
"scale" : "1x"
},
{
- "filename" : "LaunchImage@2x.png",
"idiom" : "universal",
+ "filename" : "LaunchImage@2x.png",
"scale" : "2x"
},
{
- "filename" : "LaunchImage@3x.png",
"idiom" : "universal",
+ "filename" : "LaunchImage@3x.png",
"scale" : "3x"
}
],
"info" : {
- "author" : "xcode",
- "version" : 1
+ "version" : 1,
+ "author" : "xcode"
}
}
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
index 67774cf3dacac0ad161013438381c330272b67f7..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 100644
GIT binary patch
delta 48
zcmZ>9nINgn!oa|=RfdNNNO60*IEGZrN&a=7fq{vgk!hBUVIfeM!PC{xWt~$(69DxS
B3j+WE
delta 48
zcmZ>9nINgn#=yWJFM6aCNO60*IEGX(CMPm5F)&Cnuuk}3_7y11;OXk;vd$@?2>|Y^
B3kv`M
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
index 67774cf3dacac0ad161013438381c330272b67f7..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 100644
GIT binary patch
delta 48
zcmZ>9nINgn!oa|=RfdNNNO60*IEGZrN&a=7fq{vgk!hBUVIfeM!PC{xWt~$(69DxS
B3j+WE
delta 48
zcmZ>9nINgn#=yWJFM6aCNO60*IEGX(CMPm5F)&Cnuuk}3_7y11;OXk;vd$@?2>|Y^
B3kv`M
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
index 67774cf3dacac0ad161013438381c330272b67f7..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 100644
GIT binary patch
delta 48
zcmZ>9nINgn!oa|=RfdNNNO60*IEGZrN&a=7fq{vgk!hBUVIfeM!PC{xWt~$(69DxS
B3j+WE
delta 48
zcmZ>9nINgn#=yWJFM6aCNO60*IEGX(CMPm5F)&Cnuuk}3_7y11;OXk;vd$@?2>|Y^
B3kv`M
diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard
index c9811f0..f2e259c 100644
--- a/ios/Runner/Base.lproj/LaunchScreen.storyboard
+++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -16,19 +16,13 @@
-
-
+
+
-
-
-
-
-
-
-
-
+
+
@@ -39,6 +33,5 @@
-
-
\ No newline at end of file
+
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index e4f3b10..fc48e0c 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -1,47 +1,49 @@
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- search
- CFBundlePackageType
- APPL
- CFBundleShortVersionString
- $(FLUTTER_BUILD_NAME)
- CFBundleSignature
- ????
- CFBundleVersion
- $(FLUTTER_BUILD_NUMBER)
- LSRequiresIPhoneOS
-
- UILaunchStoryboardName
- LaunchScreen
- UIMainStoryboardFile
- Main
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UIViewControllerBasedStatusBarAppearance
-
- UIStatusBarHidden
-
-
-
\ No newline at end of file
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ Hans Wehr
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ hans_wehr
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ $(FLUTTER_BUILD_NAME)
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ $(FLUTTER_BUILD_NUMBER)
+ LSRequiresIPhoneOS
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ CADisableMinimumFrameDurationOnPhone
+
+ UIApplicationSupportsIndirectInputEvents
+
+
+
diff --git a/ios/RunnerTests/RunnerTests.swift b/ios/RunnerTests/RunnerTests.swift
new file mode 100644
index 0000000..86a7c3b
--- /dev/null
+++ b/ios/RunnerTests/RunnerTests.swift
@@ -0,0 +1,12 @@
+import Flutter
+import UIKit
+import XCTest
+
+class RunnerTests: XCTestCase {
+
+ func testExample() {
+ // If you add code to the Runner application, consider adding tests here.
+ // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
+ }
+
+}
diff --git a/lib/classes/appTheme.dart b/lib/classes/app_theme.dart
similarity index 88%
rename from lib/classes/appTheme.dart
rename to lib/classes/app_theme.dart
index 461b26d..220c9d0 100644
--- a/lib/classes/appTheme.dart
+++ b/lib/classes/app_theme.dart
@@ -1,33 +1,33 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
-import '../serviceLocator.dart';
-import '../services/LocalStorageService.dart';
+import '../service_locator.dart';
+import '../services/local_storage_service.dart';
ThemeData lightTheme = ThemeData.light().copyWith(
textTheme: ThemeData.light().textTheme.copyWith(
- bodyText1: TextStyle(
+ bodyLarge: TextStyle(
fontFamily: locator().font,
fontSize: 16 + locator().fontSizeDelta,
color: Colors.black,
),
- bodyText2: TextStyle(
+ bodyMedium: TextStyle(
fontFamily: locator().font,
fontSize: 16 + locator().fontSizeDelta,
color:
hexToColor(locator().highlightTextColor) ??
Colors.blue,
),
- subtitle1: TextStyle(
+ titleMedium: TextStyle(
fontFamily: locator().font,
fontSize: 16 + locator().fontSizeDelta,
color: Colors.black,
),
- subtitle2: TextStyle(
+ titleSmall: TextStyle(
fontFamily: locator().font,
fontSize: 16 + locator().fontSizeDelta,
color: Colors.white,
),
- headline6: TextStyle(
+ titleLarge: TextStyle(
fontFamily: locator().font,
fontSize: 20 + locator().fontSizeDelta,
color: Colors.black,
@@ -49,34 +49,34 @@ ThemeData lightTheme = ThemeData.light().copyWith(
),
brightness: Brightness.light,
cardColor: hexToColor(locator().searchBarColor),
- iconTheme: IconThemeData(color: Colors.black),
+ iconTheme: const IconThemeData(color: Colors.black),
);
ThemeData darkTheme = ThemeData.dark().copyWith(
textTheme: ThemeData.dark().textTheme.copyWith(
- bodyText1: TextStyle(
+ bodyLarge: TextStyle(
fontFamily: locator().font,
fontSize: 16 + locator().fontSizeDelta,
color: Colors.white,
),
- bodyText2: TextStyle(
+ bodyMedium: TextStyle(
fontFamily: locator().font,
fontSize: 16 + locator().fontSizeDelta,
color:
hexToColor(locator().highlightTextColor) ??
Colors.cyan,
),
- subtitle1: TextStyle(
+ titleMedium: TextStyle(
fontFamily: locator().font,
fontSize: 16 + locator().fontSizeDelta,
color: Colors.white,
),
- subtitle2: TextStyle(
+ titleSmall: TextStyle(
fontFamily: locator().font,
fontSize: 16 + locator().fontSizeDelta,
color: Colors.black,
),
- headline6: TextStyle(
+ titleLarge: TextStyle(
fontFamily: locator().font,
fontSize: 20 + locator().fontSizeDelta,
color: Colors.white,
@@ -98,7 +98,7 @@ ThemeData darkTheme = ThemeData.dark().copyWith(
),
cardColor: hexToColor(locator().searchBarColor),
brightness: Brightness.dark,
- iconTheme: IconThemeData(color: Colors.white),
+ iconTheme: const IconThemeData(color: Colors.white),
);
Color? hexToColor(String? code) {
diff --git a/lib/classes/definitionClass.dart b/lib/classes/definitionClass.dart
deleted file mode 100644
index a763e55..0000000
--- a/lib/classes/definitionClass.dart
+++ /dev/null
@@ -1,29 +0,0 @@
-import 'package:flutter/foundation.dart';
-
-class DefinitionClass with ChangeNotifier {
- DefinitionClass({
- required this.id,
- required this.word,
- required this.definition,
- required this.isRoot,
- required this.highlight,
- this.searchWord,
- this.quranOccurrence,
- required this.favoriteFlag,
- });
-
- static String? searchType;
- String? searchWord;
- List id;
- List word;
- List definition;
- List isRoot;
- List highlight;
- List? quranOccurrence;
- List favoriteFlag;
-
- void updateSearchType(String newSearchType) {
- DefinitionClass.searchType = newSearchType;
- notifyListeners();
- }
-}
diff --git a/lib/classes/definition_provider.dart b/lib/classes/definition_provider.dart
new file mode 100644
index 0000000..c50e670
--- /dev/null
+++ b/lib/classes/definition_provider.dart
@@ -0,0 +1,48 @@
+import 'package:flutter/foundation.dart';
+
+class DefinitionProvider with ChangeNotifier {
+ DefinitionProvider({
+ required this.id,
+ required this.word,
+ required this.definition,
+ required this.isRoot,
+ required this.highlight,
+ this.searchWord,
+ this.quranOccurrence,
+ required this.favoriteFlag,
+ });
+
+ String? searchType;
+ String? searchWord;
+ List id;
+ List word;
+ List definition;
+ List isRoot;
+ List highlight;
+ List? quranOccurrence;
+ List favoriteFlag;
+
+ void updateSearchType(String newSearchType) {
+ searchType = newSearchType;
+ notifyListeners();
+ }
+
+ void updateDefinition(
+ List newId,
+ List newWord,
+ List newDefinition,
+ List newIsRoot,
+ List newHighlight,
+ String newSearchWord,
+ List? newQuranOccurrence,
+ List newFavoriteFlag) {
+ id = newId;
+ word = newWord;
+ definition = newDefinition;
+ isRoot = newIsRoot;
+ highlight = newHighlight;
+ quranOccurrence = newQuranOccurrence;
+ favoriteFlag = newFavoriteFlag;
+ notifyListeners();
+ }
+}
diff --git a/lib/classes/searchModel.dart b/lib/classes/search_suggestions_provider.dart
similarity index 89%
rename from lib/classes/searchModel.dart
rename to lib/classes/search_suggestions_provider.dart
index 11bd446..9ec00da 100644
--- a/lib/classes/searchModel.dart
+++ b/lib/classes/search_suggestions_provider.dart
@@ -1,9 +1,9 @@
import 'package:flutter/material.dart';
-import '../services/LocalStorageService.dart';
-import '../constants/appConstants.dart';
-import '../serviceLocator.dart';
+import '../services/local_storage_service.dart';
+import '../constants/app_constants.dart';
+import '../service_locator.dart';
-class SearchModel extends ChangeNotifier {
+class SearchSuggestionsProvider extends ChangeNotifier {
bool _isLoading = false;
bool get isLoading => _isLoading;
diff --git a/lib/classes/themeModel.dart b/lib/classes/theme_model.dart
similarity index 89%
rename from lib/classes/themeModel.dart
rename to lib/classes/theme_model.dart
index 3819021..57b7eb2 100644
--- a/lib/classes/themeModel.dart
+++ b/lib/classes/theme_model.dart
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
-import '../serviceLocator.dart';
-import '../services/LocalStorageService.dart';
-import 'appTheme.dart';
+import '../service_locator.dart';
+import '../services/local_storage_service.dart';
+import 'app_theme.dart';
class ThemeModel extends ChangeNotifier {
ThemeData currentTheme =
@@ -12,29 +12,29 @@ class ThemeModel extends ChangeNotifier {
currentTheme = locator().darkTheme
? darkTheme.copyWith(
textTheme: ThemeData.dark().textTheme.copyWith(
- bodyText1: TextStyle(
+ bodyLarge: TextStyle(
fontFamily: locator().font,
fontSize: 16 + locator().fontSizeDelta,
color: Colors.white,
),
- bodyText2: TextStyle(
+ bodyMedium: TextStyle(
fontFamily: locator().font,
fontSize: 16 + locator().fontSizeDelta,
color: hexToColor(locator()
.highlightTextColor) ??
Colors.cyan,
),
- subtitle1: TextStyle(
+ titleMedium: TextStyle(
fontFamily: locator().font,
fontSize: 16 + locator().fontSizeDelta,
color: Colors.white,
),
- subtitle2: TextStyle(
+ titleSmall: TextStyle(
fontFamily: locator().font,
fontSize: 16 + locator().fontSizeDelta,
color: Colors.black,
),
- headline6: TextStyle(
+ titleLarge: TextStyle(
fontFamily: locator().font,
fontSize: 20 + locator().fontSizeDelta,
color: Colors.white,
@@ -60,29 +60,29 @@ class ThemeModel extends ChangeNotifier {
)
: lightTheme.copyWith(
textTheme: ThemeData.light().textTheme.copyWith(
- bodyText1: TextStyle(
+ bodyLarge: TextStyle(
fontFamily: locator().font,
fontSize: 16 + locator().fontSizeDelta,
color: Colors.black,
),
- bodyText2: TextStyle(
+ bodyMedium: TextStyle(
fontFamily: locator().font,
fontSize: 16 + locator().fontSizeDelta,
color: hexToColor(locator()
.highlightTextColor) ??
Colors.blue,
),
- subtitle1: TextStyle(
+ titleMedium: TextStyle(
fontFamily: locator().font,
fontSize: 16 + locator().fontSizeDelta,
color: Colors.black,
),
- subtitle2: TextStyle(
+ titleSmall: TextStyle(
fontFamily: locator().font,
fontSize: 16 + locator().fontSizeDelta,
color: Colors.white,
),
- headline6: TextStyle(
+ titleLarge: TextStyle(
fontFamily: locator().font,
fontSize: 20 + locator().fontSizeDelta,
color: Colors.black,
diff --git a/lib/constants/appConstants.dart b/lib/constants/app_constants.dart
similarity index 96%
rename from lib/constants/appConstants.dart
rename to lib/constants/app_constants.dart
index b30a5ff..d637019 100644
--- a/lib/constants/appConstants.dart
+++ b/lib/constants/app_constants.dart
@@ -1,27 +1,27 @@
import 'dart:core';
-import 'package:sqflite/sqflite.dart';
-
-import '../services/getData.dart';
-
-const String SETTINGS_SCREEN_TITLE = 'Settings';
-const String ABOUT_APP_SCREEN_TITLE = 'About App';
-const String PREFACE_SCREEN_TITLE = 'Preface & Intro';
-const String ABBREVIATIONS_SCREEN_TITLE = 'Abbreviations';
-const String SEARCH_SCREEN_TITLE = 'Search';
-const String BROWSE_SCREEN_TITLE = 'Browse';
-const String NOTIFICATION_SCREEN_TITLE = 'Notifications';
-const String DONATE_SCREEN_TITLE = 'Donate';
-const String FAVORITES_SCREEN_TITLE = 'Favorites';
-const String HISTORY_SCREEN_TITLE = 'History';
-const String MORE_APPS = 'More Apps';
-const String ALL_MY_APPS = 'All Apps By Me';
-
-const String FAV_IMAGE = 'assets/like_button.jpg';
-const String DONATE_IMAGE = 'assets/donate.jpg';
-const String QURANLE_IMAGE = 'assets/Quranle.jpg';
-const String FOR_HIRE_IMAGE = 'assets/ForHire.webp';
-const String QURAN_IMAGE = 'assets/quran.jpg';
-const String HAITHHUB_IMAGE = 'assets/HadithHub.png';
+import 'package:sqflite_common_ffi/sqflite_ffi.dart';
+
+import '../services/get_data.dart';
+
+const String settingsScreenTitle = 'Settings';
+const String aboutAppScreenTitle = 'About App';
+const String prefaceScreenTitle = 'Preface & Intro';
+const String abbreviationsScreenTitle = 'Abbreviations';
+const String searchScreenTitle = 'Search';
+const String browseScreenTitle = 'Browse';
+const String notificationScreenTitle = 'Notifications';
+const String donateScreenTitle = 'Donate';
+const String favoritesScreenTitle = 'Favorites';
+const String historyScreenTitle = 'History';
+const String moreApps = 'More Apps';
+const String allMyApps = 'All Apps By Me';
+
+const String favImage = 'assets/like_button.jpg';
+const String donateImage = 'assets/donate.jpg';
+const String quranleImage = 'assets/Quranle.jpg';
+const String forHireImage = 'assets/ForHire.webp';
+const String quranImage = 'assets/quran.jpg';
+const String hadithhubImage = 'assets/HadithHub.png';
final Uri quranleUri = Uri(
scheme: "https",
@@ -71,54 +71,54 @@ final Uri donateUri = Uri(
host: 'donate.islamic-relief.org',
);
-const String ABOUT_APP = '''
+const String aboutApp = '''
The Dictionary of Modern Written Arabic is an Arabic-English dictionary compiled by
Hans Wehr and edited by
J Milton Cowan.''';
-const String WHATS_NEW =
- '''
What's New :
+const String whatsNew = '''
What's New :
- Favorites screen alignment issue fix
- Incorrect Favorite button color fix
- Minor UX improvements
Source Code, Full Release Notes and Future Work
''';
-const String COMMUNITY_INVITE =
+const String communityInvite =
'''If you are a Muslim tech professional or aspiring to be one join the
Muslim Tech Network
''';
-const String DISCLAIMER =
+const String disclaimer =
'''DISCLAIMER - Not 100% Accurate.
Text was extracted from scanned pages and has many errors which unfortunately is not possible for me to fix manually.
Try Arabic Students Dictionary which has most of these errors corrected.
''';
-const String CONTACT_ME =
+const String contactMe =
'CONTACT ME
';
-const String EMAIL = "gibreel.khan@gmail.com";
+const String email = "gibreel.khan@gmail.com";
-const String SOCIAL_PROFILES =
+const String socialProfiles =
'
SOCAIL PROFILES
';
-const String COURTSEY = '''
COURTSEY
+const String courtsey = '''
COURTSEY
''';
-final DatabaseAccess databaseObject = new DatabaseAccess();
+
+final DatabaseAccess databaseObject = DatabaseAccess();
final Future databaseConnection =
DatabaseAccess().openDatabaseConnection();
-const String PREFACE_TEXT =
+const String prefaceText =
'''Shortly after the publication of Professor Hans Wehr's Arabisches Wörterbuch für die Schriftsprache der Gegenwart in 1952, the Committee on Language Programs of the American
Council of Learned Societies recognized its excellence and began to explore means of providing an up-to-date English edition. Professor Wehr and I readily reached agreement on a plan to translate, edit, and enlarge the dictionary. This task was considerably lightened and hastened by generous financial support from the American Council of Learned Societies, the Arabian American Oil Company, and Cornell University.
This dictionary will be welcome not only to English and American users, but to orientalists throughout the world who are more at home with English than with German. It is more accurate and much more comprehensive than the original version, which was produced under extremely unfavorable conditions in Germany during the late war years and the early postwar period.\n''';
-const String PREFACE_POCKET_TEXT =
+const String prefacePocketText =
'In order to meet the enormous increase of interest in Arabic brought about by political, economic and social developments of the past decade, we have now published our 3rd Revised Edition of A Dictionary of Modern Written Arabic in this handy, comprehensive and unabridged version.\n';
-const String INTRODUCTION_TEXT =
+const String introText =
'''This dictionary presents the vocabulary and phraseology of modern written Arabic. It is based on the form of the language which, throughout the Arab world from Iraq to Morocco, is found in the prose of books, newspapers, periodicals, and letters. This form is also employed in formal public address, over radio and television, and in religious ceremonial. The dictionary will be most useful to those working with writings that have appeared since the turn of the century.
The morphology and syntax of written Arabic are essentially the same in all Arab countries. Vocabulary differences are limited mainly to the domain of specialized vocabulary. Thus the written language continues, as it has done throughout centuries of the past, to ensure the linguistic unity of the Arab world. It provides a medium of communication over the vast geographical area whose numerous and widely diverse local dialects it transcends. Indeed, it gives the Arab people of many countries a sense of identity and an awareness of their common cultural heritage.
@@ -207,7 +207,7 @@ In transcription, two nouns forming a genitive compound are treated as a unit. T
In view of the great variety and intricacy of the material presented, it is inevitable that inconsistencies will appear and that similar examples will be treated here and there in a different manner. For such incongruities and for certain redundancies, we must ask the user’s indulgence.\n''';
-const List VERB_FORMS = [
+const List verbForms = [
'I - فَعَل/فَعُل/فَعِل',
'II - فَعّل',
'III - فَاعَل',
@@ -222,7 +222,7 @@ const List VERB_FORMS = [
'XII - اِفْعَوْعَلَ',
];
-const List VERB_FORM_DESCRIPTIONS = [
+const List verbFormDesc = [
'Basic root',
'Doing something intensively/ repeatedly, doing or causing something to someone else',
'To try to do something, to do something with someone else',
@@ -237,7 +237,7 @@ const List VERB_FORM_DESCRIPTIONS = [
'Like Form XI tend to refer to a colour or physical quality'
];
-const List VERB_FORM_EXAMPLES = [
+const List verbFormExample = [
'ضَرَبَ - He hit\n غفر - He forgave',
'علّم - He taught',
'قاتل - He fought',
@@ -252,7 +252,7 @@ const List VERB_FORM_EXAMPLES = [
'اِخْشَوْشَنَ - He became rough, coarse',
];
-const List ALL_ALPHABETS = [
+const List allAlphabets = [
"آ",
"ا",
"ب",
@@ -284,7 +284,7 @@ const List ALL_ALPHABETS = [
"ي"
];
-const List ABBREVIATIONS = [
+const List abbreviations = [
"A",
"abstr.",
"acc.",
@@ -482,7 +482,7 @@ const List ABBREVIATIONS = [
"Z",
"zool.",
];
-const List FULL_FORM = [
+const List fullForm = [
"",
"abstract",
"accusative",
diff --git a/lib/main.dart b/lib/main.dart
index 6ab6eec..db3d736 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,25 +1,47 @@
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
-import './classes/themeModel.dart';
-import './serviceLocator.dart';
-import './services/appReview.dart';
+import 'classes/definition_provider.dart';
+import 'classes/search_suggestions_provider.dart';
+import 'classes/theme_model.dart';
+import 'service_locator.dart';
+import 'services/app_review.dart';
import './routes.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
setupLocator().then(
(value) => runApp(
- ChangeNotifierProvider(
- create: (BuildContext context) => ThemeModel(),
- child: MyApp(),
+ MultiProvider(
+ providers: [
+ ChangeNotifierProvider(
+ create: (BuildContext context) => ThemeModel(),
+ ),
+ ChangeNotifierProvider(
+ create: (_) => SearchSuggestionsProvider(),
+ ),
+ ChangeNotifierProvider(
+ create: (_) => DefinitionProvider(
+ id: [],
+ word: [],
+ definition: [],
+ isRoot: [],
+ highlight: [],
+ quranOccurrence: [],
+ favoriteFlag: [],
+ ),
+ ),
+ ],
+ child: const MyApp(),
),
),
);
}
class MyApp extends StatefulWidget {
+ const MyApp({Key? key}) : super(key: key);
+
@override
- _MyAppState createState() => _MyAppState();
+ State createState() => _MyAppState();
}
class _MyAppState extends State {
@@ -32,7 +54,7 @@ class _MyAppState extends State {
@override
Widget build(BuildContext context) {
- return new MaterialApp(
+ return MaterialApp(
title: "Hans Wehr Dictionary",
theme: Provider.of(context, listen: true).currentTheme,
initialRoute: '/search',
diff --git a/lib/routes.dart b/lib/routes.dart
index 272a8eb..89993e3 100644
--- a/lib/routes.dart
+++ b/lib/routes.dart
@@ -1,26 +1,26 @@
import 'package:flutter/widgets.dart';
import 'screens/history.dart';
import 'screens/favorites.dart';
-import 'screens/moreApps.dart';
+import 'screens/more_apps.dart';
import 'screens/abbreviations.dart';
-import 'screens/aboutApp.dart';
+import 'screens/about_app.dart';
import 'screens/browse.dart';
import 'screens/search.dart';
import 'screens/settings.dart';
import 'screens/donate.dart';
import 'screens/preface.dart';
-import 'screens/quranicWords.dart';
+import 'screens/quranic_words.dart';
Map routes = {
- '/search': (context) => Search(),
- '/aboutus': (context) => AboutApp(),
- '/preface': (context) => Preface(),
- '/browse': (context) => Browse(),
- '/abbreviations': (context) => Abbreviations(),
- '/moreapps': (context) => MoreApps(),
- '/donate': (context) => Donate(),
- '/settings': (context) => Settings(),
- '/favorites': (context) => Favorites(),
- '/history': (context) => History(),
- '/quranicWords': (context) => QuranicWords(),
+ '/search': (context) => const Search(),
+ '/aboutus': (context) => const AboutApp(),
+ '/preface': (context) => const Preface(),
+ '/browse': (context) => const Browse(),
+ '/abbreviations': (context) => const Abbreviations(),
+ '/moreapps': (context) => const MoreApps(),
+ '/donate': (context) => const Donate(),
+ '/settings': (context) => const Settings(),
+ '/favorites': (context) => const Favorites(),
+ '/history': (context) => const History(),
+ '/quranicWords': (context) => const QuranicWords(),
};
diff --git a/lib/screens/abbreviations.dart b/lib/screens/abbreviations.dart
index 93cd7e1..dc8924e 100644
--- a/lib/screens/abbreviations.dart
+++ b/lib/screens/abbreviations.dart
@@ -1,57 +1,54 @@
import 'package:flutter/material.dart';
import '../widgets/drawer.dart';
-import '../constants/appConstants.dart';
+import '../constants/app_constants.dart';
class Abbreviations extends StatelessWidget {
+ const Abbreviations({Key? key}) : super(key: key);
+
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
toolbarHeight: 56,
title: Text(
- ABBREVIATIONS_SCREEN_TITLE,
- style: Theme.of(context).textTheme.headline6,
+ abbreviationsScreenTitle,
+ style: Theme.of(context).textTheme.titleLarge,
),
backgroundColor: Theme.of(context).appBarTheme.backgroundColor,
iconTheme: Theme.of(context).iconTheme,
),
- drawer: CommonDrawer(currentScreen: ABBREVIATIONS_SCREEN_TITLE),
+ drawer: const CommonDrawer(currentScreen: abbreviationsScreenTitle),
body: ListView.builder(
- padding: EdgeInsets.fromLTRB(8, 8, 8, 8),
- itemCount: ABBREVIATIONS.length,
+ padding: const EdgeInsets.fromLTRB(8, 8, 8, 8),
+ itemCount: abbreviations.length,
itemBuilder: (context, index) {
- if (FULL_FORM[index] == "") {
- return Container(
- // alignment: AlignmentDirectional.bottomStart,
- child: Text(
- ABBREVIATIONS[index],
- textScaleFactor: 2,
- textAlign: TextAlign.left,
- style: Theme.of(context).textTheme.bodyText1!.copyWith(
- color: Colors.grey,
- ),
- ),
+ if (fullForm[index] == "") {
+ return Text(
+ abbreviations[index],
+ textScaleFactor: 2,
+ textAlign: TextAlign.left,
+ style: Theme.of(context).textTheme.bodyLarge!.copyWith(
+ color: Colors.grey,
+ ),
);
} else {
- return Container(
- child: Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Container(
- width: MediaQuery.of(context).size.width * .25,
- child: Text(ABBREVIATIONS[index],
- style: Theme.of(context).textTheme.bodyText1),
- ),
- SizedBox(
- width: 10,
- ),
- Container(
- width: MediaQuery.of(context).size.width * .6,
- child: Text(FULL_FORM[index],
- style: Theme.of(context).textTheme.bodyText1),
- ),
- ],
- ),
+ return Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ SizedBox(
+ width: MediaQuery.of(context).size.width * .25,
+ child: Text(abbreviations[index],
+ style: Theme.of(context).textTheme.bodyLarge),
+ ),
+ const SizedBox(
+ width: 10,
+ ),
+ SizedBox(
+ width: MediaQuery.of(context).size.width * .6,
+ child: Text(fullForm[index],
+ style: Theme.of(context).textTheme.bodyLarge),
+ ),
+ ],
);
}
},
diff --git a/lib/screens/aboutApp.dart b/lib/screens/about_app.dart
similarity index 63%
rename from lib/screens/aboutApp.dart
rename to lib/screens/about_app.dart
index 5d76ac0..b250cb2 100644
--- a/lib/screens/aboutApp.dart
+++ b/lib/screens/about_app.dart
@@ -4,11 +4,13 @@ import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
import '../widgets/drawer.dart';
-import '../constants/appConstants.dart';
+import '../constants/app_constants.dart';
class AboutApp extends StatefulWidget {
+ const AboutApp({Key? key}) : super(key: key);
+
@override
- _AboutAppState createState() => _AboutAppState();
+ State createState() => _AboutAppState();
}
class _AboutAppState extends State {
@@ -18,88 +20,88 @@ class _AboutAppState extends State {
appBar: AppBar(
toolbarHeight: 56,
title: Text(
- ABOUT_APP_SCREEN_TITLE,
- style: Theme.of(context).textTheme.headline6,
+ aboutAppScreenTitle,
+ style: Theme.of(context).textTheme.titleLarge,
),
backgroundColor: Theme.of(context).appBarTheme.backgroundColor,
iconTheme: Theme.of(context).iconTheme,
),
- drawer: CommonDrawer(currentScreen: ABOUT_APP_SCREEN_TITLE),
+ drawer: const CommonDrawer(currentScreen: aboutAppScreenTitle),
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.fromLTRB(8, 8, 8, 100),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
- Padding(
- padding: const EdgeInsets.all(16.0),
+ const Padding(
+ padding: EdgeInsets.all(16.0),
child: Divider(),
),
HtmlWidget(
- DISCLAIMER,
- textStyle: Theme.of(context).textTheme.bodyText1!,
+ disclaimer,
+ textStyle: Theme.of(context).textTheme.bodyLarge!,
),
- Padding(
- padding: const EdgeInsets.all(16.0),
+ const Padding(
+ padding: EdgeInsets.all(16.0),
child: Divider(),
),
HtmlWidget(
- ABOUT_APP,
- textStyle: Theme.of(context).textTheme.bodyText1!,
+ aboutApp,
+ textStyle: Theme.of(context).textTheme.bodyLarge!,
),
- Padding(
- padding: const EdgeInsets.all(16.0),
+ const Padding(
+ padding: EdgeInsets.all(16.0),
child: Divider(),
),
HtmlWidget(
- WHATS_NEW,
- textStyle: Theme.of(context).textTheme.bodyText1!,
+ whatsNew,
+ textStyle: Theme.of(context).textTheme.bodyLarge!,
),
- Padding(
- padding: const EdgeInsets.all(16.0),
+ const Padding(
+ padding: EdgeInsets.all(16.0),
child: Divider(),
),
HtmlWidget(
- COURTSEY,
- textStyle: Theme.of(context).textTheme.bodyText1!,
+ courtsey,
+ textStyle: Theme.of(context).textTheme.bodyLarge!,
),
- Padding(
- padding: const EdgeInsets.all(16.0),
+ const Padding(
+ padding: EdgeInsets.all(16.0),
child: Divider(),
),
HtmlWidget(
- CONTACT_ME,
- textStyle: Theme.of(context).textTheme.bodyText1!,
+ contactMe,
+ textStyle: Theme.of(context).textTheme.bodyLarge!,
),
GestureDetector(
child: Text(
- EMAIL,
+ email,
style: TextStyle(color: Theme.of(context).primaryColor),
),
onTap: () {
Clipboard.setData(
- ClipboardData(text: EMAIL),
+ const ClipboardData(text: email),
);
ScaffoldMessenger.of(context).showSnackBar(
- SnackBar(
+ const SnackBar(
content: Text("Email Copied"),
),
);
},
),
- Padding(
- padding: const EdgeInsets.all(16.0),
+ const Padding(
+ padding: EdgeInsets.all(16.0),
child: Divider(),
),
HtmlWidget(
- SOCIAL_PROFILES,
- textStyle: Theme.of(context).textTheme.bodyText1!,
+ socialProfiles,
+ textStyle: Theme.of(context).textTheme.bodyLarge!,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
GestureDetector(
- child: Image(
+ child: const Image(
image: AssetImage('assets/GitHub.png'),
),
onTap: () {
@@ -107,9 +109,9 @@ class _AboutAppState extends State {
mode: LaunchMode.externalApplication);
},
),
- Padding(padding: EdgeInsets.all(16)),
+ const Padding(padding: EdgeInsets.all(16)),
GestureDetector(
- child: Image(
+ child: const Image(
image: AssetImage('assets/linkedin.png'),
),
onTap: () {
@@ -117,9 +119,9 @@ class _AboutAppState extends State {
mode: LaunchMode.externalApplication);
},
),
- Padding(padding: EdgeInsets.all(16)),
+ const Padding(padding: EdgeInsets.all(16)),
GestureDetector(
- child: Image(
+ child: const Image(
image: AssetImage('assets/website.png'),
),
onTap: () {
@@ -129,8 +131,8 @@ class _AboutAppState extends State {
),
],
),
- Padding(
- padding: const EdgeInsets.all(16.0),
+ const Padding(
+ padding: EdgeInsets.all(16.0),
child: Divider(),
),
]),
diff --git a/lib/screens/browse.dart b/lib/screens/browse.dart
index d77a9dd..b7b10c8 100644
--- a/lib/screens/browse.dart
+++ b/lib/screens/browse.dart
@@ -2,49 +2,51 @@ import 'dart:core';
import 'package:flutter/material.dart';
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
-import 'package:hans_wehr_dictionary/widgets/quranOccurrenceAlert.dart';
-import '../classes/definitionClass.dart';
+import '../classes/definition_provider.dart';
import '../widgets/drawer.dart';
-import '../constants/appConstants.dart';
+import '../constants/app_constants.dart';
+import '../widgets/quran_occurrence_alert.dart';
class Browse extends StatefulWidget {
+ const Browse({Key? key}) : super(key: key);
+
@override
- _BrowseState createState() => _BrowseState();
+ State createState() => _BrowseState();
}
class _BrowseState extends State {
@override
Widget build(BuildContext context) {
- return new Scaffold(
+ return Scaffold(
appBar: AppBar(
toolbarHeight: 56,
title: Text(
- BROWSE_SCREEN_TITLE,
- style: Theme.of(context).textTheme.headline6,
+ browseScreenTitle,
+ style: Theme.of(context).textTheme.titleLarge,
),
backgroundColor: Theme.of(context).appBarTheme.backgroundColor,
iconTheme: Theme.of(context).iconTheme,
),
- drawer: CommonDrawer(currentScreen: BROWSE_SCREEN_TITLE),
+ drawer: const CommonDrawer(currentScreen: browseScreenTitle),
body: buildFirstLevelAlphabets(),
);
}
ListView buildFirstLevelAlphabets() {
return ListView.builder(
- padding: EdgeInsets.fromLTRB(0, 0, 0, 100),
- itemCount: ALL_ALPHABETS.length,
+ padding: const EdgeInsets.fromLTRB(0, 0, 0, 100),
+ itemCount: allAlphabets.length,
itemBuilder: (context, i) {
return ExpansionTile(
- collapsedIconColor: Theme.of(context).textTheme.bodyText1!.color,
- collapsedTextColor: Theme.of(context).textTheme.bodyText1!.color,
- iconColor: Theme.of(context).textTheme.bodyText2!.color,
- textColor: Theme.of(context).textTheme.bodyText2!.color,
+ collapsedIconColor: Theme.of(context).textTheme.bodyLarge!.color,
+ collapsedTextColor: Theme.of(context).textTheme.bodyLarge!.color,
+ iconColor: Theme.of(context).textTheme.bodyMedium!.color,
+ textColor: Theme.of(context).textTheme.bodyMedium!.color,
title: Text(
- ALL_ALPHABETS[i],
+ allAlphabets[i],
style: TextStyle(
- fontFamily: Theme.of(context).textTheme.bodyText1!.fontFamily,
- fontSize: Theme.of(context).textTheme.bodyText1!.fontSize,
+ fontFamily: Theme.of(context).textTheme.bodyLarge!.fontFamily,
+ fontSize: Theme.of(context).textTheme.bodyLarge!.fontSize,
),
),
children: [buildSecondLevelAlphabets(i)],
@@ -55,31 +57,31 @@ class _BrowseState extends State {
FutureBuilder> buildSecondLevelAlphabets(int i) {
return FutureBuilder>(
- future: databaseObject.allXLevelWords(ALL_ALPHABETS[i], 2),
+ future: databaseObject.allXLevelWords(allAlphabets[i], 2),
builder: (context, snapshot) {
if (!snapshot.hasData) {
return Center(
child: Text(
'Loading...',
- style: Theme.of(context).textTheme.bodyText1,
+ style: Theme.of(context).textTheme.bodyLarge,
),
);
} else {
return ListView.builder(
- physics: NeverScrollableScrollPhysics(),
+ physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: snapshot.data!.length,
itemBuilder: (context, j) {
return ExpansionTile(
- iconColor: Theme.of(context).textTheme.bodyText2!.color,
- textColor: Theme.of(context).textTheme.bodyText2!.color,
- tilePadding: EdgeInsets.fromLTRB(40, 0, 40, 0),
+ iconColor: Theme.of(context).textTheme.bodyMedium!.color,
+ textColor: Theme.of(context).textTheme.bodyMedium!.color,
+ tilePadding: const EdgeInsets.fromLTRB(40, 0, 40, 0),
title: Text(
snapshot.data![j]!,
style: TextStyle(
fontFamily:
- Theme.of(context).textTheme.bodyText1!.fontFamily,
- fontSize: Theme.of(context).textTheme.bodyText1!.fontSize,
+ Theme.of(context).textTheme.bodyLarge!.fontFamily,
+ fontSize: Theme.of(context).textTheme.bodyLarge!.fontSize,
),
),
children: [buildRootWords(snapshot, j)],
@@ -97,7 +99,7 @@ class _BrowseState extends State {
builder: (context, snapshot) {
if (snapshot.hasData) {
return ListView.builder(
- physics: NeverScrollableScrollPhysics(),
+ physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: snapshot.data!.length,
itemBuilder: (context, j) {
@@ -110,7 +112,7 @@ class _BrowseState extends State {
),
title: Text(
snapshot.data![j]!,
- style: Theme.of(context).textTheme.bodyText1,
+ style: Theme.of(context).textTheme.bodyLarge,
),
onTap: () {
buildDefinitionAlert(context, snapshot.data![j]);
@@ -119,7 +121,7 @@ class _BrowseState extends State {
);
});
} else {
- return Center(
+ return const Center(
child: CircularProgressIndicator(),
);
}
@@ -137,21 +139,21 @@ Future buildDefinitionAlert(BuildContext context, String? word) {
return showDialog(
context: context,
builder: (BuildContext context) {
- return FutureBuilder(
+ return FutureBuilder(
future: databaseObject.definition(word, "BrowseScreen"),
builder: (context, snapshot) {
if (snapshot.hasData) {
return AlertDialog(
actionsAlignment: MainAxisAlignment.spaceBetween,
- insetPadding: EdgeInsets.all(0),
- contentPadding: EdgeInsets.all(15),
+ insetPadding: const EdgeInsets.all(0),
+ contentPadding: const EdgeInsets.all(15),
title: Center(
child: Text(
word!,
- style: Theme.of(context).textTheme.bodyText1,
+ style: Theme.of(context).textTheme.bodyLarge,
),
),
- content: Container(
+ content: SizedBox(
height: MediaQuery.of(context).size.height * .7,
width: MediaQuery.of(context).size.width * .9,
child: ListView.builder(
@@ -165,7 +167,7 @@ Future buildDefinitionAlert(BuildContext context, String? word) {
0),
title: HtmlWidget(
snapshot.data!.definition[index]!,
- textStyle: Theme.of(context).textTheme.bodyText1!,
+ textStyle: Theme.of(context).textTheme.bodyLarge!,
),
);
},
@@ -176,7 +178,7 @@ Future buildDefinitionAlert(BuildContext context, String? word) {
? TextButton(
child: Text(
'Q - ${snapshot.data!.quranOccurrence![0]}',
- style: Theme.of(context).textTheme.bodyText2,
+ style: Theme.of(context).textTheme.bodyMedium,
),
onPressed: () {
quranOccurrenceDialog(context,
@@ -187,7 +189,7 @@ Future buildDefinitionAlert(BuildContext context, String? word) {
TextButton(
child: Text(
'DISMISS',
- style: Theme.of(context).textTheme.bodyText2,
+ style: Theme.of(context).textTheme.bodyMedium,
),
onPressed: () {
Navigator.of(context).pop();
diff --git a/lib/screens/donate.dart b/lib/screens/donate.dart
index 0e23221..d87552e 100644
--- a/lib/screens/donate.dart
+++ b/lib/screens/donate.dart
@@ -1,9 +1,11 @@
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
-import '../constants/appConstants.dart';
+import '../constants/app_constants.dart';
class Donate extends StatelessWidget {
+ const Donate({Key? key}) : super(key: key);
+
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
@@ -14,50 +16,50 @@ class Donate extends StatelessWidget {
Text(
'DONATE',
textScaleFactor: 2,
- style: Theme.of(context).textTheme.bodyText1,
+ style: Theme.of(context).textTheme.bodyLarge,
),
- Padding(padding: EdgeInsets.all(10)),
+ const Padding(padding: EdgeInsets.all(10)),
Text(
'Thanks for considering to donate.',
textAlign: TextAlign.center,
- style: Theme.of(context).textTheme.bodyText1,
+ style: Theme.of(context).textTheme.bodyLarge,
),
Text(
'''There are millions who are facing a devastating decade of crisis and previously unimaginable hardship.
Kindly donate to them.''',
textAlign: TextAlign.center,
- style: Theme.of(context).textTheme.bodyText1,
+ style: Theme.of(context).textTheme.bodyLarge,
),
ElevatedButton(
onPressed: () {
launchUrl(donateUri, mode: LaunchMode.externalApplication);
},
- child: Text(
- 'Donate through IslamicRelief',
- style: Theme.of(context).textTheme.subtitle2,
- ),
style: ElevatedButton.styleFrom(
backgroundColor: Theme.of(context).primaryColor,
),
+ child: Text(
+ 'Donate through IslamicRelief',
+ style: Theme.of(context).textTheme.titleSmall,
+ ),
),
Center(
child: Text(
'Or any other charity of your choice.',
- style: Theme.of(context).textTheme.bodyText1,
+ style: Theme.of(context).textTheme.bodyLarge,
),
),
- Padding(
+ const Padding(
padding: EdgeInsets.all(20),
),
Text(
'مَّن ذَا ٱلَّذِى يُقْرِضُ ٱللَّهَ قَرْضًا حَسَنًۭا فَيُضَـٰعِفَهُۥ لَهُۥٓ أَضْعَافًۭا كَثِيرَةًۭ ۚ وَٱللَّهُ يَقْبِضُ وَيَبْصُۜطُ وَإِلَيْهِ تُرْجَعُونَ',
textAlign: TextAlign.center,
- style: Theme.of(context).textTheme.bodyText1,
+ style: Theme.of(context).textTheme.bodyLarge,
),
Text(
'Who will lend to Allah a good loan which Allah will multiply many times over? It is Allah alone who decreases and increases wealth. And to Him you will all be returned.',
textAlign: TextAlign.center,
- style: Theme.of(context).textTheme.bodyText1,
+ style: Theme.of(context).textTheme.bodyLarge,
)
],
),
diff --git a/lib/screens/favorites.dart b/lib/screens/favorites.dart
index 4ebc5fa..28361a7 100644
--- a/lib/screens/favorites.dart
+++ b/lib/screens/favorites.dart
@@ -1,11 +1,11 @@
import 'package:flutter/material.dart';
-import '../constants/appConstants.dart';
+import '../constants/app_constants.dart';
import 'browse.dart';
class Favorites extends StatefulWidget {
const Favorites({Key? key}) : super(key: key);
@override
- _FavoritesState createState() => _FavoritesState();
+ State createState() => _FavoritesState();
}
class _FavoritesState extends State {
@@ -21,7 +21,7 @@ class _FavoritesState extends State {
'FAVORITES',
textAlign: TextAlign.center,
textScaleFactor: 2,
- style: Theme.of(context).textTheme.bodyText1,
+ style: Theme.of(context).textTheme.bodyLarge,
),
FutureBuilder>>(
future: databaseObject.getFavorites(),
@@ -29,12 +29,12 @@ class _FavoritesState extends State {
if (snapshot.hasData) {
List