├── .gitignore
├── .metadata
├── .vscode
└── settings.json
├── README.md
├── analysis_options.yaml
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── clean_arch_bookly_app
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable-v21
│ │ │ └── launch_background.xml
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values-night
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── assets
├── fonts
│ └── GT Sectra Fine Regular.ttf
└── images
│ ├── Logo.png
│ └── test_image.png
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── lib
├── Features
│ ├── Splash
│ │ └── presentation
│ │ │ └── views
│ │ │ ├── splash_view.dart
│ │ │ └── widgets
│ │ │ ├── sliding_text.dart
│ │ │ └── splash_view_body.dart
│ ├── home
│ │ ├── data
│ │ │ ├── data_sources
│ │ │ │ ├── home_local_data_source.dart
│ │ │ │ └── home_remote_data_source.dart
│ │ │ ├── models
│ │ │ │ └── book_model
│ │ │ │ │ ├── access_info.dart
│ │ │ │ │ ├── book_model.dart
│ │ │ │ │ ├── epub.dart
│ │ │ │ │ ├── image_links.dart
│ │ │ │ │ ├── industry_identifier.dart
│ │ │ │ │ ├── panelization_summary.dart
│ │ │ │ │ ├── pdf.dart
│ │ │ │ │ ├── reading_modes.dart
│ │ │ │ │ ├── sale_info.dart
│ │ │ │ │ ├── search_info.dart
│ │ │ │ │ └── volume_info.dart
│ │ │ └── repos
│ │ │ │ └── home_repo_impl.dart
│ │ ├── domain
│ │ │ ├── entities
│ │ │ │ ├── book_entity.dart
│ │ │ │ └── book_entity.g.dart
│ │ │ ├── repos
│ │ │ │ └── home_repo.dart
│ │ │ └── use_cases
│ │ │ │ ├── fetch_featured_books_use_case.dart
│ │ │ │ └── fetch_newest_books_use_case.dart
│ │ └── presentation
│ │ │ ├── manger
│ │ │ ├── featured_books_cubit
│ │ │ │ ├── featured_books_cubit.dart
│ │ │ │ └── featured_books_state.dart
│ │ │ └── newset_books_cubit
│ │ │ │ ├── newest_books_cubit.dart
│ │ │ │ └── newest_books_state.dart
│ │ │ └── views
│ │ │ ├── book_details_view.dart
│ │ │ ├── home_view.dart
│ │ │ └── widgets
│ │ │ ├── best_seller_list_view.dart
│ │ │ ├── best_seller_list_view_item.dart
│ │ │ ├── book_details_view_body.dart
│ │ │ ├── book_rating.dart
│ │ │ ├── books_action.dart
│ │ │ ├── books_details_sectioni.dart
│ │ │ ├── custom_app_bar.dart
│ │ │ ├── custom_book_details_app_bar.dart
│ │ │ ├── custom_book_image_loading_indicator.dart
│ │ │ ├── custom_book_item.dart
│ │ │ ├── featured_books_list_view_bloc_builder.dart
│ │ │ ├── featured_books_list_view_loading_indicator.dart
│ │ │ ├── featured_list_view.dart
│ │ │ ├── home_view_body.dart
│ │ │ ├── similar_books_list_view.dart
│ │ │ └── similar_books_section.dart
│ └── search
│ │ └── presentation
│ │ └── views
│ │ ├── search_view.dart
│ │ └── widgets
│ │ ├── custom_search_text_field.dart
│ │ └── search_view_body.dart
├── constants.dart
├── core
│ ├── errors
│ │ └── failure.dart
│ ├── use_cases
│ │ └── use_case.dart
│ ├── utils
│ │ ├── api_service.dart
│ │ ├── app_router.dart
│ │ ├── assets.dart
│ │ ├── functions
│ │ │ ├── build_error_snack_bar.dart
│ │ │ ├── save_books.dart
│ │ │ └── setup_service_locator.dart
│ │ ├── simple_bloc_observer.dart
│ │ └── styles.dart
│ └── widgets
│ │ ├── custom_button.dart
│ │ └── custom_fading_widget.dart
└── main.dart
├── linux
├── .gitignore
├── CMakeLists.txt
├── flutter
│ ├── CMakeLists.txt
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ └── generated_plugins.cmake
├── main.cc
├── my_application.cc
└── my_application.h
├── macos
├── .gitignore
├── Flutter
│ ├── Flutter-Debug.xcconfig
│ ├── Flutter-Release.xcconfig
│ └── GeneratedPluginRegistrant.swift
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── app_icon_1024.png
│ │ ├── app_icon_128.png
│ │ ├── app_icon_16.png
│ │ ├── app_icon_256.png
│ │ ├── app_icon_32.png
│ │ ├── app_icon_512.png
│ │ └── app_icon_64.png
│ ├── Base.lproj
│ └── MainMenu.xib
│ ├── Configs
│ ├── AppInfo.xcconfig
│ ├── Debug.xcconfig
│ ├── Release.xcconfig
│ └── Warnings.xcconfig
│ ├── DebugProfile.entitlements
│ ├── Info.plist
│ ├── MainFlutterWindow.swift
│ └── Release.entitlements
├── pubspec.lock
├── pubspec.yaml
├── test
└── widget_test.dart
├── web
├── favicon.png
├── icons
│ ├── Icon-192.png
│ ├── Icon-512.png
│ ├── Icon-maskable-192.png
│ └── Icon-maskable-512.png
├── index.html
└── manifest.json
└── windows
├── .gitignore
├── CMakeLists.txt
├── flutter
├── CMakeLists.txt
├── generated_plugin_registrant.cc
├── generated_plugin_registrant.h
└── generated_plugins.cmake
└── runner
├── CMakeLists.txt
├── Runner.rc
├── flutter_window.cpp
├── flutter_window.h
├── main.cpp
├── resource.h
├── resources
└── app_icon.ico
├── runner.exe.manifest
├── utils.cpp
├── utils.h
├── win32_window.cpp
└── win32_window.h
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .packages
31 | .pub-cache/
32 | .pub/
33 | /build/
34 |
35 | # Symbolication related
36 | app.*.symbols
37 |
38 | # Obfuscation related
39 | app.*.map.json
40 |
41 | # Android Studio will place build artifacts here
42 | /android/app/debug
43 | /android/app/profile
44 | /android/app/release
45 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled.
5 |
6 | version:
7 | revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
8 | channel: stable
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
17 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
18 | - platform: android
19 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
20 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
21 | - platform: ios
22 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
23 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
24 | - platform: linux
25 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
26 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
27 | - platform: macos
28 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
29 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
30 | - platform: web
31 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
32 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
33 | - platform: windows
34 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
35 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
36 |
37 | # User provided section
38 |
39 | # List of Local paths (relative to this file) that should be
40 | # ignored by the migrate tool.
41 | #
42 | # Files that are not part of the templates will be ignored by default.
43 | unmanaged_files:
44 | - 'lib/main.dart'
45 | - 'ios/Runner.xcodeproj/project.pbxproj'
46 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "java.configuration.updateBuildConfiguration": "interactive"
3 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # clean_arch_bookly_app
2 |
3 | A new Flutter project.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
13 |
14 | For help getting started with Flutter development, view the
15 | [online documentation](https://docs.flutter.dev/), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at
17 | # https://dart-lang.github.io/linter/lints/index.html.
18 | #
19 | # Instead of disabling a lint rule for the entire project in the
20 | # section below, it can also be suppressed for a single line of code
21 | # or a specific dart file by using the `// ignore: name_of_lint` and
22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
23 | # producing the lint.
24 | rules:
25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27 |
28 | # Additional information about this file can be found at
29 | # https://dart.dev/guides/language/analysis-options
30 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion flutter.compileSdkVersion
30 | ndkVersion flutter.ndkVersion
31 |
32 | compileOptions {
33 | sourceCompatibility JavaVersion.VERSION_1_8
34 | targetCompatibility JavaVersion.VERSION_1_8
35 | }
36 |
37 | kotlinOptions {
38 | jvmTarget = '1.8'
39 | }
40 |
41 | sourceSets {
42 | main.java.srcDirs += 'src/main/kotlin'
43 | }
44 |
45 | defaultConfig {
46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
47 | applicationId "com.example.clean_arch_bookly_app"
48 | // You can update the following values to match your application needs.
49 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
50 | minSdkVersion flutter.minSdkVersion
51 | targetSdkVersion flutter.targetSdkVersion
52 | versionCode flutterVersionCode.toInteger()
53 | versionName flutterVersionName
54 | }
55 |
56 | buildTypes {
57 | release {
58 | // TODO: Add your own signing config for the release build.
59 | // Signing with the debug keys for now, so `flutter run --release` works.
60 | signingConfig signingConfigs.debug
61 | }
62 | }
63 | }
64 |
65 | flutter {
66 | source '../..'
67 | }
68 |
69 | dependencies {
70 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
71 | }
72 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
15 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
30 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/clean_arch_bookly_app/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.clean_arch_bookly_app
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.7.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:7.4.2'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | mavenCentral()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Mar 20 19:53:54 EET 2023
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
5 | zipStoreBase=GRADLE_USER_HOME
6 | zipStorePath=wrapper/dists
7 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/assets/fonts/GT Sectra Fine Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/assets/fonts/GT Sectra Fine Regular.ttf
--------------------------------------------------------------------------------
/assets/images/Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/assets/images/Logo.png
--------------------------------------------------------------------------------
/assets/images/test_image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/assets/images/test_image.png
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 11.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 54;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXCopyFilesBuildPhase section */
19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
20 | isa = PBXCopyFilesBuildPhase;
21 | buildActionMask = 2147483647;
22 | dstPath = "";
23 | dstSubfolderSpec = 10;
24 | files = (
25 | );
26 | name = "Embed Frameworks";
27 | runOnlyForDeploymentPostprocessing = 0;
28 | };
29 | /* End PBXCopyFilesBuildPhase section */
30 |
31 | /* Begin PBXFileReference section */
32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
45 | /* End PBXFileReference section */
46 |
47 | /* Begin PBXFrameworksBuildPhase section */
48 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
49 | isa = PBXFrameworksBuildPhase;
50 | buildActionMask = 2147483647;
51 | files = (
52 | );
53 | runOnlyForDeploymentPostprocessing = 0;
54 | };
55 | /* End PBXFrameworksBuildPhase section */
56 |
57 | /* Begin PBXGroup section */
58 | 9740EEB11CF90186004384FC /* Flutter */ = {
59 | isa = PBXGroup;
60 | children = (
61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
65 | );
66 | name = Flutter;
67 | sourceTree = "";
68 | };
69 | 97C146E51CF9000F007C117D = {
70 | isa = PBXGroup;
71 | children = (
72 | 9740EEB11CF90186004384FC /* Flutter */,
73 | 97C146F01CF9000F007C117D /* Runner */,
74 | 97C146EF1CF9000F007C117D /* Products */,
75 | );
76 | sourceTree = "";
77 | };
78 | 97C146EF1CF9000F007C117D /* Products */ = {
79 | isa = PBXGroup;
80 | children = (
81 | 97C146EE1CF9000F007C117D /* Runner.app */,
82 | );
83 | name = Products;
84 | sourceTree = "";
85 | };
86 | 97C146F01CF9000F007C117D /* Runner */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
92 | 97C147021CF9000F007C117D /* Info.plist */,
93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
97 | );
98 | path = Runner;
99 | sourceTree = "";
100 | };
101 | /* End PBXGroup section */
102 |
103 | /* Begin PBXNativeTarget section */
104 | 97C146ED1CF9000F007C117D /* Runner */ = {
105 | isa = PBXNativeTarget;
106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
107 | buildPhases = (
108 | 9740EEB61CF901F6004384FC /* Run Script */,
109 | 97C146EA1CF9000F007C117D /* Sources */,
110 | 97C146EB1CF9000F007C117D /* Frameworks */,
111 | 97C146EC1CF9000F007C117D /* Resources */,
112 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
114 | );
115 | buildRules = (
116 | );
117 | dependencies = (
118 | );
119 | name = Runner;
120 | productName = Runner;
121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
122 | productType = "com.apple.product-type.application";
123 | };
124 | /* End PBXNativeTarget section */
125 |
126 | /* Begin PBXProject section */
127 | 97C146E61CF9000F007C117D /* Project object */ = {
128 | isa = PBXProject;
129 | attributes = {
130 | LastUpgradeCheck = 1300;
131 | ORGANIZATIONNAME = "";
132 | TargetAttributes = {
133 | 97C146ED1CF9000F007C117D = {
134 | CreatedOnToolsVersion = 7.3.1;
135 | LastSwiftMigration = 1100;
136 | };
137 | };
138 | };
139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
140 | compatibilityVersion = "Xcode 9.3";
141 | developmentRegion = en;
142 | hasScannedForEncodings = 0;
143 | knownRegions = (
144 | en,
145 | Base,
146 | );
147 | mainGroup = 97C146E51CF9000F007C117D;
148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
149 | projectDirPath = "";
150 | projectRoot = "";
151 | targets = (
152 | 97C146ED1CF9000F007C117D /* Runner */,
153 | );
154 | };
155 | /* End PBXProject section */
156 |
157 | /* Begin PBXResourcesBuildPhase section */
158 | 97C146EC1CF9000F007C117D /* Resources */ = {
159 | isa = PBXResourcesBuildPhase;
160 | buildActionMask = 2147483647;
161 | files = (
162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
166 | );
167 | runOnlyForDeploymentPostprocessing = 0;
168 | };
169 | /* End PBXResourcesBuildPhase section */
170 |
171 | /* Begin PBXShellScriptBuildPhase section */
172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
173 | isa = PBXShellScriptBuildPhase;
174 | alwaysOutOfDate = 1;
175 | buildActionMask = 2147483647;
176 | files = (
177 | );
178 | inputPaths = (
179 | );
180 | name = "Thin Binary";
181 | outputPaths = (
182 | );
183 | runOnlyForDeploymentPostprocessing = 0;
184 | shellPath = /bin/sh;
185 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
186 | };
187 | 9740EEB61CF901F6004384FC /* Run Script */ = {
188 | isa = PBXShellScriptBuildPhase;
189 | alwaysOutOfDate = 1;
190 | buildActionMask = 2147483647;
191 | files = (
192 | );
193 | inputPaths = (
194 | );
195 | name = "Run Script";
196 | outputPaths = (
197 | );
198 | runOnlyForDeploymentPostprocessing = 0;
199 | shellPath = /bin/sh;
200 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
201 | };
202 | /* End PBXShellScriptBuildPhase section */
203 |
204 | /* Begin PBXSourcesBuildPhase section */
205 | 97C146EA1CF9000F007C117D /* Sources */ = {
206 | isa = PBXSourcesBuildPhase;
207 | buildActionMask = 2147483647;
208 | files = (
209 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
210 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
211 | );
212 | runOnlyForDeploymentPostprocessing = 0;
213 | };
214 | /* End PBXSourcesBuildPhase section */
215 |
216 | /* Begin PBXVariantGroup section */
217 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
218 | isa = PBXVariantGroup;
219 | children = (
220 | 97C146FB1CF9000F007C117D /* Base */,
221 | );
222 | name = Main.storyboard;
223 | sourceTree = "";
224 | };
225 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
226 | isa = PBXVariantGroup;
227 | children = (
228 | 97C147001CF9000F007C117D /* Base */,
229 | );
230 | name = LaunchScreen.storyboard;
231 | sourceTree = "";
232 | };
233 | /* End PBXVariantGroup section */
234 |
235 | /* Begin XCBuildConfiguration section */
236 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
237 | isa = XCBuildConfiguration;
238 | buildSettings = {
239 | ALWAYS_SEARCH_USER_PATHS = NO;
240 | CLANG_ANALYZER_NONNULL = YES;
241 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
242 | CLANG_CXX_LIBRARY = "libc++";
243 | CLANG_ENABLE_MODULES = YES;
244 | CLANG_ENABLE_OBJC_ARC = YES;
245 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
246 | CLANG_WARN_BOOL_CONVERSION = YES;
247 | CLANG_WARN_COMMA = YES;
248 | CLANG_WARN_CONSTANT_CONVERSION = YES;
249 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
250 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
251 | CLANG_WARN_EMPTY_BODY = YES;
252 | CLANG_WARN_ENUM_CONVERSION = YES;
253 | CLANG_WARN_INFINITE_RECURSION = YES;
254 | CLANG_WARN_INT_CONVERSION = YES;
255 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
256 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
257 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
258 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
259 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
260 | CLANG_WARN_STRICT_PROTOTYPES = YES;
261 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
262 | CLANG_WARN_UNREACHABLE_CODE = YES;
263 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
264 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
265 | COPY_PHASE_STRIP = NO;
266 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
267 | ENABLE_NS_ASSERTIONS = NO;
268 | ENABLE_STRICT_OBJC_MSGSEND = YES;
269 | GCC_C_LANGUAGE_STANDARD = gnu99;
270 | GCC_NO_COMMON_BLOCKS = YES;
271 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
272 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
273 | GCC_WARN_UNDECLARED_SELECTOR = YES;
274 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
275 | GCC_WARN_UNUSED_FUNCTION = YES;
276 | GCC_WARN_UNUSED_VARIABLE = YES;
277 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
278 | MTL_ENABLE_DEBUG_INFO = NO;
279 | SDKROOT = iphoneos;
280 | SUPPORTED_PLATFORMS = iphoneos;
281 | TARGETED_DEVICE_FAMILY = "1,2";
282 | VALIDATE_PRODUCT = YES;
283 | };
284 | name = Profile;
285 | };
286 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
287 | isa = XCBuildConfiguration;
288 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
289 | buildSettings = {
290 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
291 | CLANG_ENABLE_MODULES = YES;
292 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
293 | ENABLE_BITCODE = NO;
294 | INFOPLIST_FILE = Runner/Info.plist;
295 | LD_RUNPATH_SEARCH_PATHS = (
296 | "$(inherited)",
297 | "@executable_path/Frameworks",
298 | );
299 | PRODUCT_BUNDLE_IDENTIFIER = com.example.cleanArchBooklyApp;
300 | PRODUCT_NAME = "$(TARGET_NAME)";
301 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
302 | SWIFT_VERSION = 5.0;
303 | VERSIONING_SYSTEM = "apple-generic";
304 | };
305 | name = Profile;
306 | };
307 | 97C147031CF9000F007C117D /* Debug */ = {
308 | isa = XCBuildConfiguration;
309 | buildSettings = {
310 | ALWAYS_SEARCH_USER_PATHS = NO;
311 | CLANG_ANALYZER_NONNULL = YES;
312 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
313 | CLANG_CXX_LIBRARY = "libc++";
314 | CLANG_ENABLE_MODULES = YES;
315 | CLANG_ENABLE_OBJC_ARC = YES;
316 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
317 | CLANG_WARN_BOOL_CONVERSION = YES;
318 | CLANG_WARN_COMMA = YES;
319 | CLANG_WARN_CONSTANT_CONVERSION = YES;
320 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
321 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
322 | CLANG_WARN_EMPTY_BODY = YES;
323 | CLANG_WARN_ENUM_CONVERSION = YES;
324 | CLANG_WARN_INFINITE_RECURSION = YES;
325 | CLANG_WARN_INT_CONVERSION = YES;
326 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
327 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
328 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
329 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
330 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
331 | CLANG_WARN_STRICT_PROTOTYPES = YES;
332 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
333 | CLANG_WARN_UNREACHABLE_CODE = YES;
334 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
335 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
336 | COPY_PHASE_STRIP = NO;
337 | DEBUG_INFORMATION_FORMAT = dwarf;
338 | ENABLE_STRICT_OBJC_MSGSEND = YES;
339 | ENABLE_TESTABILITY = YES;
340 | GCC_C_LANGUAGE_STANDARD = gnu99;
341 | GCC_DYNAMIC_NO_PIC = NO;
342 | GCC_NO_COMMON_BLOCKS = YES;
343 | GCC_OPTIMIZATION_LEVEL = 0;
344 | GCC_PREPROCESSOR_DEFINITIONS = (
345 | "DEBUG=1",
346 | "$(inherited)",
347 | );
348 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
349 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
350 | GCC_WARN_UNDECLARED_SELECTOR = YES;
351 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
352 | GCC_WARN_UNUSED_FUNCTION = YES;
353 | GCC_WARN_UNUSED_VARIABLE = YES;
354 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
355 | MTL_ENABLE_DEBUG_INFO = YES;
356 | ONLY_ACTIVE_ARCH = YES;
357 | SDKROOT = iphoneos;
358 | TARGETED_DEVICE_FAMILY = "1,2";
359 | };
360 | name = Debug;
361 | };
362 | 97C147041CF9000F007C117D /* Release */ = {
363 | isa = XCBuildConfiguration;
364 | buildSettings = {
365 | ALWAYS_SEARCH_USER_PATHS = NO;
366 | CLANG_ANALYZER_NONNULL = YES;
367 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
368 | CLANG_CXX_LIBRARY = "libc++";
369 | CLANG_ENABLE_MODULES = YES;
370 | CLANG_ENABLE_OBJC_ARC = YES;
371 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
372 | CLANG_WARN_BOOL_CONVERSION = YES;
373 | CLANG_WARN_COMMA = YES;
374 | CLANG_WARN_CONSTANT_CONVERSION = YES;
375 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
376 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
377 | CLANG_WARN_EMPTY_BODY = YES;
378 | CLANG_WARN_ENUM_CONVERSION = YES;
379 | CLANG_WARN_INFINITE_RECURSION = YES;
380 | CLANG_WARN_INT_CONVERSION = YES;
381 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
382 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
383 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
384 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
385 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
386 | CLANG_WARN_STRICT_PROTOTYPES = YES;
387 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
388 | CLANG_WARN_UNREACHABLE_CODE = YES;
389 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
390 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
391 | COPY_PHASE_STRIP = NO;
392 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
393 | ENABLE_NS_ASSERTIONS = NO;
394 | ENABLE_STRICT_OBJC_MSGSEND = YES;
395 | GCC_C_LANGUAGE_STANDARD = gnu99;
396 | GCC_NO_COMMON_BLOCKS = YES;
397 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
398 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
399 | GCC_WARN_UNDECLARED_SELECTOR = YES;
400 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
401 | GCC_WARN_UNUSED_FUNCTION = YES;
402 | GCC_WARN_UNUSED_VARIABLE = YES;
403 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
404 | MTL_ENABLE_DEBUG_INFO = NO;
405 | SDKROOT = iphoneos;
406 | SUPPORTED_PLATFORMS = iphoneos;
407 | SWIFT_COMPILATION_MODE = wholemodule;
408 | SWIFT_OPTIMIZATION_LEVEL = "-O";
409 | TARGETED_DEVICE_FAMILY = "1,2";
410 | VALIDATE_PRODUCT = YES;
411 | };
412 | name = Release;
413 | };
414 | 97C147061CF9000F007C117D /* Debug */ = {
415 | isa = XCBuildConfiguration;
416 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
417 | buildSettings = {
418 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
419 | CLANG_ENABLE_MODULES = YES;
420 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
421 | ENABLE_BITCODE = NO;
422 | INFOPLIST_FILE = Runner/Info.plist;
423 | LD_RUNPATH_SEARCH_PATHS = (
424 | "$(inherited)",
425 | "@executable_path/Frameworks",
426 | );
427 | PRODUCT_BUNDLE_IDENTIFIER = com.example.cleanArchBooklyApp;
428 | PRODUCT_NAME = "$(TARGET_NAME)";
429 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
430 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
431 | SWIFT_VERSION = 5.0;
432 | VERSIONING_SYSTEM = "apple-generic";
433 | };
434 | name = Debug;
435 | };
436 | 97C147071CF9000F007C117D /* Release */ = {
437 | isa = XCBuildConfiguration;
438 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
439 | buildSettings = {
440 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
441 | CLANG_ENABLE_MODULES = YES;
442 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
443 | ENABLE_BITCODE = NO;
444 | INFOPLIST_FILE = Runner/Info.plist;
445 | LD_RUNPATH_SEARCH_PATHS = (
446 | "$(inherited)",
447 | "@executable_path/Frameworks",
448 | );
449 | PRODUCT_BUNDLE_IDENTIFIER = com.example.cleanArchBooklyApp;
450 | PRODUCT_NAME = "$(TARGET_NAME)";
451 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
452 | SWIFT_VERSION = 5.0;
453 | VERSIONING_SYSTEM = "apple-generic";
454 | };
455 | name = Release;
456 | };
457 | /* End XCBuildConfiguration section */
458 |
459 | /* Begin XCConfigurationList section */
460 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
461 | isa = XCConfigurationList;
462 | buildConfigurations = (
463 | 97C147031CF9000F007C117D /* Debug */,
464 | 97C147041CF9000F007C117D /* Release */,
465 | 249021D3217E4FDB00AE95B9 /* Profile */,
466 | );
467 | defaultConfigurationIsVisible = 0;
468 | defaultConfigurationName = Release;
469 | };
470 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
471 | isa = XCConfigurationList;
472 | buildConfigurations = (
473 | 97C147061CF9000F007C117D /* Debug */,
474 | 97C147071CF9000F007C117D /* Release */,
475 | 249021D4217E4FDB00AE95B9 /* Profile */,
476 | );
477 | defaultConfigurationIsVisible = 0;
478 | defaultConfigurationName = Release;
479 | };
480 | /* End XCConfigurationList section */
481 | };
482 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
483 | }
484 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
52 |
54 |
60 |
61 |
62 |
63 |
69 |
71 |
77 |
78 |
79 |
80 |
82 |
83 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/clean_arch_bookly_app/d285f34337c6ec0608f9fd0c693d9397bf4a5a53/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Clean Arch Bookly App
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | clean_arch_bookly_app
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(FLUTTER_BUILD_NUMBER)
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | UIViewControllerBasedStatusBarAppearance
45 |
46 | CADisableMinimumFrameDurationOnPhone
47 |
48 | UIApplicationSupportsIndirectInputEvents
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/lib/Features/Splash/presentation/views/splash_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:bookly/Features/Splash/presentation/views/widgets/splash_view_body.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter/src/foundation/key.dart';
4 | import 'package:flutter/src/widgets/framework.dart';
5 |
6 | class SplashView extends StatelessWidget {
7 | const SplashView({Key? key}) : super(key: key);
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return const Scaffold(
12 | body: SplashViewbody(),
13 | );
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/lib/Features/Splash/presentation/views/widgets/sliding_text.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class SlidingText extends StatelessWidget {
4 | const SlidingText({
5 | Key? key,
6 | required this.slidingAnimation,
7 | }) : super(key: key);
8 |
9 | final Animation slidingAnimation;
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | return AnimatedBuilder(
14 | animation: slidingAnimation,
15 | builder: (context, _) {
16 | return SlideTransition(
17 | position: slidingAnimation,
18 | child: const Text(
19 | 'Read Free Books',
20 | textAlign: TextAlign.center,
21 | ),
22 | );
23 | });
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/lib/Features/Splash/presentation/views/widgets/splash_view_body.dart:
--------------------------------------------------------------------------------
1 | import 'package:bookly/Features/home/presentation/views/home_view.dart';
2 | import 'package:bookly/constants.dart';
3 | import 'package:bookly/core/utils/app_router.dart';
4 | import 'package:bookly/core/utils/assets.dart';
5 | import 'package:flutter/cupertino.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:go_router/go_router.dart';
8 |
9 | import 'sliding_text.dart';
10 |
11 | class SplashViewbody extends StatefulWidget {
12 | const SplashViewbody({Key? key}) : super(key: key);
13 |
14 | @override
15 | State createState() => _SplashViewbodyState();
16 | }
17 |
18 | class _SplashViewbodyState extends State
19 | with SingleTickerProviderStateMixin {
20 | late AnimationController animationController;
21 | late Animation slidingAnimation;
22 |
23 | @override
24 | void initState() {
25 | super.initState();
26 | initSlidingAnimation();
27 |
28 | navigateToHome();
29 | }
30 |
31 | @override
32 | void dispose() {
33 | super.dispose();
34 |
35 | animationController.dispose();
36 | }
37 |
38 | @override
39 | Widget build(BuildContext context) {
40 | return Column(
41 | mainAxisAlignment: MainAxisAlignment.center,
42 | crossAxisAlignment: CrossAxisAlignment.stretch,
43 | children: [
44 | Image.asset(AssetsData.logo),
45 | const SizedBox(
46 | height: 4,
47 | ),
48 | SlidingText(slidingAnimation: slidingAnimation),
49 | ],
50 | );
51 | }
52 |
53 | void initSlidingAnimation() {
54 | animationController = AnimationController(
55 | vsync: this,
56 | duration: const Duration(seconds: 1),
57 | );
58 |
59 | slidingAnimation =
60 | Tween(begin: const Offset(0, 2), end: Offset.zero)
61 | .animate(animationController);
62 |
63 | animationController.forward();
64 | }
65 |
66 | void navigateToHome() {
67 | Future.delayed(
68 | const Duration(seconds: 2),
69 | () {
70 | // Get.to(() => const HomeView(),
71 | // // calculations
72 | // transition: Transition.fade,
73 | // duration: kTranstionDuration);
74 |
75 | GoRouter.of(context).push(AppRouter.kHomeView);
76 | },
77 | );
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/lib/Features/home/data/data_sources/home_local_data_source.dart:
--------------------------------------------------------------------------------
1 | import 'package:bookly/Features/home/domain/entities/book_entity.dart';
2 | import 'package:bookly/constants.dart';
3 | import 'package:hive/hive.dart';
4 |
5 | abstract class HomeLocalDataSource {
6 | List fetchFeaturedBooks({int pageNumber = 0});
7 | List fetchNewestBooks();
8 | }
9 |
10 | class HomeLocalDataSourceImpl extends HomeLocalDataSource {
11 | @override
12 | List fetchFeaturedBooks({int pageNumber = 0}) {
13 | int startIndex = pageNumber * 10;
14 | int endIndex = (pageNumber + 1) * 10;
15 |
16 | var box = Hive.box(kFeaturedBox);
17 | int length = box.values.length;
18 | if (startIndex >= length || endIndex > length) {
19 | return [];
20 | }
21 | return box.values.toList().sublist(startIndex, endIndex);
22 | }
23 |
24 | @override
25 | List fetchNewestBooks() {
26 | var box = Hive.box(kNewestBox);
27 | return box.values.toList();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/Features/home/data/data_sources/home_remote_data_source.dart:
--------------------------------------------------------------------------------
1 | import 'package:bookly/Features/home/data/models/book_model/book_model.dart';
2 | import 'package:bookly/constants.dart';
3 | import 'package:bookly/core/utils/api_service.dart';
4 | import 'package:bookly/core/utils/functions/save_books.dart';
5 |
6 | import '../../domain/entities/book_entity.dart';
7 |
8 | abstract class HomeRemoteDataSource {
9 | Future> fetchFeaturedBooks({int pageNumber = 0});
10 | Future> fetchNewestBooks();
11 | }
12 |
13 | class HomeRemoteDataSourceImpl extends HomeRemoteDataSource {
14 | final ApiService apiService;
15 |
16 | HomeRemoteDataSourceImpl(this.apiService);
17 | @override
18 | Future> fetchFeaturedBooks({int pageNumber = 0}) async {
19 | var data = await apiService.get(
20 | endPoint:
21 | 'volumes?Filtering=free-ebooks&q=programming&startIndex=${pageNumber * 10}');
22 | List books = getBooksList(data);
23 | saveBooksData(books, kFeaturedBox);
24 | return books;
25 | }
26 |
27 | @override
28 | Future> fetchNewestBooks() async {
29 | var data = await apiService.get(
30 | endPoint: 'volumes?Filtering=free-ebooks&Sorting=newest&q=programming');
31 | List books = getBooksList(data);
32 | saveBooksData(books, kNewestBox);
33 | return books;
34 | }
35 |
36 | List getBooksList(Map data) {
37 | List books = [];
38 | for (var bookMap in data['items']) {
39 | books.add(BookModel.fromJson(bookMap));
40 | }
41 | return books;
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/lib/Features/home/data/models/book_model/access_info.dart:
--------------------------------------------------------------------------------
1 | import 'epub.dart';
2 | import 'pdf.dart';
3 |
4 | class AccessInfo {
5 | String? country;
6 | String? viewability;
7 | bool? embeddable;
8 | bool? publicDomain;
9 | String? textToSpeechPermission;
10 | Epub? epub;
11 | Pdf? pdf;
12 | String? webReaderLink;
13 | String? accessViewStatus;
14 | bool? quoteSharingAllowed;
15 |
16 | AccessInfo({
17 | this.country,
18 | this.viewability,
19 | this.embeddable,
20 | this.publicDomain,
21 | this.textToSpeechPermission,
22 | this.epub,
23 | this.pdf,
24 | this.webReaderLink,
25 | this.accessViewStatus,
26 | this.quoteSharingAllowed,
27 | });
28 |
29 | factory AccessInfo.fromJson(Map json) => AccessInfo(
30 | country: json['country'] as String?,
31 | viewability: json['viewability'] as String?,
32 | embeddable: json['embeddable'] as bool?,
33 | publicDomain: json['publicDomain'] as bool?,
34 | textToSpeechPermission: json['textToSpeechPermission'] as String?,
35 | epub: json['epub'] == null
36 | ? null
37 | : Epub.fromJson(json['epub'] as Map),
38 | pdf: json['pdf'] == null
39 | ? null
40 | : Pdf.fromJson(json['pdf'] as Map),
41 | webReaderLink: json['webReaderLink'] as String?,
42 | accessViewStatus: json['accessViewStatus'] as String?,
43 | quoteSharingAllowed: json['quoteSharingAllowed'] as bool?,
44 | );
45 |
46 | Map toJson() => {
47 | 'country': country,
48 | 'viewability': viewability,
49 | 'embeddable': embeddable,
50 | 'publicDomain': publicDomain,
51 | 'textToSpeechPermission': textToSpeechPermission,
52 | 'epub': epub?.toJson(),
53 | 'pdf': pdf?.toJson(),
54 | 'webReaderLink': webReaderLink,
55 | 'accessViewStatus': accessViewStatus,
56 | 'quoteSharingAllowed': quoteSharingAllowed,
57 | };
58 | }
59 |
--------------------------------------------------------------------------------
/lib/Features/home/data/models/book_model/book_model.dart:
--------------------------------------------------------------------------------
1 | import 'package:bookly/Features/home/domain/entities/book_entity.dart';
2 |
3 | import 'access_info.dart';
4 | import 'sale_info.dart';
5 | import 'search_info.dart';
6 | import 'volume_info.dart';
7 |
8 | class BookModel extends BookEntity {
9 | String? kind;
10 | String? id;
11 | String? etag;
12 | String? selfLink;
13 | VolumeInfo? volumeInfo;
14 | SaleInfo? saleInfo;
15 | AccessInfo? accessInfo;
16 | SearchInfo? searchInfo;
17 |
18 | BookModel({
19 | this.kind,
20 | this.id,
21 | this.etag,
22 | this.selfLink,
23 | this.volumeInfo,
24 | this.saleInfo,
25 | this.accessInfo,
26 | this.searchInfo,
27 | }) : super(
28 | bookId: id!,
29 | image: volumeInfo?.imageLinks?.thumbnail ?? '',
30 | authorName: volumeInfo?.authors?.first ?? 'No Name',
31 | price: 0.0,
32 | rating: volumeInfo!.averageRating,
33 | title: volumeInfo.title!);
34 |
35 | factory BookModel.fromJson(Map json) => BookModel(
36 | kind: json['kind'] as String?,
37 | id: json['id'] as String?,
38 | etag: json['etag'] as String?,
39 | selfLink: json['selfLink'] as String?,
40 | volumeInfo: json['volumeInfo'] == null
41 | ? null
42 | : VolumeInfo.fromJson(json['volumeInfo'] as Map),
43 | saleInfo: json['saleInfo'] == null
44 | ? null
45 | : SaleInfo.fromJson(json['saleInfo'] as Map),
46 | accessInfo: json['accessInfo'] == null
47 | ? null
48 | : AccessInfo.fromJson(json['accessInfo'] as Map),
49 | searchInfo: json['searchInfo'] == null
50 | ? null
51 | : SearchInfo.fromJson(json['searchInfo'] as Map),
52 | );
53 |
54 | Map toJson() => {
55 | 'kind': kind,
56 | 'id': id,
57 | 'etag': etag,
58 | 'selfLink': selfLink,
59 | 'volumeInfo': volumeInfo?.toJson(),
60 | 'saleInfo': saleInfo?.toJson(),
61 | 'accessInfo': accessInfo?.toJson(),
62 | 'searchInfo': searchInfo?.toJson(),
63 | };
64 | }
65 |
--------------------------------------------------------------------------------
/lib/Features/home/data/models/book_model/epub.dart:
--------------------------------------------------------------------------------
1 | class Epub {
2 | bool? isAvailable;
3 |
4 | Epub({this.isAvailable});
5 |
6 | factory Epub.fromJson(Map json) => Epub(
7 | isAvailable: json['isAvailable'] as bool?,
8 | );
9 |
10 | Map toJson() => {
11 | 'isAvailable': isAvailable,
12 | };
13 | }
14 |
--------------------------------------------------------------------------------
/lib/Features/home/data/models/book_model/image_links.dart:
--------------------------------------------------------------------------------
1 | class ImageLinks {
2 | String? smallThumbnail;
3 | String? thumbnail;
4 |
5 | ImageLinks({this.smallThumbnail, this.thumbnail});
6 |
7 | factory ImageLinks.fromJson(Map json) => ImageLinks(
8 | smallThumbnail: json['smallThumbnail'] as String?,
9 | thumbnail: json['thumbnail'] as String?,
10 | );
11 |
12 | Map toJson() => {
13 | 'smallThumbnail': smallThumbnail,
14 | 'thumbnail': thumbnail,
15 | };
16 | }
17 |
--------------------------------------------------------------------------------
/lib/Features/home/data/models/book_model/industry_identifier.dart:
--------------------------------------------------------------------------------
1 | class IndustryIdentifier {
2 | String? type;
3 | String? identifier;
4 |
5 | IndustryIdentifier({this.type, this.identifier});
6 |
7 | factory IndustryIdentifier.fromJson(Map json) {
8 | return IndustryIdentifier(
9 | type: json['type'] as String?,
10 | identifier: json['identifier'] as String?,
11 | );
12 | }
13 |
14 | Map toJson() => {
15 | 'type': type,
16 | 'identifier': identifier,
17 | };
18 | }
19 |
--------------------------------------------------------------------------------
/lib/Features/home/data/models/book_model/panelization_summary.dart:
--------------------------------------------------------------------------------
1 | class PanelizationSummary {
2 | bool? containsEpubBubbles;
3 | bool? containsImageBubbles;
4 |
5 | PanelizationSummary({
6 | this.containsEpubBubbles,
7 | this.containsImageBubbles,
8 | });
9 |
10 | factory PanelizationSummary.fromJson(Map json) {
11 | return PanelizationSummary(
12 | containsEpubBubbles: json['containsEpubBubbles'] as bool?,
13 | containsImageBubbles: json['containsImageBubbles'] as bool?,
14 | );
15 | }
16 |
17 | Map toJson() => {
18 | 'containsEpubBubbles': containsEpubBubbles,
19 | 'containsImageBubbles': containsImageBubbles,
20 | };
21 | }
22 |
--------------------------------------------------------------------------------
/lib/Features/home/data/models/book_model/pdf.dart:
--------------------------------------------------------------------------------
1 | class Pdf {
2 | bool? isAvailable;
3 |
4 | Pdf({this.isAvailable});
5 |
6 | factory Pdf.fromJson(Map json) => Pdf(
7 | isAvailable: json['isAvailable'] as bool?,
8 | );
9 |
10 | Map toJson() => {
11 | 'isAvailable': isAvailable,
12 | };
13 | }
14 |
--------------------------------------------------------------------------------
/lib/Features/home/data/models/book_model/reading_modes.dart:
--------------------------------------------------------------------------------
1 | class ReadingModes {
2 | bool? text;
3 | bool? image;
4 |
5 | ReadingModes({this.text, this.image});
6 |
7 | factory ReadingModes.fromJson(Map json) => ReadingModes(
8 | text: json['text'] as bool?,
9 | image: json['image'] as bool?,
10 | );
11 |
12 | Map toJson() => {
13 | 'text': text,
14 | 'image': image,
15 | };
16 | }
17 |
--------------------------------------------------------------------------------
/lib/Features/home/data/models/book_model/sale_info.dart:
--------------------------------------------------------------------------------
1 | class SaleInfo {
2 | String? country;
3 | String? saleability;
4 | bool? isEbook;
5 |
6 | SaleInfo({this.country, this.saleability, this.isEbook});
7 |
8 | factory SaleInfo.fromJson(Map json) => SaleInfo(
9 | country: json['country'] as String?,
10 | saleability: json['saleability'] as String?,
11 | isEbook: json['isEbook'] as bool?,
12 | );
13 |
14 | Map toJson() => {
15 | 'country': country,
16 | 'saleability': saleability,
17 | 'isEbook': isEbook,
18 | };
19 | }
20 |
--------------------------------------------------------------------------------
/lib/Features/home/data/models/book_model/search_info.dart:
--------------------------------------------------------------------------------
1 | class SearchInfo {
2 | String? textSnippet;
3 |
4 | SearchInfo({this.textSnippet});
5 |
6 | factory SearchInfo.fromJson(Map json) => SearchInfo(
7 | textSnippet: json['textSnippet'] as String?,
8 | );
9 |
10 | Map toJson() => {
11 | 'textSnippet': textSnippet,
12 | };
13 | }
14 |
--------------------------------------------------------------------------------
/lib/Features/home/data/models/book_model/volume_info.dart:
--------------------------------------------------------------------------------
1 | import 'image_links.dart';
2 | import 'industry_identifier.dart';
3 | import 'panelization_summary.dart';
4 | import 'reading_modes.dart';
5 |
6 | class VolumeInfo {
7 | String? title;
8 | List? authors;
9 | String? publisher;
10 | String? publishedDate;
11 | String? description;
12 | List? industryIdentifiers;
13 | ReadingModes? readingModes;
14 | int? pageCount;
15 | String? printType;
16 | List? categories;
17 | num? averageRating;
18 | num? ratingsCount;
19 | String? maturityRating;
20 | bool? allowAnonLogging;
21 | String? contentVersion;
22 | PanelizationSummary? panelizationSummary;
23 | ImageLinks? imageLinks;
24 | String? language;
25 | String? previewLink;
26 | String? infoLink;
27 | String? canonicalVolumeLink;
28 |
29 | VolumeInfo({
30 | this.title,
31 | this.authors,
32 | this.publisher,
33 | this.publishedDate,
34 | this.description,
35 | this.industryIdentifiers,
36 | this.readingModes,
37 | this.pageCount,
38 | this.printType,
39 | this.categories,
40 | this.averageRating,
41 | this.ratingsCount,
42 | this.maturityRating,
43 | this.allowAnonLogging,
44 | this.contentVersion,
45 | this.panelizationSummary,
46 | this.imageLinks,
47 | this.language,
48 | this.previewLink,
49 | this.infoLink,
50 | this.canonicalVolumeLink,
51 | });
52 |
53 | factory VolumeInfo.fromJson(Map json) => VolumeInfo(
54 | title: json['title'] as String?,
55 | authors: (json['authors'] as List?)
56 | ?.map((author) => author.toString())
57 | .toList(),
58 | publisher: json['publisher'] as String?,
59 | publishedDate: json['publishedDate'] as String?,
60 | description: json['description'] as String?,
61 | industryIdentifiers: (json['industryIdentifiers'] as List?)
62 | ?.map((e) => IndustryIdentifier.fromJson(e as Map))
63 | .toList(),
64 | readingModes: json['readingModes'] == null
65 | ? null
66 | : ReadingModes.fromJson(
67 | json['readingModes'] as Map),
68 | pageCount: json['pageCount'] as int?,
69 | printType: json['printType'] as String?,
70 | categories: (json['categories'] as List?)
71 | ?.map((category) => category.toString())
72 | .toList(),
73 | averageRating: json['averageRating'] as num?,
74 | ratingsCount: json['ratingsCount'] as num?,
75 | maturityRating: json['maturityRating'] as String?,
76 | allowAnonLogging: json['allowAnonLogging'] as bool?,
77 | contentVersion: json['contentVersion'] as String?,
78 | panelizationSummary: json['panelizationSummary'] == null
79 | ? null
80 | : PanelizationSummary.fromJson(
81 | json['panelizationSummary'] as Map),
82 | imageLinks: json['imageLinks'] == null
83 | ? null
84 | : ImageLinks.fromJson(json['imageLinks'] as Map),
85 | language: json['language'] as String?,
86 | previewLink: json['previewLink'] as String?,
87 | infoLink: json['infoLink'] as String?,
88 | canonicalVolumeLink: json['canonicalVolumeLink'] as String?,
89 | );
90 |
91 | Map toJson() => {
92 | 'title': title,
93 | 'authors': authors,
94 | 'publisher': publisher,
95 | 'publishedDate': publishedDate,
96 | 'description': description,
97 | 'industryIdentifiers':
98 | industryIdentifiers?.map((e) => e.toJson()).toList(),
99 | 'readingModes': readingModes?.toJson(),
100 | 'pageCount': pageCount,
101 | 'printType': printType,
102 | 'categories': categories,
103 | 'averageRating': averageRating,
104 | 'ratingsCount': ratingsCount,
105 | 'maturityRating': maturityRating,
106 | 'allowAnonLogging': allowAnonLogging,
107 | 'contentVersion': contentVersion,
108 | 'panelizationSummary': panelizationSummary?.toJson(),
109 | 'imageLinks': imageLinks?.toJson(),
110 | 'language': language,
111 | 'previewLink': previewLink,
112 | 'infoLink': infoLink,
113 | 'canonicalVolumeLink': canonicalVolumeLink,
114 | };
115 | }
116 |
--------------------------------------------------------------------------------
/lib/Features/home/data/repos/home_repo_impl.dart:
--------------------------------------------------------------------------------
1 | import 'package:bookly/Features/home/data/data_sources/home_local_data_source.dart';
2 | import 'package:bookly/Features/home/data/data_sources/home_remote_data_source.dart';
3 | import 'package:dartz/dartz.dart';
4 |
5 | import 'package:bookly/core/errors/failure.dart';
6 |
7 | import 'package:bookly/Features/home/domain/entities/book_entity.dart';
8 | import 'package:dio/dio.dart';
9 |
10 | import '../../domain/repos/home_repo.dart';
11 |
12 | class HomeRepoImpl extends HomeRepo {
13 | final HomeRemoteDataSource homeRemoteDataSource;
14 | final HomeLocalDataSource homeLocalDataSource;
15 |
16 | HomeRepoImpl(
17 | {required this.homeRemoteDataSource, required this.homeLocalDataSource});
18 | @override
19 | Future>> fetchFeaturedBooks(
20 | {int pageNumber = 0}) async {
21 | List booksList;
22 | try {
23 | booksList = homeLocalDataSource.fetchFeaturedBooks(
24 | pageNumber: pageNumber,
25 | );
26 | if (booksList.isNotEmpty) {
27 | return right(booksList);
28 | }
29 | booksList =
30 | await homeRemoteDataSource.fetchFeaturedBooks(pageNumber: pageNumber);
31 | return right(booksList);
32 | } catch (e) {
33 | if (e is DioError) {
34 | return left(ServerFailure.fromDiorError(e));
35 | }
36 | return left(ServerFailure(e.toString()));
37 | }
38 | }
39 |
40 | @override
41 | Future>> fetchNewestBooks() async {
42 | try {
43 | List books;
44 | books = homeLocalDataSource.fetchNewestBooks();
45 | if (books.isNotEmpty) {
46 | return right(books);
47 | }
48 | books = await homeRemoteDataSource.fetchNewestBooks();
49 | return right(books);
50 | } catch (e) {
51 | if (e is DioError) {
52 | return left(ServerFailure.fromDiorError(e));
53 | }
54 | return left(ServerFailure(e.toString()));
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/lib/Features/home/domain/entities/book_entity.dart:
--------------------------------------------------------------------------------
1 | import 'package:hive/hive.dart';
2 | part 'book_entity.g.dart';
3 |
4 | @HiveType(typeId: 0)
5 | class BookEntity {
6 | @HiveField(0)
7 | final String bookId;
8 | @HiveField(1)
9 | final String? image;
10 | @HiveField(2)
11 | final String title;
12 | @HiveField(3)
13 | final String? authorName;
14 | @HiveField(4)
15 | final num? price;
16 | @HiveField(5)
17 | final num? rating;
18 |
19 | BookEntity(
20 | {required this.image,
21 | required this.title,
22 | required this.authorName,
23 | required this.price,
24 | required this.rating,
25 | required this.bookId});
26 | }
27 |
--------------------------------------------------------------------------------
/lib/Features/home/domain/entities/book_entity.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'book_entity.dart';
4 |
5 | // **************************************************************************
6 | // TypeAdapterGenerator
7 | // **************************************************************************
8 |
9 | class BookEntityAdapter extends TypeAdapter {
10 | @override
11 | final int typeId = 0;
12 |
13 | @override
14 | BookEntity read(BinaryReader reader) {
15 | final numOfFields = reader.readByte();
16 | final fields = {
17 | for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
18 | };
19 | return BookEntity(
20 | image: fields[1] as String?,
21 | title: fields[2] as String,
22 | authorName: fields[3] as String?,
23 | price: fields[4] as num?,
24 | rating: fields[5] as num?,
25 | bookId: fields[0] as String,
26 | );
27 | }
28 |
29 | @override
30 | void write(BinaryWriter writer, BookEntity obj) {
31 | writer
32 | ..writeByte(6)
33 | ..writeByte(0)
34 | ..write(obj.bookId)
35 | ..writeByte(1)
36 | ..write(obj.image)
37 | ..writeByte(2)
38 | ..write(obj.title)
39 | ..writeByte(3)
40 | ..write(obj.authorName)
41 | ..writeByte(4)
42 | ..write(obj.price)
43 | ..writeByte(5)
44 | ..write(obj.rating);
45 | }
46 |
47 | @override
48 | int get hashCode => typeId.hashCode;
49 |
50 | @override
51 | bool operator ==(Object other) =>
52 | identical(this, other) ||
53 | other is BookEntityAdapter &&
54 | runtimeType == other.runtimeType &&
55 | typeId == other.typeId;
56 | }
57 |
--------------------------------------------------------------------------------
/lib/Features/home/domain/repos/home_repo.dart:
--------------------------------------------------------------------------------
1 | import 'package:bookly/Features/home/domain/entities/book_entity.dart';
2 | import 'package:bookly/core/errors/failure.dart';
3 | import 'package:dartz/dartz.dart';
4 |
5 | abstract class HomeRepo {
6 | Future>> fetchFeaturedBooks(
7 | {int pageNumber = 0});
8 | Future>> fetchNewestBooks();
9 | }
10 |
--------------------------------------------------------------------------------
/lib/Features/home/domain/use_cases/fetch_featured_books_use_case.dart:
--------------------------------------------------------------------------------
1 | import 'package:bookly/Features/home/domain/repos/home_repo.dart';
2 | import 'package:dartz/dartz.dart';
3 |
4 | import '../../../../core/errors/failure.dart';
5 | import '../../../../core/use_cases/use_case.dart';
6 | import '../entities/book_entity.dart';
7 |
8 | class FetchFeaturedBooksUseCase extends UseCase, int> {
9 | final HomeRepo homeRepo;
10 |
11 | FetchFeaturedBooksUseCase(this.homeRepo);
12 |
13 | @override
14 | Future>> call([int param = 0]) async {
15 | return await homeRepo.fetchFeaturedBooks(
16 | pageNumber: param,
17 | );
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/lib/Features/home/domain/use_cases/fetch_newest_books_use_case.dart:
--------------------------------------------------------------------------------
1 | import 'package:dartz/dartz.dart';
2 |
3 | import '../../../../core/errors/failure.dart';
4 | import '../../../../core/use_cases/use_case.dart';
5 | import '../entities/book_entity.dart';
6 | import '../repos/home_repo.dart';
7 |
8 | class FetchNewestdBooksUseCase extends UseCase, NoParam> {
9 | final HomeRepo homeRepo;
10 |
11 | FetchNewestdBooksUseCase(this.homeRepo);
12 |
13 | @override
14 | Future>> call([NoParam? param]) async {
15 | return await homeRepo.fetchNewestBooks();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/lib/Features/home/presentation/manger/featured_books_cubit/featured_books_cubit.dart:
--------------------------------------------------------------------------------
1 | import 'package:bloc/bloc.dart';
2 | import 'package:bookly/Features/home/domain/entities/book_entity.dart';
3 | import 'package:bookly/Features/home/domain/use_cases/fetch_featured_books_use_case.dart';
4 | import 'package:meta/meta.dart';
5 |
6 | part 'featured_books_state.dart';
7 |
8 | class FeaturedBooksCubit extends Cubit {
9 | FeaturedBooksCubit(this.featuredBooksUseCase) : super(FeaturedBooksInitial());
10 |
11 | final FetchFeaturedBooksUseCase featuredBooksUseCase;
12 | Future fetchFeaturedBooks({int pageNumber = 0}) async {
13 | if (pageNumber == 0) {
14 | emit(FeaturedBooksLoading());
15 | } else {
16 | emit(FeaturedBooksPaginationLoading());
17 | }
18 | var result = await featuredBooksUseCase.call(pageNumber);
19 | result.fold((failure) {
20 | if (pageNumber == 0) {
21 | emit(FeaturedBooksFailure(failure.message));
22 | } else {
23 | emit(FeaturedBooksPaginationFailure(failure.message));
24 | }
25 | }, (books) {
26 | emit(FeaturedBooksSuccess(books));
27 | });
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/Features/home/presentation/manger/featured_books_cubit/featured_books_state.dart:
--------------------------------------------------------------------------------
1 | part of 'featured_books_cubit.dart';
2 |
3 | @immutable
4 | abstract class FeaturedBooksState {}
5 |
6 | class FeaturedBooksInitial extends FeaturedBooksState {}
7 |
8 | class FeaturedBooksLoading extends FeaturedBooksState {}
9 |
10 | class FeaturedBooksPaginationLoading extends FeaturedBooksState {}
11 |
12 | class FeaturedBooksPaginationFailure extends FeaturedBooksState {
13 | final String errMessage;
14 |
15 | FeaturedBooksPaginationFailure(this.errMessage);
16 | }
17 |
18 | class FeaturedBooksFailure extends FeaturedBooksState {
19 | final String errMessage;
20 |
21 | FeaturedBooksFailure(this.errMessage);
22 | }
23 |
24 | class FeaturedBooksSuccess extends FeaturedBooksState {
25 | final List books;
26 |
27 | FeaturedBooksSuccess(this.books);
28 | }
29 |
--------------------------------------------------------------------------------
/lib/Features/home/presentation/manger/newset_books_cubit/newest_books_cubit.dart:
--------------------------------------------------------------------------------
1 | import 'package:bloc/bloc.dart';
2 | import 'package:bookly/Features/home/domain/entities/book_entity.dart';
3 | import 'package:bookly/Features/home/domain/use_cases/fetch_newest_books_use_case.dart';
4 | import 'package:meta/meta.dart';
5 |
6 | part 'newest_books_state.dart';
7 |
8 | class NewestBooksCubit extends Cubit {
9 | NewestBooksCubit(this.fetchNewestdBooksUseCase) : super(NewestBooksInitial());
10 |
11 | final FetchNewestdBooksUseCase fetchNewestdBooksUseCase;
12 |
13 | Future fetchNewestBooks() async {
14 | emit(NewestBooksLoading());
15 | var result = await fetchNewestdBooksUseCase.call();
16 | result.fold((failure) {
17 | emit(NewestBooksFailure(failure.message));
18 | }, (books) {
19 | emit(NewestBooksSuccess(books));
20 | });
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/Features/home/presentation/manger/newset_books_cubit/newest_books_state.dart:
--------------------------------------------------------------------------------
1 | part of 'newest_books_cubit.dart';
2 |
3 | @immutable
4 | abstract class NewestBooksState {}
5 |
6 | class NewestBooksInitial extends NewestBooksState {}
7 |
8 | class NewestBooksLoading extends NewestBooksState {}
9 |
10 | class NewestBooksSuccess extends NewestBooksState {
11 | final List books;
12 |
13 | NewestBooksSuccess(this.books);
14 | }
15 |
16 | class NewestBooksFailure extends NewestBooksState {
17 | final String errMessage;
18 |
19 | NewestBooksFailure(this.errMessage);
20 | }
21 |
--------------------------------------------------------------------------------
/lib/Features/home/presentation/views/book_details_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:bookly/Features/home/presentation/views/widgets/book_details_view_body.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter/src/widgets/container.dart';
4 | import 'package:flutter/src/widgets/framework.dart';
5 |
6 | class BookDetailsView extends StatelessWidget {
7 | const BookDetailsView({super.key});
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return const Scaffold(
12 | body: SafeArea(
13 | child: BookDetailsViewBody(),
14 | ),
15 | );
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/lib/Features/home/presentation/views/home_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:bookly/Features/home/presentation/views/widgets/home_view_body.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class HomeView extends StatelessWidget {
5 | const HomeView({Key? key}) : super(key: key);
6 |
7 | @override
8 | Widget build(BuildContext context) {
9 | return const Scaffold(
10 | body: HomeViewBody(),
11 | );
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/lib/Features/home/presentation/views/widgets/best_seller_list_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'best_seller_list_view_item.dart';
4 |
5 | class BestSellerListView extends StatelessWidget {
6 | const BestSellerListView({super.key});
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | return ListView.builder(
11 | physics: const NeverScrollableScrollPhysics(),
12 | padding: EdgeInsets.zero,
13 | itemCount: 10,
14 | itemBuilder: (context, index) {
15 | return const Padding(
16 | padding: EdgeInsets.symmetric(vertical: 10),
17 | child: BookListViewItem(),
18 | );
19 | },
20 | );
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/Features/home/presentation/views/widgets/best_seller_list_view_item.dart:
--------------------------------------------------------------------------------
1 | import 'package:bookly/core/utils/app_router.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:font_awesome_flutter/font_awesome_flutter.dart';
4 | import 'package:go_router/go_router.dart';
5 |
6 | import '../../../../../constants.dart';
7 | import '../../../../../core/utils/assets.dart';
8 | import '../../../../../core/utils/styles.dart';
9 | import 'book_rating.dart';
10 |
11 | class BookListViewItem extends StatelessWidget {
12 | const BookListViewItem({super.key});
13 |
14 | @override
15 | Widget build(BuildContext context) {
16 | return GestureDetector(
17 | onTap: () {
18 | GoRouter.of(context).push(AppRouter.kBookDetailsView);
19 | },
20 | child: SizedBox(
21 | height: 125,
22 | child: Row(
23 | children: [
24 | AspectRatio(
25 | aspectRatio: 2.5 / 4,
26 | child: Container(
27 | decoration: BoxDecoration(
28 | borderRadius: BorderRadius.circular(8),
29 | color: Colors.red,
30 | image: const DecorationImage(
31 | fit: BoxFit.fill,
32 | image: AssetImage(
33 | AssetsData.testImage,
34 | ),
35 | )),
36 | ),
37 | ),
38 | const SizedBox(
39 | width: 30,
40 | ),
41 | Expanded(
42 | child: Column(
43 | crossAxisAlignment: CrossAxisAlignment.start,
44 | children: [
45 | SizedBox(
46 | width: MediaQuery.of(context).size.width * .5,
47 | child: Text(
48 | 'Harry Potter and the Goblet of Fire',
49 | maxLines: 2,
50 | overflow: TextOverflow.ellipsis,
51 | style: Styles.textStyle20.copyWith(
52 | fontFamily: kGtSectraFine,
53 | ),
54 | ),
55 | ),
56 | const SizedBox(
57 | height: 3,
58 | ),
59 | const Text(
60 | 'J.K. Rowling',
61 | style: Styles.textStyle14,
62 | ),
63 | const SizedBox(
64 | height: 3,
65 | ),
66 | Row(
67 | children: [
68 | Text(
69 | '19.99 €',
70 | style: Styles.textStyle20.copyWith(
71 | fontWeight: FontWeight.bold,
72 | ),
73 | ),
74 | const Spacer(),
75 | const BookRating(),
76 | ],
77 | ),
78 | ],
79 | ),
80 | ),
81 | ],
82 | ),
83 | ),
84 | );
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/lib/Features/home/presentation/views/widgets/book_details_view_body.dart:
--------------------------------------------------------------------------------
1 | import 'package:bookly/Features/home/presentation/views/widgets/book_rating.dart';
2 | import 'package:bookly/Features/home/presentation/views/widgets/featured_list_view.dart';
3 | import 'package:bookly/Features/home/presentation/views/widgets/similar_books_list_view.dart';
4 | import 'package:bookly/Features/home/presentation/views/widgets/similar_books_section.dart';
5 | import 'package:bookly/core/utils/styles.dart';
6 | import 'package:bookly/core/widgets/custom_button.dart';
7 | import 'package:flutter/cupertino.dart';
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter/src/widgets/container.dart';
10 | import 'package:flutter/src/widgets/framework.dart';
11 |
12 | import 'books_action.dart';
13 | import 'books_details_sectioni.dart';
14 | import 'custom_book_details_app_bar.dart';
15 | import 'custom_book_item.dart';
16 |
17 | class BookDetailsViewBody extends StatelessWidget {
18 | const BookDetailsViewBody({super.key});
19 |
20 | @override
21 | Widget build(BuildContext context) {
22 | return CustomScrollView(
23 | slivers: [
24 | SliverFillRemaining(
25 | hasScrollBody: false,
26 | child: Padding(
27 | padding: const EdgeInsets.symmetric(horizontal: 30),
28 | child: Column(
29 | children: const [
30 | CustomBookDetailsAppBar(),
31 | BookDetailsSection(),
32 | Expanded(
33 | child: SizedBox(
34 | height: 50,
35 | ),
36 | ),
37 | SimilarBooksSection(),
38 | SizedBox(
39 | height: 40,
40 | ),
41 | ],
42 | ),
43 | ),
44 | ),
45 | ],
46 | );
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/lib/Features/home/presentation/views/widgets/book_rating.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:font_awesome_flutter/font_awesome_flutter.dart';
3 |
4 | import '../../../../../core/utils/styles.dart';
5 |
6 | class BookRating extends StatelessWidget {
7 | const BookRating({
8 | super.key,
9 | this.mainAxisAlignment = MainAxisAlignment.start,
10 | });
11 |
12 | final MainAxisAlignment mainAxisAlignment;
13 | @override
14 | Widget build(BuildContext context) {
15 | return Row(
16 | mainAxisAlignment: mainAxisAlignment,
17 | children: [
18 | const Icon(
19 | FontAwesomeIcons.solidStar,
20 | size: 14,
21 | color: Color(0xffFFDD4F),
22 | ),
23 | const SizedBox(
24 | width: 6.3,
25 | ),
26 | const Text(
27 | '4.8',
28 | style: Styles.textStyle16,
29 | ),
30 | const SizedBox(
31 | width: 5,
32 | ),
33 | Opacity(
34 | opacity: .5,
35 | child: Text(
36 | '(245)',
37 | style: Styles.textStyle14.copyWith(
38 | fontWeight: FontWeight.w600,
39 | ),
40 | ),
41 | )
42 | ],
43 | );
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/lib/Features/home/presentation/views/widgets/books_action.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../../../../core/widgets/custom_button.dart';
4 |
5 | class BooksAction extends StatelessWidget {
6 | const BooksAction({super.key});
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | return Padding(
11 | padding: const EdgeInsets.symmetric(horizontal: 8),
12 | child: Row(
13 | children: const [
14 | Expanded(
15 | child: CustomButton(
16 | text: '19.99€',
17 | backgroundColor: Colors.white,
18 | textColor: Colors.black,
19 | borderRadius: BorderRadius.only(
20 | topLeft: Radius.circular(16),
21 | bottomLeft: Radius.circular(16),
22 | ),
23 | )),
24 | Expanded(
25 | child: CustomButton(
26 | fontSize: 16,
27 | text: 'Free Preview',
28 | backgroundColor: Color(0xffEF8262),
29 | textColor: Colors.white,
30 | borderRadius: BorderRadius.only(
31 | topRight: Radius.circular(16),
32 | bottomRight: Radius.circular(16),
33 | ),
34 | )),
35 | ],
36 | ),
37 | );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/lib/Features/home/presentation/views/widgets/books_details_sectioni.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../../../../core/utils/styles.dart';
4 | import 'book_rating.dart';
5 | import 'books_action.dart';
6 | import 'custom_book_item.dart';
7 |
8 | class BookDetailsSection extends StatelessWidget {
9 | const BookDetailsSection({super.key});
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | var width = MediaQuery.of(context).size.width;
14 |
15 | return Column(
16 | children: [
17 | Padding(
18 | padding: EdgeInsets.symmetric(
19 | horizontal: width * .2,
20 | ),
21 | child: const CustomBookImage(
22 | image: '',
23 | ),
24 | ),
25 | const SizedBox(
26 | height: 43,
27 | ),
28 | Text(
29 | 'The Jungle Book',
30 | style: Styles.textStyle30.copyWith(
31 | fontWeight: FontWeight.bold,
32 | ),
33 | ),
34 | const SizedBox(
35 | height: 6,
36 | ),
37 | Opacity(
38 | opacity: .7,
39 | child: Text(
40 | 'Rudyard Kipling',
41 | style: Styles.textStyle18.copyWith(
42 | fontStyle: FontStyle.italic,
43 | fontWeight: FontWeight.w500,
44 | ),
45 | ),
46 | ),
47 | const SizedBox(
48 | height: 18,
49 | ),
50 | const BookRating(
51 | mainAxisAlignment: MainAxisAlignment.center,
52 | ),
53 | const SizedBox(
54 | height: 37,
55 | ),
56 | const BooksAction(),
57 | ],
58 | );
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/lib/Features/home/presentation/views/widgets/custom_app_bar.dart:
--------------------------------------------------------------------------------
1 | import 'package:bookly/core/utils/app_router.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:font_awesome_flutter/font_awesome_flutter.dart';
4 | import 'package:go_router/go_router.dart';
5 |
6 | import '../../../../../core/utils/assets.dart';
7 |
8 | class CustomAppBar extends StatelessWidget {
9 | const CustomAppBar({Key? key}) : super(key: key);
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | return Padding(
14 | padding: const EdgeInsets.only(top: 40, bottom: 20),
15 | child: Row(
16 | children: [
17 | Image.asset(
18 | AssetsData.logo,
19 | height: 18,
20 | ),
21 | const Spacer(),
22 | IconButton(
23 | onPressed: () {
24 | GoRouter.of(context).push(AppRouter.kSearchView);
25 | },
26 | icon: const Icon(
27 | FontAwesomeIcons.magnifyingGlass,
28 | size: 22,
29 | ))
30 | ],
31 | ),
32 | );
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/lib/Features/home/presentation/views/widgets/custom_book_details_app_bar.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class CustomBookDetailsAppBar extends StatelessWidget {
4 | const CustomBookDetailsAppBar({super.key});
5 |
6 | @override
7 | Widget build(BuildContext context) {
8 | return Row(
9 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
10 | children: [
11 | IconButton(
12 | onPressed: () {},
13 | icon: const Icon(Icons.close),
14 | ),
15 | IconButton(
16 | onPressed: () {},
17 | icon: const Icon(
18 | Icons.shopping_cart_outlined,
19 | ),
20 | )
21 | ],
22 | );
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/Features/home/presentation/views/widgets/custom_book_image_loading_indicator.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class CustomBookImageLoadingIndicator extends StatelessWidget {
4 | const CustomBookImageLoadingIndicator({super.key});
5 |
6 | @override
7 | Widget build(BuildContext context) {
8 | return AspectRatio(
9 | aspectRatio: 2.6 / 4,
10 | child: ClipRRect(
11 | borderRadius: BorderRadius.circular(12),
12 | child: Container(
13 | color: Colors.grey[50],
14 | ),
15 | ),
16 | );
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/lib/Features/home/presentation/views/widgets/custom_book_item.dart:
--------------------------------------------------------------------------------
1 | import 'package:cached_network_image/cached_network_image.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class CustomBookImage extends StatelessWidget {
5 | const CustomBookImage({Key? key, required this.image}) : super(key: key);
6 |
7 | final String image;
8 | @override
9 | Widget build(BuildContext context) {
10 | return AspectRatio(
11 | aspectRatio: 2.6 / 4,
12 | child: ClipRRect(
13 | borderRadius: BorderRadius.circular(12),
14 | child: CachedNetworkImage(
15 | fit: BoxFit.fill,
16 | imageUrl: image,
17 | ),
18 | ),
19 | );
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/lib/Features/home/presentation/views/widgets/featured_books_list_view_bloc_builder.dart:
--------------------------------------------------------------------------------
1 | import 'package:bookly/Features/home/domain/entities/book_entity.dart';
2 | import 'package:bookly/Features/home/presentation/manger/featured_books_cubit/featured_books_cubit.dart';
3 | import 'package:bookly/core/utils/functions/build_error_snack_bar.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:flutter_bloc/flutter_bloc.dart';
6 |
7 | import 'featured_list_view.dart';
8 |
9 | class FeatuedBooksListViewBlocBuilder extends StatefulWidget {
10 | const FeatuedBooksListViewBlocBuilder({
11 | super.key,
12 | });
13 |
14 | @override
15 | State createState() =>
16 | _FeatuedBooksListViewBlocBuilderState();
17 | }
18 |
19 | class _FeatuedBooksListViewBlocBuilderState
20 | extends State {
21 | List books = [];
22 | @override
23 | Widget build(BuildContext context) {
24 | return BlocConsumer(
25 | listener: (context, state) {
26 | if (state is FeaturedBooksSuccess) {
27 | books.addAll(state.books);
28 | }
29 |
30 | if (state is FeaturedBooksPaginationFailure) {
31 | ScaffoldMessenger.of(context).showSnackBar(
32 | buildErrorWidget(state.errMessage),
33 | );
34 | }
35 | },
36 | builder: (context, state) {
37 | if (state is FeaturedBooksSuccess ||
38 | state is FeaturedBooksPaginationLoading ||
39 | state is FeaturedBooksPaginationFailure) {
40 | return FeaturedBooksListView(
41 | books: books,
42 | );
43 | } else if (state is FeaturedBooksFailure) {
44 | return Text(state.errMessage);
45 | } else {
46 | return const CircularProgressIndicator();
47 | }
48 | },
49 | );
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/lib/Features/home/presentation/views/widgets/featured_books_list_view_loading_indicator.dart:
--------------------------------------------------------------------------------
1 | import 'package:bookly/Features/home/presentation/views/widgets/custom_book_image_loading_indicator.dart';
2 | import 'package:bookly/core/widgets/custom_fading_widget.dart';
3 | import 'package:flutter/material.dart';
4 |
5 | class FeaturedBooksListViewLoadingIndicator extends StatelessWidget {
6 | const FeaturedBooksListViewLoadingIndicator({super.key});
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | return CustomFadingWidget(
11 | child: SizedBox(
12 | height: MediaQuery.of(context).size.height * .3,
13 | child: ListView.builder(
14 | itemCount: 15,
15 | scrollDirection: Axis.horizontal,
16 | itemBuilder: (context, index) {
17 | return const Padding(
18 | padding: EdgeInsets.symmetric(horizontal: 8),
19 | child: CustomBookImageLoadingIndicator(),
20 | );
21 | },
22 | ),
23 | ),
24 | );
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/Features/home/presentation/views/widgets/featured_list_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:bookly/Features/home/presentation/manger/featured_books_cubit/featured_books_cubit.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter_bloc/flutter_bloc.dart';
4 |
5 | import '../../../domain/entities/book_entity.dart';
6 | import 'custom_book_item.dart';
7 |
8 | class FeaturedBooksListView extends StatefulWidget {
9 | const FeaturedBooksListView({Key? key, required this.books})
10 | : super(key: key);
11 |
12 | final List books;
13 |
14 | @override
15 | State createState() => _FeaturedBooksListViewState();
16 | }
17 |
18 | class _FeaturedBooksListViewState extends State {
19 | late final ScrollController _scrollController;
20 | var nextPage = 1;
21 |
22 | var isLoading = false;
23 | @override
24 | void initState() {
25 | super.initState();
26 | _scrollController = ScrollController();
27 | _scrollController.addListener(_scrollListener);
28 | }
29 |
30 | void _scrollListener() async {
31 | var currentPositions = _scrollController.position.pixels;
32 | var maxScrollLength = _scrollController.position.maxScrollExtent;
33 | if (currentPositions >= 0.7 * maxScrollLength) {
34 | if (!isLoading) {
35 | isLoading = true;
36 | await BlocProvider.of(context)
37 | .fetchFeaturedBooks(pageNumber: nextPage++);
38 | isLoading = false;
39 | }
40 | }
41 | }
42 |
43 | @override
44 | void dispose() {
45 | _scrollController.dispose();
46 | super.dispose();
47 | }
48 |
49 | @override
50 | Widget build(BuildContext context) {
51 | return SizedBox(
52 | height: MediaQuery.of(context).size.height * .3,
53 | child: ListView.builder(
54 | controller: _scrollController,
55 | itemCount: widget.books.length,
56 | scrollDirection: Axis.horizontal,
57 | itemBuilder: (context, index) {
58 | return Padding(
59 | padding: const EdgeInsets.symmetric(horizontal: 8),
60 | child: CustomBookImage(
61 | image: widget.books[index].image ?? '',
62 | ),
63 | );
64 | },
65 | ),
66 | );
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/lib/Features/home/presentation/views/widgets/home_view_body.dart:
--------------------------------------------------------------------------------
1 | import 'package:bookly/core/utils/styles.dart';
2 | import 'package:flutter/material.dart';
3 | import 'best_seller_list_view.dart';
4 | import 'custom_app_bar.dart';
5 | import 'featured_books_list_view_bloc_builder.dart';
6 |
7 | class HomeViewBody extends StatelessWidget {
8 | const HomeViewBody({Key? key}) : super(key: key);
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return CustomScrollView(
13 | slivers: [
14 | SliverToBoxAdapter(
15 | child: Column(
16 | crossAxisAlignment: CrossAxisAlignment.start,
17 | children: const [
18 | Padding(
19 | padding: EdgeInsets.symmetric(
20 | horizontal: 30,
21 | ),
22 | child: CustomAppBar()),
23 | FeatuedBooksListViewBlocBuilder(),
24 | SizedBox(
25 | height: 50,
26 | ),
27 | Padding(
28 | padding: EdgeInsets.symmetric(horizontal: 30),
29 | child: Text(
30 | 'Best Seller',
31 | style: Styles.textStyle18,
32 | ),
33 | ),
34 | SizedBox(
35 | height: 20,
36 | ),
37 | ],
38 | ),
39 | ),
40 | const SliverFillRemaining(
41 | child: Padding(
42 | padding: EdgeInsets.symmetric(horizontal: 30),
43 | child: BestSellerListView(),
44 | ),
45 | ),
46 | ],
47 | );
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/lib/Features/home/presentation/views/widgets/similar_books_list_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'custom_book_item.dart';
4 |
5 | class SimilarBooksListview extends StatelessWidget {
6 | const SimilarBooksListview({super.key});
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | return SizedBox(
11 | height: MediaQuery.of(context).size.height * .15,
12 | child: ListView.builder(
13 | scrollDirection: Axis.horizontal,
14 | itemBuilder: (context, index) {
15 | return const Padding(
16 | padding: EdgeInsets.symmetric(horizontal: 5),
17 | child: CustomBookImage(
18 | image: '',
19 | ),
20 | );
21 | }),
22 | );
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/Features/home/presentation/views/widgets/similar_books_section.dart:
--------------------------------------------------------------------------------
1 | import 'package:bookly/Features/home/presentation/views/widgets/similar_books_list_view.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | import '../../../../../core/utils/styles.dart';
5 |
6 | class SimilarBooksSection extends StatelessWidget {
7 | const SimilarBooksSection({super.key});
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return Column(
12 | crossAxisAlignment: CrossAxisAlignment.start,
13 | children: [
14 | Text(
15 | 'You can also like',
16 | style: Styles.textStyle14.copyWith(
17 | fontWeight: FontWeight.w600,
18 | ),
19 | ),
20 | const SizedBox(
21 | height: 16,
22 | ),
23 | const SimilarBooksListview(),
24 | ],
25 | );
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/lib/Features/search/presentation/views/search_view.dart:
--------------------------------------------------------------------------------
1 | import 'package:bookly/Features/search/presentation/views/widgets/search_view_body.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter/src/widgets/container.dart';
4 | import 'package:flutter/src/widgets/framework.dart';
5 |
6 | class SearchView extends StatelessWidget {
7 | const SearchView({super.key});
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return const Scaffold(
12 | body: SafeArea(
13 | child: SearchViewBody(),
14 | ),
15 | );
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/lib/Features/search/presentation/views/widgets/custom_search_text_field.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:font_awesome_flutter/font_awesome_flutter.dart';
3 |
4 | class CustomSearchTextField extends StatelessWidget {
5 | const CustomSearchTextField({super.key});
6 |
7 | @override
8 | Widget build(BuildContext context) {
9 | return TextField(
10 | decoration: InputDecoration(
11 | enabledBorder: buildOutlineInputBorder(),
12 | focusedBorder: buildOutlineInputBorder(),
13 | hintText: 'Search',
14 | suffixIcon: IconButton(
15 | onPressed: () {},
16 | icon: const Opacity(
17 | opacity: .8,
18 | child: Icon(
19 | FontAwesomeIcons.magnifyingGlass,
20 | size: 22,
21 | ),
22 | ),
23 | ),
24 | ),
25 | );
26 | }
27 |
28 | OutlineInputBorder buildOutlineInputBorder() {
29 | return OutlineInputBorder(
30 | borderSide: const BorderSide(
31 | color: Colors.white,
32 | ),
33 | borderRadius: BorderRadius.circular(
34 | 12,
35 | ),
36 | );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/lib/Features/search/presentation/views/widgets/search_view_body.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter/src/widgets/container.dart';
4 | import 'package:flutter/src/widgets/framework.dart';
5 | import 'package:font_awesome_flutter/font_awesome_flutter.dart';
6 |
7 | import '../../../../../core/utils/styles.dart';
8 | import '../../../../home/presentation/views/widgets/best_seller_list_view_item.dart';
9 | import 'custom_search_text_field.dart';
10 |
11 | class SearchViewBody extends StatelessWidget {
12 | const SearchViewBody({super.key});
13 |
14 | @override
15 | Widget build(BuildContext context) {
16 | return Padding(
17 | padding: const EdgeInsets.symmetric(horizontal: 30),
18 | child: Column(
19 | crossAxisAlignment: CrossAxisAlignment.start,
20 | children: const [
21 | CustomSearchTextField(),
22 | SizedBox(
23 | height: 16,
24 | ),
25 | Text(
26 | 'Search Result',
27 | style: Styles.textStyle18,
28 | ),
29 | SizedBox(
30 | height: 16,
31 | ),
32 | Expanded(
33 | child: SearchResultListView(),
34 | ),
35 | ],
36 | ),
37 | );
38 | }
39 | }
40 |
41 | class SearchResultListView extends StatelessWidget {
42 | const SearchResultListView({super.key});
43 |
44 | @override
45 | Widget build(BuildContext context) {
46 | return ListView.builder(
47 | padding: EdgeInsets.zero,
48 | itemCount: 10,
49 | itemBuilder: (context, index) {
50 | return const Padding(
51 | padding: EdgeInsets.symmetric(vertical: 10),
52 | child: BookListViewItem(),
53 | );
54 | },
55 | );
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/lib/constants.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | const kPrimaryColor = Color(0xff100B20);
4 | const kTranstionDuration = Duration(milliseconds: 250);
5 | const kGtSectraFine = 'GT Sectra Fine';
6 | const kFeaturedBox = 'featured_box';
7 | const kNewestBox = 'newest_box';
8 |
--------------------------------------------------------------------------------
/lib/core/errors/failure.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/dio.dart';
2 |
3 | abstract class Failure {
4 | final String message;
5 |
6 | Failure(this.message);
7 | }
8 |
9 | class ServerFailure extends Failure {
10 | ServerFailure(super.message);
11 |
12 | factory ServerFailure.fromDiorError(DioError e) {
13 | switch (e.type) {
14 | case DioErrorType.connectionTimeout:
15 | return ServerFailure('Connection timeout with api server');
16 |
17 | case DioErrorType.sendTimeout:
18 | return ServerFailure('Send timeout with ApiServer');
19 | case DioErrorType.receiveTimeout:
20 | return ServerFailure('Receive timeout with ApiServer');
21 | case DioErrorType.badCertificate:
22 | return ServerFailure('badCertificate with api server');
23 | case DioErrorType.badResponse:
24 | return ServerFailure.fromResponse(
25 | e.response!.statusCode!, e.response!.data);
26 | case DioErrorType.cancel:
27 | return ServerFailure('Request to ApiServer was canceld');
28 | case DioErrorType.connectionError:
29 | return ServerFailure('No Internet Connection');
30 | case DioErrorType.unknown:
31 | return ServerFailure('Opps There was an Error, Please try again');
32 | }
33 | }
34 |
35 | factory ServerFailure.fromResponse(int statusCode, dynamic response) {
36 | if (statusCode == 404) {
37 | return ServerFailure('Your request was not found, please try later');
38 | } else if (statusCode == 500) {
39 | return ServerFailure('There is a problem with server, please try later');
40 | } else if (statusCode == 400 || statusCode == 401 || statusCode == 403) {
41 | return ServerFailure(response['error']['message']);
42 | } else {
43 | return ServerFailure('There was an error , please try again');
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/lib/core/use_cases/use_case.dart:
--------------------------------------------------------------------------------
1 | import 'package:dartz/dartz.dart';
2 |
3 | import '../errors/failure.dart';
4 |
5 | abstract class UseCase {
6 | Future> call([Param param]);
7 | }
8 |
9 | class NoParam {}
10 |
--------------------------------------------------------------------------------
/lib/core/utils/api_service.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/dio.dart';
2 |
3 | class ApiService {
4 | final Dio _dio;
5 |
6 | final baseUrl = "https://www.googleapis.com/books/v1/";
7 |
8 | ApiService(this._dio);
9 |
10 | Future