Browse Source

first commit

fix_bug
mohsen zamani 2 years ago
commit
583df76d90
  1. 44
      .gitignore
  2. 33
      .metadata
  3. 16
      README.md
  4. 20
      analysis_options.yaml
  5. 13
      android/.gitignore
  6. 72
      android/app/build.gradle
  7. 7
      android/app/src/debug/AndroidManifest.xml
  8. 33
      android/app/src/main/AndroidManifest.xml
  9. 6
      android/app/src/main/kotlin/com/example/sonnat/MainActivity.kt
  10. 12
      android/app/src/main/res/drawable-v21/launch_background.xml
  11. 12
      android/app/src/main/res/drawable/launch_background.xml
  12. BIN
      android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  13. BIN
      android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  14. BIN
      android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  15. BIN
      android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  16. BIN
      android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  17. 18
      android/app/src/main/res/values-night/styles.xml
  18. 18
      android/app/src/main/res/values/styles.xml
  19. 7
      android/app/src/profile/AndroidManifest.xml
  20. 31
      android/build.gradle
  21. 3
      android/gradle.properties
  22. 5
      android/gradle/wrapper/gradle-wrapper.properties
  23. 11
      android/settings.gradle
  24. BIN
      assets/fonts/arabi/Cairo-Black.ttf
  25. BIN
      assets/fonts/arabi/Cairo-Bold.ttf
  26. BIN
      assets/fonts/arabi/Cairo-ExtraBold.ttf
  27. BIN
      assets/fonts/arabi/Cairo-ExtraLight.ttf
  28. BIN
      assets/fonts/arabi/Cairo-Light.ttf
  29. BIN
      assets/fonts/arabi/Cairo-Medium.ttf
  30. BIN
      assets/fonts/arabi/Cairo-Regular.ttf
  31. BIN
      assets/fonts/arabi/Cairo-SemiBold.ttf
  32. BIN
      assets/fonts/farsi/Vazir-Black-FD.ttf
  33. BIN
      assets/fonts/farsi/Vazir-Bold-FD.ttf
  34. BIN
      assets/fonts/farsi/Vazir-Light-FD.ttf
  35. BIN
      assets/fonts/farsi/Vazir-Medium-FD.ttf
  36. BIN
      assets/fonts/farsi/Vazir-Regular-FD.ttf
  37. BIN
      assets/fonts/farsi/Vazir-Thin-FD.ttf
  38. BIN
      assets/images/png/ic_main_header.png
  39. 6
      assets/images/svg/ic_akhbar.svg
  40. 6
      assets/images/svg/ic_aqayed.svg
  41. 6
      assets/images/svg/ic_back.svg
  42. 7
      assets/images/svg/ic_instagram.svg
  43. 9
      assets/images/svg/ic_line.svg
  44. 6
      assets/images/svg/ic_mataen.svg
  45. 10
      assets/images/svg/ic_more.svg
  46. 3
      assets/images/svg/ic_phone.svg
  47. 9
      assets/images/svg/ic_rounded_search.svg
  48. 6
      assets/images/svg/ic_search.svg
  49. 6
      assets/images/svg/ic_shobahat.svg
  50. 6
      assets/images/svg/ic_video.svg
  51. 6
      assets/images/svg/ic_vijeha.svg
  52. 2
      assets/languages/ar.json
  53. 17
      assets/languages/en.json
  54. 17
      assets/languages/fa.json
  55. 2
      assets/meta/about_us.txt
  56. 47
      data/data_core/local_db/local_db_core/.gitignore
  57. 45
      data/data_core/local_db/local_db_core/.metadata
  58. 16
      data/data_core/local_db/local_db_core/README.md
  59. 29
      data/data_core/local_db/local_db_core/analysis_options.yaml
  60. 66
      data/data_core/local_db/local_db_core/lib/lib/boxes/box_list/setting_box/app_setting_box.dart
  61. 9
      data/data_core/local_db/local_db_core/lib/lib/boxes/box_list/setting_box/box_keys.dart
  62. 7
      data/data_core/local_db/local_db_core/lib/lib/boxes/interfaces/base_box_interface.dart
  63. 5
      data/data_core/local_db/local_db_core/lib/lib/boxes/interfaces/config_box_interface.dart
  64. 340
      data/data_core/local_db/local_db_core/pubspec.lock
  65. 23
      data/data_core/local_db/local_db_core/pubspec.yaml
  66. 10
      data/data_core/local_db/local_db_core/test/widget_test.dart
  67. 30
      data/data_core/network/network_core/.gitignore
  68. 10
      data/data_core/network/network_core/.metadata
  69. 3
      data/data_core/network/network_core/CHANGELOG.md
  70. 39
      data/data_core/network/network_core/README.md
  71. 37
      data/data_core/network/network_core/lib/initializer/base_initializer.dart
  72. 34
      data/data_core/network/network_core/lib/initializer/gamification_initializer.dart
  73. 37
      data/data_core/network/network_core/lib/initializer/hamrah_cloud_initializer.dart
  74. 39
      data/data_core/network/network_core/lib/initializer/logger_initializer.dart
  75. 20
      data/data_core/network/network_core/lib/network/helper/config.dart
  76. 21
      data/data_core/network/network_core/lib/network/helper/path_provider_service.dart
  77. 8
      data/data_core/network/network_core/lib/network/helper/util.dart
  78. 11
      data/data_core/network/network_core/lib/network/interface/network_initializer_interface.dart
  79. 140
      data/data_core/network/network_core/lib/network/networking/api_endpoint.dart
  80. 41
      data/data_core/network/network_core/lib/network/networking/api_interface.dart
  81. 210
      data/data_core/network/network_core/lib/network/networking/api_service.dart
  82. 111
      data/data_core/network/network_core/lib/network/networking/custom_exception.dart
  83. 203
      data/data_core/network/network_core/lib/network/networking/dio_service.dart
  84. 53
      data/data_core/network/network_core/lib/network/networking/interceptors/api_interceptor.dart
  85. 48
      data/data_core/network/network_core/lib/network/networking/response_model.dart
  86. 26
      data/data_core/network/network_core/pubspec.yaml
  87. 30
      data/data_types/data/.gitignore
  88. 10
      data/data_types/data/.metadata
  89. 3
      data/data_types/data/CHANGELOG.md
  90. 39
      data/data_types/data/README.md
  91. 102
      data/data_types/data/lib/app_setting_data/repository/app_setting_box_repository_impl.dart
  92. 22
      data/data_types/data/pubspec.yaml
  93. 30
      domain/repositories/.gitignore
  94. 4
      domain/repositories/analysis_options.yaml
  95. 13
      domain/repositories/lib/app_setting_box_domain/model/user_data_model.dart
  96. 21
      domain/repositories/lib/app_setting_box_domain/repository/app_setting_box_repository.dart
  97. 6
      domain/repositories/lib/typedefs.dart
  98. 17
      domain/repositories/pubspec.yaml
  99. 34
      ios/.gitignore
  100. 26
      ios/Flutter/AppFrameworkInfo.plist

44
.gitignore

@ -0,0 +1,44 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release

33
.metadata

@ -0,0 +1,33 @@
# 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.
version:
revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
channel: stable
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
- platform: android
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
- platform: ios
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'

16
README.md

@ -0,0 +1,16 @@
# sonnat
A new Flutter project.
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.

20
analysis_options.yaml

@ -0,0 +1,20 @@
include: package:flutter_lints/flutter.yaml
linter:
# In addition to the flutter_lints
rules:
- always_declare_return_types
- avoid_types_on_closure_parameters
- avoid_void_async
- cancel_subscriptions
- close_sinks
- directives_ordering
- flutter_style_todos
- package_api_docs
- prefer_single_quotes
- test_types_in_equals
- throw_in_finally
- unawaited_futures
- unnecessary_statements
- unsafe_html
- use_super_parameters

13
android/.gitignore

@ -0,0 +1,13 @@
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
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

72
android/app/build.gradle

@ -0,0 +1,72 @@
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
namespace "com.example.sonnat"
compileSdkVersion flutter.compileSdkVersion
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'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.sonnat"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

7
android/app/src/debug/AndroidManifest.xml

@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

33
android/app/src/main/AndroidManifest.xml

@ -0,0 +1,33 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:label="sonnat"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>

6
android/app/src/main/kotlin/com/example/sonnat/MainActivity.kt

@ -0,0 +1,6 @@
package com.example.sonnat
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
}

12
android/app/src/main/res/drawable-v21/launch_background.xml

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>

12
android/app/src/main/res/drawable/launch_background.xml

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>

BIN
android/app/src/main/res/mipmap-hdpi/ic_launcher.png

After

Width: 72  |  Height: 72  |  Size: 544 B

BIN
android/app/src/main/res/mipmap-mdpi/ic_launcher.png

After

Width: 48  |  Height: 48  |  Size: 442 B

BIN
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png

After

Width: 96  |  Height: 96  |  Size: 721 B

BIN
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png

After

Width: 144  |  Height: 144  |  Size: 1.0 KiB

BIN
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png

After

Width: 192  |  Height: 192  |  Size: 1.4 KiB

18
android/app/src/main/res/values-night/styles.xml

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

18
android/app/src/main/res/values/styles.xml

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

7
android/app/src/profile/AndroidManifest.xml

@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

31
android/build.gradle

@ -0,0 +1,31 @@
buildscript {
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}

3
android/gradle.properties

@ -0,0 +1,3 @@
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true

5
android/gradle/wrapper/gradle-wrapper.properties

@ -0,0 +1,5 @@
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

11
android/settings.gradle

@ -0,0 +1,11 @@
include ':app'
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"

BIN
assets/fonts/arabi/Cairo-Black.ttf

BIN
assets/fonts/arabi/Cairo-Bold.ttf

BIN
assets/fonts/arabi/Cairo-ExtraBold.ttf

BIN
assets/fonts/arabi/Cairo-ExtraLight.ttf

BIN
assets/fonts/arabi/Cairo-Light.ttf

BIN
assets/fonts/arabi/Cairo-Medium.ttf

BIN
assets/fonts/arabi/Cairo-Regular.ttf

BIN
assets/fonts/arabi/Cairo-SemiBold.ttf

BIN
assets/fonts/farsi/Vazir-Black-FD.ttf

BIN
assets/fonts/farsi/Vazir-Bold-FD.ttf

BIN
assets/fonts/farsi/Vazir-Light-FD.ttf

BIN
assets/fonts/farsi/Vazir-Medium-FD.ttf

BIN
assets/fonts/farsi/Vazir-Regular-FD.ttf

BIN
assets/fonts/farsi/Vazir-Thin-FD.ttf

BIN
assets/images/png/ic_main_header.png

After

Width: 203  |  Height: 203  |  Size: 6.9 KiB

6
assets/images/svg/ic_akhbar.svg

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="40.5" height="27" viewBox="0 0 40.5 27">
<g id="Group_1604" data-name="Group 1604" transform="translate(-167.25 -699)">
<rect id="Rectangle_3543" data-name="Rectangle 3543" width="31" height="23" transform="translate(173 701)" fill="#00845c"/>
<path id="Icon_awesome-newspaper" data-name="Icon awesome-newspaper" d="M38.813,4.5H6.188A1.687,1.687,0,0,0,4.5,6.188V6.75H1.688A1.687,1.687,0,0,0,0,8.438V27.563A3.937,3.937,0,0,0,3.938,31.5H37.125A3.375,3.375,0,0,0,40.5,28.125V6.188A1.687,1.687,0,0,0,38.813,4.5ZM3.938,28.125a.563.563,0,0,1-.562-.562V10.125H4.5V27.563A.563.563,0,0,1,3.938,28.125ZM20.531,27H9.844A.844.844,0,0,1,9,26.156v-.562a.844.844,0,0,1,.844-.844H20.531a.844.844,0,0,1,.844.844v.563A.844.844,0,0,1,20.531,27Zm14.625,0H24.469a.844.844,0,0,1-.844-.844v-.562a.844.844,0,0,1,.844-.844H35.156a.844.844,0,0,1,.844.844v.563A.844.844,0,0,1,35.156,27ZM20.531,20.25H9.844A.844.844,0,0,1,9,19.406v-.562A.844.844,0,0,1,9.844,18H20.531a.844.844,0,0,1,.844.844v.563A.844.844,0,0,1,20.531,20.25Zm14.625,0H24.469a.844.844,0,0,1-.844-.844v-.562A.844.844,0,0,1,24.469,18H35.156a.844.844,0,0,1,.844.844v.563A.844.844,0,0,1,35.156,20.25Zm0-6.75H9.844A.844.844,0,0,1,9,12.656V9.844A.844.844,0,0,1,9.844,9H35.156A.844.844,0,0,1,36,9.844v2.813A.844.844,0,0,1,35.156,13.5Z" transform="translate(167.25 694.5)" fill="#fff"/>
</g>
</svg>

6
assets/images/svg/ic_aqayed.svg

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="34.875" height="32.192" viewBox="0 0 34.875 32.192">
<g id="Icon_ionic-md-chatboxes" data-name="Icon ionic-md-chatboxes" transform="translate(-3.375 -4.5)">
<path id="Path_2716" data-name="Path 2716" d="M32.176,4.5h-28a.807.807,0,0,0-.805.684V23.143a.841.841,0,0,0,.805.723H8.992v7.452l7.556-7.452H32.176a.677.677,0,0,0,.624-.723V5.184A.641.641,0,0,0,32.176,4.5Z" fill="#fff"/>
<path id="Path_2717" data-name="Path 2717" d="M35.839,8.93H33.123V22.894c0,1.34-.58,2.216-2.109,2.216H15.861L12.6,28.379H23.472l7.555,7.461V28.379h4.812a.691.691,0,0,0,.637-.728V9.693A.725.725,0,0,0,35.839,8.93Z" transform="translate(1.774 0.852)" fill="#00845c"/>
</g>
</svg>

6
assets/images/svg/ic_back.svg

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="41" height="41" viewBox="0 0 41 41">
<g id="Group_1609" data-name="Group 1609" transform="translate(-27 -26)">
<circle id="Ellipse_367" data-name="Ellipse 367" cx="20.5" cy="20.5" r="20.5" transform="translate(27 26)" fill="#8d95ab"/>
<path id="Icon_ionic-ios-arrow-round-back" data-name="Icon ionic-ios-arrow-round-back" d="M16.725,11.563a1.108,1.108,0,0,1,.008,1.56l-5.147,5.164,11.942.008a1.1,1.1,0,0,1,0,2.2l-11.942-.008,5.155,5.164a1.116,1.116,0,0,1-.008,1.56,1.1,1.1,0,0,1-1.552-.008L8.2,20.169h0a1.238,1.238,0,0,1-.229-.348,1.052,1.052,0,0,1-.085-.424,1.105,1.105,0,0,1,.314-.772l6.987-7.037A1.08,1.08,0,0,1,16.725,11.563Z" transform="translate(31.248 26.807)" fill="#e7e7f5"/>
</g>
</svg>

7
assets/images/svg/ic_instagram.svg

@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="21.001" height="21.001" viewBox="0 0 21.001 21.001">
<g id="Icon_feather-instagram" data-name="Icon feather-instagram" transform="translate(1.5 1.5)">
<path id="Path_2725" data-name="Path 2725" d="M7.5,3h9A4.5,4.5,0,0,1,21,7.5v9A4.5,4.5,0,0,1,16.5,21h-9A4.5,4.5,0,0,1,3,16.5v-9A4.5,4.5,0,0,1,7.5,3Z" transform="translate(-3 -3)" fill="none" stroke="#404966" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"/>
<path id="Path_2726" data-name="Path 2726" d="M19.226,15.007a3.6,3.6,0,1,1-3.033-3.033,3.6,3.6,0,0,1,3.033,3.033Z" transform="translate(-6.626 -6.574)" fill="none" stroke="#404966" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"/>
<path id="Path_2727" data-name="Path 2727" d="M26.25,9.75h0" transform="translate(-12.299 -5.7)" fill="none" stroke="#404966" stroke-linecap="round" stroke-linejoin="round" stroke-width="3"/>
</g>
</svg>

9
assets/images/svg/ic_line.svg

@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" width="155.866" height="22.764" viewBox="0 0 155.866 22.764">
<g id="Group_1609" data-name="Group 1609" transform="translate(-109.567 -448.656)">
<line id="Line_240" data-name="Line 240" x1="154.866" transform="translate(110.067 460.038)" fill="none" stroke="#fff" stroke-linecap="round" stroke-width="1"/>
<path id="Union_576" data-name="Union 576" d="M11.3,22.763V15.946h0v6.818a14.017,14.017,0,0,0-2.592-2.973A4.516,4.516,0,0,1,6.74,15.941a4.5,4.5,0,0,1-3.767-1.966A13.843,13.843,0,0,0,0,11.382H0A14.069,14.069,0,0,0,2.973,8.788,4.537,4.537,0,0,1,6.9,6.818,4.516,4.516,0,0,1,8.87,2.973,13.81,13.81,0,0,0,11.463,0h0a14.069,14.069,0,0,0,2.593,2.973,4.519,4.519,0,0,1,1.968,3.849,4.5,4.5,0,0,1,3.767,1.966,13.844,13.844,0,0,0,2.972,2.592h0a14.069,14.069,0,0,0-2.973,2.593,4.537,4.537,0,0,1-3.929,1.969,4.519,4.519,0,0,1-1.968,3.845A13.777,13.777,0,0,0,11.3,22.763h0ZM0,11.382H0Zm22.763,0h0Z" transform="translate(176.118 448.656)" fill="#fff"/>
<ellipse id="Ellipse_366" data-name="Ellipse 366" cx="2.871" cy="2.871" rx="2.871" ry="2.871" transform="translate(184.73 457.24)" fill="#178756"/>
<path id="Union_576-2" data-name="Union 576" d="M4.824,9.717V6.807h0v2.91A5.984,5.984,0,0,0,3.717,8.448a1.928,1.928,0,0,1-.84-1.643,1.921,1.921,0,0,1-1.608-.839A5.91,5.91,0,0,0,0,4.859H0A6.006,6.006,0,0,0,1.269,3.751a1.937,1.937,0,0,1,1.677-.841,1.928,1.928,0,0,1,.84-1.642A5.9,5.9,0,0,0,4.893,0h0A6.006,6.006,0,0,0,6,1.269a1.929,1.929,0,0,1,.84,1.643,1.921,1.921,0,0,1,1.608.839A5.91,5.91,0,0,0,9.718,4.859h0A6.006,6.006,0,0,0,8.449,5.966a1.937,1.937,0,0,1-1.677.841,1.929,1.929,0,0,1-.84,1.642A5.881,5.881,0,0,0,4.825,9.717h0ZM0,4.859H0Zm9.717,0h0Z" transform="translate(198.882 455.179)" fill="#fff"/>
<path id="Union_576-3" data-name="Union 576" d="M4.824,9.717V6.807h0v2.91A5.984,5.984,0,0,0,3.717,8.448a1.928,1.928,0,0,1-.84-1.643,1.921,1.921,0,0,1-1.608-.839A5.91,5.91,0,0,0,0,4.859H0A6.006,6.006,0,0,0,1.269,3.751a1.937,1.937,0,0,1,1.677-.841,1.928,1.928,0,0,1,.84-1.642A5.9,5.9,0,0,0,4.893,0h0A6.006,6.006,0,0,0,6,1.269a1.929,1.929,0,0,1,.84,1.643,1.921,1.921,0,0,1,1.608.839A5.91,5.91,0,0,0,9.718,4.859h0A6.006,6.006,0,0,0,8.449,5.966a1.937,1.937,0,0,1-1.677.841,1.929,1.929,0,0,1-.84,1.642A5.881,5.881,0,0,0,4.825,9.717h0ZM0,4.859H0Zm9.717,0h0Z" transform="translate(165.882 455.179)" fill="#fff"/>
</g>
</svg>

6
assets/images/svg/ic_mataen.svg

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="29.25" height="29.25" viewBox="0 0 29.25 29.25">
<g id="Group_1606" data-name="Group 1606" transform="translate(-278.875 -585.375)">
<rect id="Rectangle_3542" data-name="Rectangle 3542" width="19" height="23" transform="translate(287 588)" fill="#00845c"/>
<path id="Icon_ionic-ios-paper" data-name="Icon ionic-ios-paper" d="M8.719,5.625V28.266a.987.987,0,0,1-.984.984h0a.987.987,0,0,1-.984-.984V7.875H5.625a2.248,2.248,0,0,0-2.25,2.25v20.25a2.248,2.248,0,0,0,2.25,2.25H30.452a2.174,2.174,0,0,0,2.173-2.173V5.625a2.248,2.248,0,0,0-2.25-2.25l-19.547.141A2.015,2.015,0,0,0,8.719,5.625Zm4.641,2.25h5.906a.987.987,0,0,1,.984.984h0a.987.987,0,0,1-.984.984H13.359a.987.987,0,0,1-.984-.984h0A.987.987,0,0,1,13.359,7.875Zm0,11.25H23.766a.987.987,0,0,1,.984.984h0a.987.987,0,0,1-.984.984H13.359a.987.987,0,0,1-.984-.984h0A.987.987,0,0,1,13.359,19.125Zm13.781,7.594H13.359a.987.987,0,0,1-.984-.984h0a.987.987,0,0,1,.984-.984H27.141a.987.987,0,0,1,.984.984h0A.987.987,0,0,1,27.141,26.719Zm0-11.25H13.359a.987.987,0,0,1-.984-.984h0a.987.987,0,0,1,.984-.984H27.141a.987.987,0,0,1,.984.984h0A.987.987,0,0,1,27.141,15.469Z" transform="translate(275.5 582)" fill="#fff"/>
</g>
</svg>

10
assets/images/svg/ic_more.svg

@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40">
<g id="Group_1609" data-name="Group 1609" transform="translate(-309 -27)">
<circle id="Ellipse_368" data-name="Ellipse 368" cx="20" cy="20" r="20" transform="translate(309 27)" fill="#8d95ab"/>
<g id="Group_1608" data-name="Group 1608" transform="translate(326.647 37.295)">
<circle id="Ellipse_172" data-name="Ellipse 172" cx="2.353" cy="2.353" r="2.353" transform="translate(0 0)" fill="#e7e7f5"/>
<circle id="Ellipse_173" data-name="Ellipse 173" cx="2.353" cy="2.353" r="2.353" transform="translate(0 7.059)" fill="#e7e7f5"/>
<circle id="Ellipse_174" data-name="Ellipse 174" cx="2.353" cy="2.353" r="2.353" transform="translate(0 14.118)" fill="#e7e7f5"/>
</g>
</g>
</svg>

3
assets/images/svg/ic_phone.svg

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<path id="Icon_awesome-phone-alt" data-name="Icon awesome-phone-alt" d="M19.429,14.133l-4.375-1.875a.937.937,0,0,0-1.094.27l-1.937,2.367A14.479,14.479,0,0,1,5.1,7.973L7.469,6.036a.935.935,0,0,0,.27-1.094L5.863.567A.944.944,0,0,0,4.789.024L.727.962A.937.937,0,0,0,0,1.875,18.123,18.123,0,0,0,18.125,20a.937.937,0,0,0,.914-.727l.937-4.062a.949.949,0,0,0-.547-1.078Z" transform="translate(0 0)" fill="#404966"/>
</svg>

9
assets/images/svg/ic_rounded_search.svg

@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40">
<g id="Group_1610" data-name="Group 1610" transform="translate(-261 -27)">
<circle id="Ellipse_369" data-name="Ellipse 369" cx="20" cy="20" r="20" transform="translate(261 27)" fill="#8d95ab"/>
<g id="Icon_feather-search" data-name="Icon feather-search" transform="translate(272.526 38.761)">
<path id="Path_177" data-name="Path 177" d="M19.146,11.823A7.323,7.323,0,1,1,11.823,4.5,7.323,7.323,0,0,1,19.146,11.823Z" transform="translate(-4.5 -4.5)" fill="none" stroke="#e7e7f5" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Path_178" data-name="Path 178" d="M28.957,28.957l-3.982-3.982" transform="translate(-12.48 -12.48)" fill="none" stroke="#e7e7f5" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</g>
</g>
</svg>

6
assets/images/svg/ic_search.svg

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="18.27" height="18.27" viewBox="0 0 18.27 18.27">
<g id="Icon_feather-search" data-name="Icon feather-search" transform="translate(1 1)">
<path id="Path_177" data-name="Path 177" d="M18.594,11.547A7.047,7.047,0,1,1,11.547,4.5,7.047,7.047,0,0,1,18.594,11.547Z" transform="translate(-4.5 -4.5)" fill="none" stroke="#636e88" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Path_178" data-name="Path 178" d="M28.807,28.807l-3.832-3.832" transform="translate(-12.951 -12.951)" fill="none" stroke="#636e88" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</g>
</svg>

6
assets/images/svg/ic_shobahat.svg

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="37.42" height="35.482" viewBox="0 0 37.42 35.482">
<g id="Group_1607" data-name="Group 1607" transform="translate(-168.79 -582)">
<path id="Icon_simple-hipchat" data-name="Icon simple-hipchat" d="M30.772,29.665s.161-.114.416-.309A15.246,15.246,0,0,0,37.42,17.321c0-8.911-8.377-16.14-18.705-16.14S0,8.41,0,17.321,8.374,33.468,18.707,33.468a21.456,21.456,0,0,0,3.935-.355l.409-.07a19.473,19.473,0,0,0,9.8,3.1,1,1,0,0,0,.861-1.721,18.937,18.937,0,0,1-2.944-4.759Z" transform="translate(168.79 581.337)" fill="#fff"/>
<text id="_" data-name="?" transform="translate(188 607)" fill="#00845c" font-size="23" font-family="SegoeUI, Segoe UI"><tspan x="-5.155" y="0">?</tspan></text>
</g>
</svg>

6
assets/images/svg/ic_video.svg

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="34.875" height="34.875" viewBox="0 0 34.875 34.875">
<g id="Group_1603" data-name="Group 1603" transform="translate(-64.563 -692.967)">
<rect id="Rectangle_3544" data-name="Rectangle 3544" width="21" height="21" transform="translate(73 700)" fill="#00845c"/>
<path id="Icon_awesome-play-circle" data-name="Icon awesome-play-circle" d="M18,.563A17.438,17.438,0,1,0,35.438,18,17.434,17.434,0,0,0,18,.563Zm8.135,19.125-12.375,7.1a1.691,1.691,0,0,1-2.51-1.477V10.688a1.692,1.692,0,0,1,2.51-1.477l12.375,7.523A1.693,1.693,0,0,1,26.135,19.688Z" transform="translate(64 692.404)" fill="#fff"/>
</g>
</svg>

6
assets/images/svg/ic_vijeha.svg

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="33" height="35.135" viewBox="0 0 33 35.135">
<g id="Group_1605" data-name="Group 1605" transform="translate(-278.291 -687.903)">
<path id="Icon_awesome-star" data-name="Icon awesome-star" d="M15.465,1.045,11.63,8.82,3.05,10.071a1.88,1.88,0,0,0-1.039,3.206l6.207,6.049L6.75,27.871A1.878,1.878,0,0,0,9.475,29.85l7.675-4.034,7.675,4.034a1.88,1.88,0,0,0,2.725-1.979l-1.468-8.544,6.207-6.049a1.88,1.88,0,0,0-1.039-3.206L22.671,8.82,18.836,1.045a1.881,1.881,0,0,0-3.371,0Z" transform="translate(276.85 692.968)" fill="#fff"/>
<path id="Icon_awesome-star-2" data-name="Icon awesome-star" d="M6.165.351,4.873,2.97l-2.89.421a.633.633,0,0,0-.35,1.08L3.724,6.509,3.229,9.387a.633.633,0,0,0,.918.667L6.732,8.694l2.585,1.359a.633.633,0,0,0,.918-.667L9.741,6.509l2.091-2.037a.633.633,0,0,0-.35-1.08L8.592,2.97,7.3.351a.633.633,0,0,0-1.135,0Z" transform="translate(299.268 687.904)" fill="#00845c"/>
</g>
</svg>

2
assets/languages/ar.json

@ -0,0 +1,2 @@
{
}

17
assets/languages/en.json

@ -0,0 +1,17 @@
{
"criticism_of_ideas": "Criticism of ideas",
"doubts": "Doubts",
"forbidden": "Forbidden",
"video": "Video",
"news": "News",
"specials": "Specials",
"search_term": "Search term",
"main_header_text": "Saint comprehensive portal",
"second_header_text": "A description of the unanalyzed history of Islam",
"more_about_us": "Get to know us more",
"main_target": "Our main goal",
"contact_to_us": "Contact us",
"send_message_to_us": "Send us a message",
"send_message": "Write your message",
"send": "Send"
}

17
assets/languages/fa.json

@ -0,0 +1,17 @@
{
"criticism_of_ideas": "نقد عقاید",
"doubts": "شبهات",
"forbidden": "مطاعن",
"video": "ویدئو",
"news": "اخبار",
"specials": "ویژه\u200Cها",
"search_term": "...جستجوی عبارت",
"main_header_text": "پرتال جامع سنت",
"second_header_text": " شرحی بر تاریـــخ تحلیل نشــده اســــلام",
"more_about_us": "با ما بیشتر آشنا شوید",
"main_target": "هدف اصلی ما",
"contact_to_us": "ارتباط با ما",
"send_message_to_us": "ارسال پیام به ما",
"send_message": "پیام خود را بنویسید",
"send": "ارسال"
}

2
assets/meta/about_us.txt

@ -0,0 +1,2 @@
نقل است که هنگام بیعت با ابوبکر در سقیفه نزدیک بود سعدبن‌عباده کشته ‌شود و به نقل بخاری به سوی سعد هجوم‌ برده‌ می‌شود.در این هنگام یکی از یاران سعد می‌گوید: «مراقب سعد باشید که لهش نکنید!(به نقل بخاری: سعد را کشتید!)»و عمر می‌گوید: «او را بکشید، خدا او را بکشد!» به نقل طبری عمر بالای سر سعد می‌ایستد و می‌گوید: «سعی‌داشتم آن‌گونه تو را له‌کنم که اعضایت از هم بپاشد!» و سعد ریش عمر را می‌گیرد و می‌گوید:« اگر فقط یک مو از ریشم بکَنی، برنمی‌گردی مگراین‌که دندان سالم در دهانت نیست!» و بعدمی‌گوید: «(اگر می‌توانستم) تو را به همان قومی که درمیان‌شان بودی و تبعیّت‌می‌کردی امّا موردتبعیّت نبودی، ملحق‌می‌کردم.» پس از آن حباب‌بن‌منذر روبه انصار می‌گوید: «اگر بخواهیم این‌ها را از مدینه بیرون‌ می‌کنیم.» عمر پاسخ‌می‌دهد: «در آن صورت خدا تو را بکشد.»
و حباب‌بن‌منذر هم در جواب او می‌گوید: «بلکه خودت کشته‌شوی!»

47
data/data_core/local_db/local_db_core/.gitignore

@ -0,0 +1,47 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
# Web related
lib/generated_plugin_registrant.dart
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release

45
data/data_core/local_db/local_db_core/.metadata

@ -0,0 +1,45 @@
# 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.
version:
revision: f1875d570e39de09040c8f79aa13cc56baab8db1
channel: stable
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
- platform: android
create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
- platform: ios
create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
- platform: linux
create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
- platform: macos
create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
- platform: web
create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
- platform: windows
create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'

16
data/data_core/local_db/local_db_core/README.md

@ -0,0 +1,16 @@
# local_db_core
A new Flutter project.
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.

29
data/data_core/local_db/local_db_core/analysis_options.yaml

@ -0,0 +1,29 @@
# 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

66
data/data_core/local_db/local_db_core/lib/lib/boxes/box_list/setting_box/app_setting_box.dart

@ -0,0 +1,66 @@
import 'package:hive/hive.dart';
import 'package:local_db_core/lib/boxes/box_list/setting_box/box_keys.dart';
import 'package:local_db_core/lib/boxes/interfaces/config_box_interface.dart';
import 'package:repositories/app_setting_box_domain/model/user_data_model.dart';
class AppSettingBox implements ConfigBoxInterface<BoxKeys> {
Box? _box;
AppSettingBox.privateConstructor();
static final AppSettingBox instance = AppSettingBox.privateConstructor();
factory AppSettingBox() {
return instance;
}
@override
String getBoxName() {
return "appSetting";
}
@override
String getKeyName(BoxKeys key) {
return key.value;
}
@override
Future<void> openBox() async {
_box = await Hive.openBox(getBoxName());
initialFirstData();
}
@override
void initialFirstData() {}
void setAppDirection(String value) {
_box?.put(getKeyName(BoxKeys.appDirection), value);
}
String? getAppDirection() {
return _box?.get(getKeyName(BoxKeys.appDirection));
}
String? getCurrentLanguage() {
return _box?.get(getKeyName(BoxKeys.currentLanguage));
}
Future<void> setCurrentLanguage(String language) async {
await _box?.put(getKeyName(BoxKeys.currentLanguage), language);
}
Future<UserDataModel?> getUserData() async {
if(!Hive.isBoxOpen(getBoxName())) {
await Hive.openBox(getBoxName());
}
Map<dynamic, dynamic>? data = await _box!.get(getKeyName(BoxKeys.userData));
if (data == null) {
return null;
}
return UserDataModel.fromJson(data);
}
Future<void> setUserData(Map<String, dynamic> data) async {
await _box!.put(getKeyName(BoxKeys.userData), data);
}
}

9
data/data_core/local_db/local_db_core/lib/lib/boxes/box_list/setting_box/box_keys.dart

@ -0,0 +1,9 @@
enum BoxKeys {
currentLanguage("current-language"),
userData('user-data'),
appDirection("app-direction");
final String value;
const BoxKeys(this.value);
}

7
data/data_core/local_db/local_db_core/lib/lib/boxes/interfaces/base_box_interface.dart

@ -0,0 +1,7 @@
abstract class BaseBoxInterface<T> {
String getBoxName();
String getKeyName(T key);
Future<void> openBox();
}

5
data/data_core/local_db/local_db_core/lib/lib/boxes/interfaces/config_box_interface.dart

@ -0,0 +1,5 @@
import 'package:local_db_core/lib/boxes/interfaces/base_box_interface.dart';
abstract class ConfigBoxInterface<T> implements BaseBoxInterface<T> {
void initialFirstData();
}

340
data/data_core/local_db/local_db_core/pubspec.lock

@ -0,0 +1,340 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
async:
dependency: transitive
description:
name: async
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
url: "https://pub.dev"
source: hosted
version: "2.11.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
characters:
dependency: transitive
description:
name: characters
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
url: "https://pub.dev"
source: hosted
version: "1.3.0"
clock:
dependency: transitive
description:
name: clock
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
url: "https://pub.dev"
source: hosted
version: "1.1.1"
collection:
dependency: transitive
description:
name: collection
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
url: "https://pub.dev"
source: hosted
version: "1.17.1"
crypto:
dependency: transitive
description:
name: crypto
sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67
url: "https://pub.dev"
source: hosted
version: "3.0.2"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be
url: "https://pub.dev"
source: hosted
version: "1.0.5"
fake_async:
dependency: transitive
description:
name: fake_async
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
url: "https://pub.dev"
source: hosted
version: "1.3.1"
ffi:
dependency: transitive
description:
name: ffi
sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978
url: "https://pub.dev"
source: hosted
version: "2.0.1"
file:
dependency: transitive
description:
name: file
sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
url: "https://pub.dev"
source: hosted
version: "6.1.4"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_lints:
dependency: "direct dev"
description:
name: flutter_lints
sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c
url: "https://pub.dev"
source: hosted
version: "2.0.1"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
hive:
dependency: "direct main"
description:
name: hive
sha256: "8dcf6db979d7933da8217edcec84e9df1bdb4e4edc7fc77dbd5aa74356d6d941"
url: "https://pub.dev"
source: hosted
version: "2.2.3"
hive_flutter:
dependency: "direct main"
description:
name: hive_flutter
sha256: dca1da446b1d808a51689fb5d0c6c9510c0a2ba01e22805d492c73b68e33eecc
url: "https://pub.dev"
source: hosted
version: "1.1.0"
js:
dependency: transitive
description:
name: js
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
url: "https://pub.dev"
source: hosted
version: "0.6.7"
lints:
dependency: transitive
description:
name: lints
sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
matcher:
dependency: transitive
description:
name: matcher
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
url: "https://pub.dev"
source: hosted
version: "0.12.15"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
url: "https://pub.dev"
source: hosted
version: "0.2.0"
meta:
dependency: transitive
description:
name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
url: "https://pub.dev"
source: hosted
version: "1.9.1"
path:
dependency: transitive
description:
name: path
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
url: "https://pub.dev"
source: hosted
version: "1.8.3"
path_provider:
dependency: "direct main"
description:
name: path_provider
sha256: "050e8e85e4b7fecdf2bb3682c1c64c4887a183720c802d323de8a5fd76d372dd"
url: "https://pub.dev"
source: hosted
version: "2.0.11"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
sha256: "1dab723dd8feeb80afb39c7be894f09df1457243d930010f6f328fb8c660c5e1"
url: "https://pub.dev"
source: hosted
version: "2.0.21"
path_provider_ios:
dependency: transitive
description:
name: path_provider_ios
sha256: "03d639406f5343478352433f00d3c4394d52dac8df3d847869c5e2333e0bbce8"
url: "https://pub.dev"
source: hosted
version: "2.0.11"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
sha256: ab0987bf95bc591da42dffb38c77398fc43309f0b9b894dcc5d6f40c4b26c379
url: "https://pub.dev"
source: hosted
version: "2.1.7"
path_provider_macos:
dependency: transitive
description:
name: path_provider_macos
sha256: "2a97e7fbb7ae9dcd0dfc1220a78e9ec3e71da691912e617e8715ff2a13086ae8"
url: "https://pub.dev"
source: hosted
version: "2.0.6"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
sha256: f0abc8ebd7253741f05488b4813d936b4d07c6bae3e86148a09e342ee4b08e76
url: "https://pub.dev"
source: hosted
version: "2.0.5"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
sha256: bcabbe399d4042b8ee687e17548d5d3f527255253b4a639f5f8d2094a9c2b45c
url: "https://pub.dev"
source: hosted
version: "2.1.3"
platform:
dependency: transitive
description:
name: platform
sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76"
url: "https://pub.dev"
source: hosted
version: "3.1.0"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
sha256: dbf0f707c78beedc9200146ad3cb0ab4d5da13c246336987be6940f026500d3a
url: "https://pub.dev"
source: hosted
version: "2.1.3"
process:
dependency: transitive
description:
name: process
sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09"
url: "https://pub.dev"
source: hosted
version: "4.2.4"
repositories:
dependency: "direct main"
description:
path: "../../../../domain/repositories"
relative: true
source: path
version: "0.0.1"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
source_span:
dependency: transitive
description:
name: source_span
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
url: "https://pub.dev"
source: hosted
version: "1.9.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
url: "https://pub.dev"
source: hosted
version: "1.11.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
string_scanner:
dependency: transitive
description:
name: string_scanner
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
url: "https://pub.dev"
source: hosted
version: "1.2.1"
test_api:
dependency: transitive
description:
name: test_api
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
url: "https://pub.dev"
source: hosted
version: "0.5.1"
typed_data:
dependency: transitive
description:
name: typed_data
sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5"
url: "https://pub.dev"
source: hosted
version: "1.3.1"
vector_math:
dependency: transitive
description:
name: vector_math
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
url: "https://pub.dev"
source: hosted
version: "2.1.4"
win32:
dependency: transitive
description:
name: win32
sha256: d13ac5deea7327f027b3b97ee19ee210f68256ecf3f1a304bcfb992ee947637c
url: "https://pub.dev"
source: hosted
version: "3.1.1"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
sha256: "11541eedefbcaec9de35aa82650b695297ce668662bbd6e3911a7fabdbde589f"
url: "https://pub.dev"
source: hosted
version: "0.2.0+2"
sdks:
dart: ">=3.0.0-0 <4.0.0"
flutter: ">=3.0.0"

23
data/data_core/local_db/local_db_core/pubspec.yaml

@ -0,0 +1,23 @@
name: local_db_core
description: A new Flutter project.
version: 1.0.0+1
publish_to: 'none'
environment:
sdk: ">=2.17.6 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
hive: ^2.0.5
hive_flutter: ^1.1.0
path_provider: ^2.0.11
repositories:
path: ../../../../domain/repositories
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
flutter:
uses-material-design: true

10
data/data_core/local_db/local_db_core/test/widget_test.dart

@ -0,0 +1,10 @@
import 'package:flutter_test/flutter_test.dart';
void main() {
test('adds one to input values', () {
// final calculator = Calculator();
// expect(calculator.addOne(2), 3);
// expect(calculator.addOne(-7), -6);
// expect(calculator.addOne(0), 1);
});
}

30
data/data_core/network/network_core/.gitignore

@ -0,0 +1,30 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
/pubspec.lock
**/doc/api/
.dart_tool/
.packages
build/

10
data/data_core/network/network_core/.metadata

@ -0,0 +1,10 @@
# 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 and should not be manually edited.
version:
revision: f1875d570e39de09040c8f79aa13cc56baab8db1
channel: stable
project_type: package

3
data/data_core/network/network_core/CHANGELOG.md

@ -0,0 +1,3 @@
## 0.0.1
* TODO: Describe initial release.

39
data/data_core/network/network_core/README.md

@ -0,0 +1,39 @@
<!--
This README describes the package. If you publish this package to pub.dev,
this README's contents appear on the landing page for your package.
For information about how to write a good package README, see the guide for
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages).
For general information about developing packages, see the Dart guide for
[creating packages](https://dart.dev/guides/libraries/create-library-packages)
and the Flutter guide for
[developing packages and plugins](https://flutter.dev/developing-packages).
-->
TODO: Put a short description of the package here that helps potential users
know whether this package might be useful for them.
## Features
TODO: List what your package can do. Maybe include images, gifs, or videos.
## Getting started
TODO: List prerequisites and provide or point to information on how to
start using the package.
## Usage
TODO: Include short and useful examples for package users. Add longer examples
to `/example` folder.
```dart
const like = 'sample';
```
## Additional information
TODO: Tell users more about the package: where to find more information, how to
contribute to the package, how to file issues, what response they can expect
from the package authors, and more.

37
data/data_core/network/network_core/lib/initializer/base_initializer.dart

@ -0,0 +1,37 @@
import 'package:dio/dio.dart';
import 'package:network_core/network/interface/network_initializer_interface.dart';
import 'package:network_core/network/networking/api_endpoint.dart';
import 'package:network_core/network/networking/api_service.dart';
import 'package:network_core/network/networking/dio_service.dart';
import 'package:network_core/network/networking/interceptors/api_interceptor.dart';
class BaseInitializer implements NetworkInitializerInterface {
factory BaseInitializer() {
return instance;
}
BaseInitializer.privateConstructor();
static final BaseInitializer instance = BaseInitializer.privateConstructor();
@override
DioService getDioService() {
return DioService(
dioClient: getDioClient(),
interceptors: [
ApiInterceptor(),
],
);
}
@override
Dio getDioClient() {
final baseOptions = BaseOptions(baseUrl: ApiEndpoint.baseUrl);
return Dio(baseOptions);
}
@override
ApiService getApiService() {
return ApiService(getDioService());
}
}

34
data/data_core/network/network_core/lib/initializer/gamification_initializer.dart

@ -0,0 +1,34 @@
import 'package:dio/dio.dart';
import 'package:network_core/network/interface/network_initializer_interface.dart';
import 'package:network_core/network/networking/api_endpoint.dart';
import 'package:network_core/network/networking/api_service.dart';
import 'package:network_core/network/networking/dio_service.dart';
class GamificationInitializer implements NetworkInitializerInterface {
factory GamificationInitializer() {
return instance;
}
GamificationInitializer.privateConstructor();
static final GamificationInitializer instance = GamificationInitializer.privateConstructor();
@override
DioService getDioService() {
return DioService(
dioClient: getDioClient(),
interceptors: [],
);
}
@override
Dio getDioClient() {
final baseOptions = BaseOptions(baseUrl: ApiEndpoint.gamificationBaseUrl);
return Dio(baseOptions);
}
@override
ApiService getApiService() {
return ApiService(getDioService());
}
}

37
data/data_core/network/network_core/lib/initializer/hamrah_cloud_initializer.dart

@ -0,0 +1,37 @@
import 'package:dio/dio.dart';
import 'package:network_core/network/interface/network_initializer_interface.dart';
import 'package:network_core/network/networking/api_endpoint.dart';
import 'package:network_core/network/networking/api_service.dart';
import 'package:network_core/network/networking/dio_service.dart';
import 'package:network_core/network/networking/interceptors/api_interceptor.dart';
class HamrahCloudInitializer implements NetworkInitializerInterface {
factory HamrahCloudInitializer() {
return instance;
}
HamrahCloudInitializer.privateConstructor();
static final HamrahCloudInitializer instance = HamrahCloudInitializer.privateConstructor();
@override
DioService getDioService() {
return DioService(
dioClient: getDioClient(),
interceptors: [
ApiInterceptor(useToken: false, addAllowMethod: false),
],
);
}
@override
Dio getDioClient() {
final baseOptions = BaseOptions(baseUrl: ApiEndpoint.hamrahCloudBaseUrl);
return Dio(baseOptions);
}
@override
ApiService getApiService() {
return ApiService(getDioService());
}
}

39
data/data_core/network/network_core/lib/initializer/logger_initializer.dart

@ -0,0 +1,39 @@
import 'package:dio/dio.dart';
import 'package:network_core/network/interface/network_initializer_interface.dart';
import 'package:network_core/network/networking/api_endpoint.dart';
import 'package:network_core/network/networking/api_service.dart';
import 'package:network_core/network/networking/dio_service.dart';
import 'package:network_core/network/networking/interceptors/api_interceptor.dart';
class LoggerInitializer implements NetworkInitializerInterface {
factory LoggerInitializer() {
return instance;
}
LoggerInitializer.privateConstructor();
static final LoggerInitializer instance = LoggerInitializer.privateConstructor();
@override
DioService getDioService() {
return DioService(
dioClient: getDioClient(),
interceptors: [
ApiInterceptor(),
],
);
}
@override
Dio getDioClient() {
final baseOptions = BaseOptions(
baseUrl: ApiEndpoint.loggerBaseUrl,
);
return Dio(baseOptions);
}
@override
ApiService getApiService() {
return ApiService(getDioService());
}
}

20
data/data_core/network/network_core/lib/network/helper/config.dart

@ -0,0 +1,20 @@
import 'package:flutter/foundation.dart';
@immutable
class Config {
const Config._();
static const baseUrl = String.fromEnvironment('BASE_URL', defaultValue: 'https://api-game.zarebin.ir/api');
static const loggerBaseUrl = String.fromEnvironment(
'BASE_URL',
defaultValue: 'https://supervisor.pr.mci.dev/api/v1/',
);
static const hamrahCloudBaseUrl = String.fromEnvironment(
'BASE_URL',
defaultValue: 'https://hamrahi.cloud/live/api/v1',
);
static const gamificationBaseUrl = String.fromEnvironment('BASE_URL', defaultValue: 'https://eagle-eyes.st.mci.dev');
}

21
data/data_core/network/network_core/lib/network/helper/path_provider_service.dart

@ -0,0 +1,21 @@
import 'package:path_provider/path_provider.dart' as pp;
class PathProviderService {
PathProviderService._();
static String? _path;
static String get path {
if (_path != null) {
return _path!;
} else {
throw Exception('Path not initialized');
}
}
static Future<String> init() async {
final dir = await pp.getApplicationDocumentsDirectory();
_path = dir.path;
return _path!;
}
}

8
data/data_core/network/network_core/lib/network/helper/util.dart

@ -0,0 +1,8 @@
import 'package:flutter/foundation.dart';
@immutable
class Util {
const Util._();
static bool boolFromInt(int i) => i == 1;
}

11
data/data_core/network/network_core/lib/network/interface/network_initializer_interface.dart

@ -0,0 +1,11 @@
import 'package:dio/dio.dart';
import 'package:network_core/network/networking/api_service.dart';
import 'package:network_core/network/networking/dio_service.dart';
abstract class NetworkInitializerInterface {
DioService getDioService();
Dio getDioClient();
ApiService getApiService();
}

140
data/data_core/network/network_core/lib/network/networking/api_endpoint.dart

@ -0,0 +1,140 @@
import 'package:flutter/material.dart';
import 'package:network_core/network/helper/config.dart';
@immutable
class ApiEndpoint {
const ApiEndpoint._();
static const baseUrl = Config.baseUrl;
static const loggerBaseUrl = Config.loggerBaseUrl;
static const hamrahCloudBaseUrl = Config.hamrahCloudBaseUrl;
static const gamificationBaseUrl = Config.gamificationBaseUrl;
static String account(AccountEndpoint endpoint) {
return '/account/${endpoint.value}';
}
static String game(GameEndpoint endpoint) {
return '/game/${endpoint.value}';
}
static String general(GeneralEndPoint endPoint) {
return '/general/${endPoint.value}';
}
static String leaderboard(LeaderboardEndpoint endpoint) {
return '/leaderboard/${endpoint.value}';
}
static String gamePlayer(GamePlayerEndpoint endpoint) {
return '/game-player/${endpoint.value}';
}
static String getFriendReq(FriendRequestEndPoint endPoint) {
return '/player/friendRequest/${endPoint.value}';
}
static String logger(LogEndPoint endPoint) {
return endPoint.value;
}
static String hamrahCloud(HamrahCloudEndpoint endPoint) {
return endPoint.value;
}
static String campaigns(CampaignsEndPoint endPoint) {
return '/api/v1/campaigns/${endPoint.value}/';
}
}
enum AccountEndpoint {
profile('profile');
final String value;
const AccountEndpoint(this.value);
}
enum GamePlayerEndpoint {
playerInfo('gamePlayerInfo'),
myRank('best');
final String value;
const GamePlayerEndpoint(this.value);
}
enum GameEndpoint {
banners('banners'),
categories('categories'),
favoriteGames('favorite-games'),
gameProfile('game-profile'),
games('games'),
recentPlayedGames('recent-played-games'),
search('search'),
searchHistory('search-history'),
suggestedGames('suggested-games'),
topGames('top-games');
final String value;
const GameEndpoint