├── .github
└── workflows
│ └── prerelease.yaml
├── .gitignore
├── .metadata
├── LICENSE
├── Makefile
├── README.md
├── analysis_options.yaml
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── masiro
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable-hdpi
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_monochrome.png
│ │ │ ├── drawable-mdpi
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_monochrome.png
│ │ │ ├── drawable-v21
│ │ │ └── launch_background.xml
│ │ │ ├── drawable-xhdpi
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_monochrome.png
│ │ │ ├── drawable-xxhdpi
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_monochrome.png
│ │ │ ├── drawable-xxxhdpi
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_monochrome.png
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ └── launcher_icon.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── launcher_icon.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── launcher_icon.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── launcher_icon.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── launcher_icon.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── launcher_icon.png
│ │ │ ├── values-night
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── assets
└── icon
│ └── icon.png
├── devtools_options.yaml
├── flutter_launcher_icons.yaml
├── l10n.yaml
├── lib
├── bloc
│ ├── global
│ │ ├── app_theme_cubit.dart
│ │ └── user
│ │ │ ├── user_bloc.dart
│ │ │ ├── user_event.dart
│ │ │ └── user_state.dart
│ ├── screen
│ │ ├── comments
│ │ │ ├── comments_screen_bloc.dart
│ │ │ ├── comments_screen_event.dart
│ │ │ └── comments_screen_state.dart
│ │ ├── favorites
│ │ │ ├── favorites_screen_bloc.dart
│ │ │ ├── favorites_screen_event.dart
│ │ │ └── favorites_screen_state.dart
│ │ ├── novel
│ │ │ ├── novel_screen_bloc.dart
│ │ │ ├── novel_screen_event.dart
│ │ │ └── novel_screen_state.dart
│ │ ├── reader
│ │ │ ├── reader_screen_bloc.dart
│ │ │ ├── reader_screen_event.dart
│ │ │ └── reader_screen_state.dart
│ │ ├── search
│ │ │ ├── search_screen_bloc.dart
│ │ │ ├── search_screen_event.dart
│ │ │ └── search_screen_state.dart
│ │ └── settings
│ │ │ ├── settings_screen_bloc.dart
│ │ │ ├── settings_screen_event.dart
│ │ │ └── settings_screen_state.dart
│ └── util
│ │ └── event_transformer.dart
├── data
│ ├── database
│ │ ├── core.dart
│ │ ├── dao
│ │ │ ├── app_configuration_dao.dart
│ │ │ ├── chapter_record_dao.dart
│ │ │ └── user_dao.dart
│ │ ├── entity
│ │ │ ├── app_configuration_entity.dart
│ │ │ ├── app_configuration_entity.g.dart
│ │ │ ├── chapter_record_entity.dart
│ │ │ ├── chapter_record_entity.g.dart
│ │ │ ├── current_cookie_entity.dart
│ │ │ ├── current_cookie_entity.g.dart
│ │ │ ├── novel_record_entity.dart
│ │ │ ├── novel_record_entity.g.dart
│ │ │ ├── user_entity.dart
│ │ │ └── user_entity.g.dart
│ │ └── migration
│ │ │ ├── migration.dart
│ │ │ └── migration_1_to_2.dart
│ ├── network
│ │ ├── masiro_api.dart
│ │ └── response
│ │ │ ├── chapter_detail_response.dart
│ │ │ ├── common_response.dart
│ │ │ ├── novel_detail_response.dart
│ │ │ ├── paged_comment_response.dart
│ │ │ ├── paged_novel_response.dart
│ │ │ ├── profile_response.dart
│ │ │ └── volume_response.dart
│ └── repository
│ │ ├── adapter
│ │ ├── app_configuration_entity_adapter.dart
│ │ ├── chapter_detail_response_adapter.dart
│ │ ├── chapter_record_entity_adapter.dart
│ │ ├── comment_response_adapter.dart
│ │ ├── novel_detail_response_adapter.dart
│ │ ├── novel_response_adapter.dart
│ │ ├── profile_response_adapter.dart
│ │ ├── user_entity_adapter.dart
│ │ └── volume_response_adapter.dart
│ │ ├── app_configuration_repository.dart
│ │ ├── favorites_repository.dart
│ │ ├── masiro_repository.dart
│ │ ├── model
│ │ ├── app_configuration.dart
│ │ ├── chapter_detail.dart
│ │ ├── chapter_record.dart
│ │ ├── comment.dart
│ │ ├── loading_status.dart
│ │ ├── novel.dart
│ │ ├── novel_detail.dart
│ │ ├── paged_data.dart
│ │ ├── profile.dart
│ │ ├── read_position.dart
│ │ ├── reading_mode.dart
│ │ ├── user.dart
│ │ └── volume.dart
│ │ ├── novel_record_repository.dart
│ │ ├── preferences_repository.dart
│ │ ├── profile_repository.dart
│ │ └── user_repository.dart
├── di
│ ├── get_it.dart
│ ├── injectable.config.dart
│ └── injectable.dart
├── l10n
│ ├── app_zh.arb
│ ├── app_zh_hant_hk.arb
│ └── app_zh_hant_tw.arb
├── main.dart
├── misc
│ ├── chapter.dart
│ ├── chrome.dart
│ ├── constant.dart
│ ├── context.dart
│ ├── cookie.dart
│ ├── cookie_storage.dart
│ ├── easy_refresh.dart
│ ├── helper.dart
│ ├── list.dart
│ ├── oss_licenses.dart
│ ├── platform.dart
│ ├── pubspec.dart
│ ├── render.dart
│ ├── router.dart
│ ├── time.dart
│ ├── toast.dart
│ ├── tray_icon.dart
│ └── url.dart
└── ui
│ ├── app.dart
│ ├── screens
│ ├── about
│ │ └── about_screen.dart
│ ├── comments
│ │ ├── comment_card.dart
│ │ ├── comment_card_header.dart
│ │ ├── comment_card_reply_list.dart
│ │ ├── comments_screen.dart
│ │ └── pagination_dialog.dart
│ ├── error
│ │ └── error_screen.dart
│ ├── favorites
│ │ └── favorites_screen.dart
│ ├── home
│ │ └── home_screen.dart
│ ├── license
│ │ └── license_screen.dart
│ ├── licenses
│ │ └── licenses_screen.dart
│ ├── login
│ │ ├── desktop_login.dart
│ │ ├── login_screen.dart
│ │ └── mobile_phone_login.dart
│ ├── novel
│ │ ├── expandable_brief.dart
│ │ ├── novel_header.dart
│ │ ├── novel_screen.dart
│ │ └── volume_list.dart
│ ├── reader
│ │ ├── bottom_bar.dart
│ │ ├── chapter_content_scroll.dart
│ │ ├── payment_detail.dart
│ │ ├── pointer_area_indicator.dart
│ │ ├── reader_screen.dart
│ │ ├── settings_sheet.dart
│ │ └── top_bar.dart
│ ├── search
│ │ ├── novel_list.dart
│ │ ├── search_screen.dart
│ │ └── search_top_bar.dart
│ └── settings
│ │ ├── about_card.dart
│ │ ├── accounts_card.dart
│ │ ├── license_card.dart
│ │ ├── logout_card.dart
│ │ ├── profile_card.dart
│ │ ├── settings_screen.dart
│ │ ├── sign_in_card.dart
│ │ ├── theme_color_card.dart
│ │ └── theme_mode_card.dart
│ └── widgets
│ ├── adaptive_status_bar_style.dart
│ ├── after_layout.dart
│ ├── cached_image.dart
│ ├── error_message.dart
│ ├── manual_tooltip.dart
│ ├── message.dart
│ ├── nav_bar.dart
│ ├── novel_card.dart
│ └── router_outlet_with_nav_bar.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
└── RunnerTests
│ └── RunnerTests.swift
├── pubspec.lock
├── pubspec.yaml
├── test
└── widget_test.dart
└── 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 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Symbolication related
35 | app.*.symbols
36 |
37 | # Obfuscation related
38 | app.*.map.json
39 |
40 | # Android Studio will place build artifacts here
41 | /android/app/debug
42 | /android/app/profile
43 | /android/app/release
44 |
--------------------------------------------------------------------------------
/.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 and should not be manually edited.
5 |
6 | version:
7 | revision: "5874a72aa4c779a02553007c47dacbefba2374dc"
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: 5874a72aa4c779a02553007c47dacbefba2374dc
17 | base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
18 | - platform: android
19 | create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
20 | base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
21 | - platform: linux
22 | create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
23 | base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
24 | - platform: macos
25 | create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
26 | base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
27 | - platform: windows
28 | create_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
29 | base_revision: 5874a72aa4c779a02553007c47dacbefba2374dc
30 |
31 | # User provided section
32 |
33 | # List of Local paths (relative to this file) that should be
34 | # ignored by the migrate tool.
35 | #
36 | # Files that are not part of the templates will be ignored by default.
37 | unmanaged_files:
38 | - 'lib/main.dart'
39 | - 'ios/Runner.xcodeproj/project.pbxproj'
40 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: watch
2 | watch:
3 | dart run build_runner watch --delete-conflicting-outputs
4 |
5 | .PHONY: fix
6 | fix:
7 | dart fix --apply
8 |
9 | .PHONY: format
10 | format: fix
11 | dart format .
12 |
13 | .PHONY: gen-l10n
14 | gen-l10n:
15 | flutter gen-l10n
16 |
17 | .PHONY: launcher-icons
18 | launcher-icons:
19 | dart run flutter_launcher_icons
20 |
21 | .PHONY: licenses
22 | licenses:
23 | flutter pub run flutter_oss_licenses:generate.dart -o lib/misc/oss_licenses.dart
24 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |

3 |
Masiro
4 |
5 |
6 | 一款使用 Flutter 开发的第三方真白萌客户端。
7 |
8 | ## 注意
9 |
10 | - 这是一个用于学习 Flutter 的练手项目,限于作者知识水平,在使用过程中可能会出现一些问题,欢迎提 issue 和 PR
11 | - 该项目现在还处于开发的早期阶段,特性尚未稳定,pre-release 版本在使用时产生的用户数据可能不会被继承到正式版
12 |
13 | ## 介绍
14 |
15 | 该项目现在还处于开发的早期阶段,功能尚未完善,目前支持的平台如下:
16 |
17 | - [x] Linux:支持
18 | - [ ] Windows:未测试
19 | - [ ] macOS:未测试
20 | - [x] Android: 支持
21 | - [ ] iOS: 暂无计划
22 |
23 | ## 致谢
24 |
25 | 特别感谢 [Qing-Novel](https://github.com/Qing-Novel) 大佬制作的图标。
26 |
27 | ## License
28 |
29 | GPL-3.0 license.
30 |
--------------------------------------------------------------------------------
/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 https://dart.dev/lints.
17 | #
18 | # Instead of disabling a lint rule for the entire project in the
19 | # section below, it can also be suppressed for a single line of code
20 | # or a specific dart file by using the `// ignore: name_of_lint` and
21 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
22 | # producing the lint.
23 | rules:
24 | always_declare_return_types: true
25 | avoid_print: true
26 | prefer_single_quotes: true
27 | always_use_package_imports: true
28 | avoid_empty_else: true
29 | comment_references: true
30 | constant_identifier_names: true
31 | curly_braces_in_flow_control_structures: true
32 | directives_ordering: true
33 | flutter_style_todos: true
34 | package_names: true
35 | prefer_contains: true
36 | prefer_if_null_operators: true
37 | prefer_is_empty: true
38 | prefer_is_not_operator: true
39 | prefer_iterable_whereType: true
40 | prefer_mixin: true
41 | prefer_null_aware_method_calls: true
42 | prefer_null_aware_operators: true
43 | prefer_spread_collections: true
44 | require_trailing_commas: true
45 | sized_box_shrink_expand: true
46 | unawaited_futures: true
47 | unnecessary_await_in_return: true
48 | unnecessary_breaks: true
49 | unnecessary_const: true
50 | prefer_final_locals: true
51 | prefer_final_in_for_each: true
52 | prefer_final_fields: true
53 | unnecessary_late: true
54 | unnecessary_new: true
55 | unnecessary_parenthesis: true
56 | unnecessary_statements: true
57 | unnecessary_string_escapes: true
58 | unnecessary_to_list_in_spreads: true
59 | use_enums: true
60 | use_if_null_to_convert_nulls_to_bools: true
61 | use_named_constants: true
62 | use_raw_strings: true
63 | use_to_and_as_if_applicable: true
64 |
--------------------------------------------------------------------------------
/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/to/reference-keystore
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id "com.android.application"
3 | id "kotlin-android"
4 | // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
5 | id "dev.flutter.flutter-gradle-plugin"
6 | }
7 |
8 | android {
9 | namespace = "com.example.masiro"
10 | compileSdk = flutter.compileSdkVersion
11 | ndkVersion = flutter.ndkVersion
12 |
13 | compileOptions {
14 | sourceCompatibility = JavaVersion.VERSION_1_8
15 | targetCompatibility = JavaVersion.VERSION_1_8
16 | }
17 |
18 | kotlinOptions {
19 | jvmTarget = JavaVersion.VERSION_1_8
20 | }
21 |
22 | defaultConfig {
23 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
24 | applicationId = "com.example.masiro"
25 | // You can update the following values to match your application needs.
26 | // For more information, see: https://flutter.dev/to/review-gradle-config.
27 | minSdk = flutter.minSdkVersion
28 | targetSdk = flutter.targetSdkVersion
29 | versionCode = flutter.versionCode
30 | versionName = flutter.versionName
31 | minSdkVersion flutter.minSdkVersion
32 | }
33 |
34 | buildTypes {
35 | release {
36 | // TODO: Add your own signing config for the release build.
37 | // Signing with the debug keys for now, so `flutter run --release` works.
38 | signingConfig = signingConfigs.debug
39 | }
40 | }
41 | }
42 |
43 | flutter {
44 | source = "../.."
45 | }
46 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
17 |
21 |
25 |
26 |
27 |
28 |
29 |
30 |
32 |
35 |
36 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/masiro/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.masiro
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity()
6 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qixiaoo/masiro/eff339269371e50d432663d4a55402ba3d8d582c/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-hdpi/ic_launcher_monochrome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qixiaoo/masiro/eff339269371e50d432663d4a55402ba3d8d582c/android/app/src/main/res/drawable-hdpi/ic_launcher_monochrome.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qixiaoo/masiro/eff339269371e50d432663d4a55402ba3d8d582c/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/ic_launcher_monochrome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qixiaoo/masiro/eff339269371e50d432663d4a55402ba3d8d582c/android/app/src/main/res/drawable-mdpi/ic_launcher_monochrome.png
--------------------------------------------------------------------------------
/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-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qixiaoo/masiro/eff339269371e50d432663d4a55402ba3d8d582c/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xhdpi/ic_launcher_monochrome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qixiaoo/masiro/eff339269371e50d432663d4a55402ba3d8d582c/android/app/src/main/res/drawable-xhdpi/ic_launcher_monochrome.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qixiaoo/masiro/eff339269371e50d432663d4a55402ba3d8d582c/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxhdpi/ic_launcher_monochrome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qixiaoo/masiro/eff339269371e50d432663d4a55402ba3d8d582c/android/app/src/main/res/drawable-xxhdpi/ic_launcher_monochrome.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qixiaoo/masiro/eff339269371e50d432663d4a55402ba3d8d582c/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_monochrome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qixiaoo/masiro/eff339269371e50d432663d4a55402ba3d8d582c/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_monochrome.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-anydpi-v26/launcher_icon.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
10 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qixiaoo/masiro/eff339269371e50d432663d4a55402ba3d8d582c/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/launcher_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qixiaoo/masiro/eff339269371e50d432663d4a55402ba3d8d582c/android/app/src/main/res/mipmap-hdpi/launcher_icon.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qixiaoo/masiro/eff339269371e50d432663d4a55402ba3d8d582c/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/launcher_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qixiaoo/masiro/eff339269371e50d432663d4a55402ba3d8d582c/android/app/src/main/res/mipmap-mdpi/launcher_icon.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qixiaoo/masiro/eff339269371e50d432663d4a55402ba3d8d582c/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qixiaoo/masiro/eff339269371e50d432663d4a55402ba3d8d582c/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qixiaoo/masiro/eff339269371e50d432663d4a55402ba3d8d582c/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qixiaoo/masiro/eff339269371e50d432663d4a55402ba3d8d582c/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qixiaoo/masiro/eff339269371e50d432663d4a55402ba3d8d582c/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qixiaoo/masiro/eff339269371e50d432663d4a55402ba3d8d582c/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
16 |
20 |
21 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #547dd1
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
16 |
20 |
21 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | allprojects {
2 | repositories {
3 | google()
4 | mavenCentral()
5 | }
6 | }
7 |
8 | rootProject.buildDir = "../build"
9 | subprojects {
10 | project.buildDir = "${rootProject.buildDir}/${project.name}"
11 | }
12 | subprojects {
13 | // fix for verifyReleaseResources, see: https://github.com/isar/isar/issues/1654
14 | // ============
15 | afterEvaluate { project ->
16 | if (project.plugins.hasPlugin("com.android.application") ||
17 | project.plugins.hasPlugin("com.android.library")) {
18 | project.android {
19 | compileSdkVersion 34
20 | buildToolsVersion "34.0.0"
21 | }
22 | }
23 | if (project.hasProperty("android")) {
24 | project.android {
25 | if (namespace == null) {
26 | namespace project.group
27 | }
28 | }
29 | }
30 | }
31 | // ============
32 |
33 | project.evaluationDependsOn(":app")
34 | }
35 |
36 | tasks.register("clean", Delete) {
37 | delete rootProject.buildDir
38 | }
39 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
6 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | def flutterSdkPath = {
3 | def properties = new Properties()
4 | file("local.properties").withInputStream { properties.load(it) }
5 | def flutterSdkPath = properties.getProperty("flutter.sdk")
6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7 | return flutterSdkPath
8 | }()
9 |
10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
11 |
12 | repositories {
13 | google()
14 | mavenCentral()
15 | gradlePluginPortal()
16 | }
17 | }
18 |
19 | plugins {
20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21 | id "com.android.application" version "7.3.0" apply false
22 | id "org.jetbrains.kotlin.android" version "1.7.10" apply false
23 | }
24 |
25 | include ":app"
26 |
--------------------------------------------------------------------------------
/assets/icon/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qixiaoo/masiro/eff339269371e50d432663d4a55402ba3d8d582c/assets/icon/icon.png
--------------------------------------------------------------------------------
/devtools_options.yaml:
--------------------------------------------------------------------------------
1 | description: This file stores settings for Dart & Flutter DevTools.
2 | documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
3 | extensions:
4 |
--------------------------------------------------------------------------------
/flutter_launcher_icons.yaml:
--------------------------------------------------------------------------------
1 | # flutter pub run flutter_launcher_icons
2 | flutter_launcher_icons:
3 | image_path: "assets/icon/icon.png"
4 |
5 | android: "launcher_icon"
6 | # image_path_android: "assets/icon/icon.png"
7 | min_sdk_android: 21 # android min sdk min:16, default 21
8 | adaptive_icon_background: "#547dd1"
9 | adaptive_icon_foreground: "assets/icon/icon.png"
10 | adaptive_icon_monochrome: "assets/icon/icon.png"
11 |
12 | ios: false
13 | # image_path_ios: "assets/icon/icon.png"
14 | remove_alpha_channel_ios: true
15 | # image_path_ios_dark_transparent: "assets/icon/icon_dark.png"
16 | # image_path_ios_tinted_grayscale: "assets/icon/icon_tinted.png"
17 | # desaturate_tinted_to_grayscale_ios: true
18 |
19 | web:
20 | generate: false
21 | image_path: "assets/icon/icon.png"
22 | background_color: "#hexcode"
23 | theme_color: "#hexcode"
24 |
25 | windows:
26 | generate: false
27 | image_path: "assets/icon/icon.png"
28 | icon_size: 48 # min:48, max:256, default: 48
29 |
30 | macos:
31 | generate: false
32 | image_path: "assets/icon/icon.png"
33 |
--------------------------------------------------------------------------------
/l10n.yaml:
--------------------------------------------------------------------------------
1 | arb-dir: lib/l10n
2 | template-arb-file: app_zh.arb
3 | output-localization-file: app_localizations.dart
4 |
--------------------------------------------------------------------------------
/lib/bloc/global/app_theme_cubit.dart:
--------------------------------------------------------------------------------
1 | import 'package:equatable/equatable.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter_bloc/flutter_bloc.dart';
4 | import 'package:masiro/data/repository/app_configuration_repository.dart';
5 | import 'package:masiro/di/get_it.dart';
6 | import 'package:masiro/misc/constant.dart';
7 |
8 | class AppThemeCubit extends Cubit {
9 | final _appConfigurationRepository = getIt();
10 |
11 | AppThemeCubit() : super(const AppThemeData()) {
12 | _initialize();
13 | }
14 |
15 | Future _initialize() async {
16 | final config = await _appConfigurationRepository.getAppConfiguration();
17 | emit(
18 | state.copyWith(
19 | themeMode: config.themeMode,
20 | themeColor: config.themeColor,
21 | ),
22 | );
23 | }
24 |
25 | Future setThemeMode(ThemeMode themeMode) async {
26 | await _appConfigurationRepository.setThemeMode(themeMode);
27 | emit(state.copyWith(themeMode: themeMode));
28 | }
29 |
30 | Future setThemeColor(int themeColor) async {
31 | await _appConfigurationRepository.setThemeColor(themeColor);
32 | emit(state.copyWith(themeColor: themeColor));
33 | }
34 | }
35 |
36 | class AppThemeData extends Equatable {
37 | final ThemeMode themeMode;
38 | final int themeColor;
39 |
40 | const AppThemeData({
41 | this.themeMode = ThemeMode.system,
42 | this.themeColor = defaultThemeColor,
43 | });
44 |
45 | AppThemeData copyWith({
46 | ThemeMode? themeMode,
47 | int? themeColor,
48 | }) {
49 | return AppThemeData(
50 | themeMode: themeMode ?? this.themeMode,
51 | themeColor: themeColor ?? this.themeColor,
52 | );
53 | }
54 |
55 | @override
56 | List