├── .fvmrc
├── .github
├── FAQ.md
├── Not-Unlocked.jpg
├── README_en.md
├── README_id.md
├── board
│ ├── android.json
│ ├── android_play.json
│ └── ios.json
├── preview
│ ├── 1.jpg
│ └── 2.jpg
└── workflows
│ ├── build_ios.yml
│ └── build_windows.yml
├── .gitignore
├── .gradle
├── 6.1.1
│ ├── executionHistory
│ │ └── executionHistory.lock
│ ├── fileChanges
│ │ └── last-build.bin
│ ├── fileHashes
│ │ └── fileHashes.lock
│ └── gc.properties
├── buildOutputCleanup
│ ├── buildOutputCleanup.lock
│ └── cache.properties
├── checksums
│ └── checksums.lock
└── vcs-1
│ └── gc.properties
├── .metadata
├── .vscode
└── launch.json
├── LICENSE
├── README.md
├── analysis_options.yaml
├── android
├── .gitignore
├── .project
├── .settings
│ └── org.eclipse.buildship.core.prefs
├── app
│ ├── .classpath
│ ├── .project
│ ├── .settings
│ │ └── org.eclipse.buildship.core.prefs
│ ├── build.gradle.kts
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── ic_launcher-playstore.png
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── perol
│ │ │ │ └── pixez
│ │ │ │ ├── CardAppWidget.kt
│ │ │ │ ├── CardGlanceWidgetReceiver.kt
│ │ │ │ ├── CodeGen.kt
│ │ │ │ ├── CrashHandler.kt
│ │ │ │ ├── IllustCardAppWidget.kt
│ │ │ │ ├── MainActivity.kt
│ │ │ │ ├── PixEz.kt
│ │ │ │ ├── SquareAppWidget.kt
│ │ │ │ ├── glance
│ │ │ │ ├── GlanceDBManager.kt
│ │ │ │ ├── GlanceKtx.kt
│ │ │ │ ├── GlanceTheme.kt
│ │ │ │ ├── ImageGlanceWidget.kt
│ │ │ │ └── ImageWorker.kt
│ │ │ │ └── plugin
│ │ │ │ ├── CustomTab.kt
│ │ │ │ ├── DeepLinkPlugin.kt
│ │ │ │ ├── Imager.kt
│ │ │ │ ├── JsEvalPlugin.kt
│ │ │ │ ├── OpenSettinger.kt
│ │ │ │ ├── Safer.kt
│ │ │ │ ├── SecurePlugin.kt
│ │ │ │ ├── SupporterPlugin.kt
│ │ │ │ └── Weiss.kt
│ │ └── res
│ │ │ ├── drawable-anydpi-v24
│ │ │ └── ic_stat_name.xml
│ │ │ ├── drawable-hdpi
│ │ │ ├── ic_stat_name.png
│ │ │ └── splash_forground.png
│ │ │ ├── drawable-mdpi
│ │ │ ├── ic_stat_name.png
│ │ │ └── splash_forground.png
│ │ │ ├── drawable-night
│ │ │ └── launch_background.xml
│ │ │ ├── drawable-nodpi
│ │ │ └── ic_launcher.png
│ │ │ ├── drawable-xhdpi
│ │ │ ├── ic_stat_name.png
│ │ │ └── splash_forground.png
│ │ │ ├── drawable-xxhdpi
│ │ │ ├── ic_stat_name.png
│ │ │ └── splash_forground.png
│ │ │ ├── drawable-xxxhdpi
│ │ │ ├── ic_stat_name.png
│ │ │ └── splash_forground.png
│ │ │ ├── drawable
│ │ │ ├── bg_widget_card.xml
│ │ │ ├── ic_baseline_folder_open_24.xml
│ │ │ ├── ic_baseline_refresh.xml
│ │ │ ├── launch_background.xml
│ │ │ └── widget_gradient.xml
│ │ │ ├── layout
│ │ │ ├── activity_webview.xml
│ │ │ ├── card_app_widget.xml
│ │ │ └── illust_app_widget.xml
│ │ │ ├── menu
│ │ │ └── menu_webview.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_background.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_background.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_background.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_background.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_background.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── values-fil
│ │ │ └── strings.xml
│ │ │ ├── values-night-v31
│ │ │ ├── glance_colors.xml
│ │ │ └── styles.xml
│ │ │ ├── values-night
│ │ │ └── glance_colors.xml
│ │ │ ├── values-ru-rRU
│ │ │ └── strings.xml
│ │ │ ├── values-v14
│ │ │ └── dimens.xml
│ │ │ ├── values-v31
│ │ │ └── styles.xml
│ │ │ ├── values-zh-rCN
│ │ │ └── strings.xml
│ │ │ ├── values-zh-rTW
│ │ │ └── strings.xml
│ │ │ ├── values
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ ├── glance_colors.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ │ └── xml
│ │ │ ├── card_app_widget_info.xml
│ │ │ ├── file_provider_paths.xml
│ │ │ └── illust_app_widget_info.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle.kts
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── settings.gradle.kts
└── weiss
│ ├── .project
│ ├── .settings
│ └── org.eclipse.buildship.core.prefs
│ ├── build.gradle
│ └── weiss.aar
├── assets
├── emojis
│ ├── 101.png
│ ├── 102.png
│ ├── 103.png
│ ├── 104.png
│ ├── 105.png
│ ├── 106.png
│ ├── 107.png
│ ├── 108.png
│ ├── 201.png
│ ├── 202.png
│ ├── 203.png
│ ├── 204.png
│ ├── 205.png
│ ├── 206.png
│ ├── 207.png
│ ├── 208.png
│ ├── 209.png
│ ├── 301.png
│ ├── 302.png
│ ├── 303.png
│ ├── 304.png
│ ├── 305.png
│ ├── 306.png
│ ├── 307.png
│ ├── 308.png
│ ├── 309.png
│ ├── 310.png
│ ├── 401.png
│ ├── 402.png
│ ├── 403.png
│ ├── 404.png
│ ├── 405.png
│ ├── 406.png
│ ├── 407.png
│ ├── 408.png
│ ├── 501.png
│ ├── 502.png
│ └── 503.png
├── fonts
│ └── iconfont.ttf
├── images
│ ├── fish.gif
│ ├── h_long.jpg
│ ├── ic_front.png
│ ├── icon.png
│ ├── liz.png
│ ├── me.jpg
│ ├── nine.jpg
│ ├── open_by_default_hint.png
│ ├── right_now.jpg
│ ├── step1.png
│ ├── step2.png
│ └── weixin_qr.png
└── json
│ ├── host.json
│ └── recent_message.json
├── comment_element.html
├── comment_emoji2map.py
├── devtools_options.yaml
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── ios
├── .gitignore
├── Flutter
│ ├── .last_build_id
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ ├── Release.xcconfig
│ └── ephemeral
│ │ ├── flutter_lldb_helper.py
│ │ └── flutter_lldbinit
├── Podfile
├── Podfile.lock
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ └── swiftpm
│ │ │ └── Package.resolved
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ ├── WorkspaceSettings.xcsettings
│ │ └── swiftpm
│ │ └── Package.resolved
├── Runner
│ ├── AppDelegate.swift
│ ├── AppWidgetDBManager.swift
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── icon-1024 1.png
│ │ │ ├── icon-1024 2.png
│ │ │ └── icon-1024.png
│ │ ├── Contents.json
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Base64URLEncoding.swift
│ ├── CodeGen.swift
│ ├── DeepLinkPlugin.swift
│ ├── DocumentPlugin.swift
│ ├── Info.plist
│ ├── Runner-Bridging-Header.h
│ ├── Runner.entitlements
│ ├── es.lproj
│ │ ├── LaunchScreen.strings
│ │ └── Main.strings
│ ├── ja.lproj
│ │ ├── LaunchScreen.strings
│ │ └── Main.strings
│ ├── ko.lproj
│ │ ├── LaunchScreen.strings
│ │ └── Main.strings
│ ├── ru.lproj
│ │ ├── LaunchScreen.strings
│ │ └── Main.strings
│ ├── zh-Hans.lproj
│ │ ├── LaunchScreen.strings
│ │ └── Main.strings
│ └── zh-Hant.lproj
│ │ ├── LaunchScreen.strings
│ │ └── Main.strings
├── Tinker
│ ├── AppWidgetDBManager.swift
│ ├── Assets.xcassets
│ │ ├── AccentColor.colorset
│ │ │ └── Contents.json
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ └── WidgetBackground.colorset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── Tinker.swift
│ └── TinkerBundle.swift
├── TinkerExtension.entitlements
└── build
│ └── .last_build_id
├── l10n.yaml
├── lib
├── clipboard_plugin.dart
├── component
│ ├── anim_expand.dart
│ ├── ban_page.dart
│ ├── comment_emoji_text.dart
│ ├── common_back_area.dart
│ ├── empty_page.dart
│ ├── fail_face.dart
│ ├── follow_detail_alert.dart
│ ├── illust_card.dart
│ ├── new_version_chip.dart
│ ├── null_hero.dart
│ ├── painer_card.dart
│ ├── painter_avatar.dart
│ ├── picker
│ │ ├── block_picker.dart
│ │ ├── colorpicker.dart
│ │ ├── colors.dart
│ │ ├── material_picker.dart
│ │ ├── palette.dart
│ │ └── utils.dart
│ ├── pixez_default_header.dart
│ ├── pixiv_image.dart
│ ├── pixiv_image_shielded.dart
│ ├── selectable_html.dart
│ ├── sort_group.dart
│ ├── spotlight_card.dart
│ ├── staggered_illust.dart
│ ├── star_icon.dart
│ └── ugoira_painter.dart
├── constants.dart
├── crypto_plugin.dart
├── custom_icon.dart
├── custom_tab_plugin.dart
├── deep_link_plugin.dart
├── document_plugin.dart
├── er
│ ├── fetcher.dart
│ ├── fluent_leader.dart
│ ├── hoster.dart
│ ├── leader.dart
│ ├── lprinter.dart
│ ├── prefer.dart
│ ├── sharer.dart
│ ├── toaster.dart
│ └── updater.dart
├── exts.dart
├── fluent
│ ├── component
│ │ ├── ban_page.dart
│ │ ├── context_menu.dart
│ │ ├── focus_wrap.dart
│ │ ├── illust_card.dart
│ │ ├── new_version_chip.dart
│ │ ├── painer_card.dart
│ │ ├── painter_avatar.dart
│ │ ├── pixez_button.dart
│ │ ├── pixiv_image.dart
│ │ ├── search_box
│ │ │ ├── item.dart
│ │ │ └── pixez_search_box.dart
│ │ ├── selectable_html.dart
│ │ ├── sort_group.dart
│ │ └── spotlight_card.dart
│ ├── fluentui.dart
│ ├── lighting
│ │ └── fluent_lighting_page.dart
│ ├── navigation_framework.dart
│ └── page
│ │ ├── Init
│ │ ├── guide_page.dart
│ │ └── init_page.dart
│ │ ├── about
│ │ ├── about_page.dart
│ │ ├── thanks_list.dart
│ │ └── update_page.dart
│ │ ├── account
│ │ ├── edit
│ │ │ └── account_edit_page.dart
│ │ └── select
│ │ │ └── account_select_page.dart
│ │ ├── book
│ │ └── tag
│ │ │ └── book_tag_page.dart
│ │ ├── comment
│ │ └── comment_page.dart
│ │ ├── create
│ │ └── user
│ │ │ └── create_user_page.dart
│ │ ├── follow
│ │ └── follow_list.dart
│ │ ├── hello
│ │ ├── fluent_hello_page.dart
│ │ ├── new
│ │ │ ├── illust
│ │ │ │ └── new_illust_page.dart
│ │ │ └── new_page.dart
│ │ ├── ranking
│ │ │ ├── rank_page.dart
│ │ │ └── ranking_mode
│ │ │ │ └── rank_mode_page.dart
│ │ ├── recom
│ │ │ ├── recom_manga_page.dart
│ │ │ ├── recom_spotlight_page.dart
│ │ │ ├── recom_user_page.dart
│ │ │ └── recom_user_road.dart
│ │ └── setting
│ │ │ ├── app_cache_page.dart
│ │ │ ├── copy_text_page.dart
│ │ │ ├── data_export_page.dart
│ │ │ ├── save_eval_page.dart
│ │ │ ├── save_format_page.dart
│ │ │ ├── setting_cross_adapter_page.dart
│ │ │ ├── setting_page.dart
│ │ │ ├── setting_prefs_page.dart
│ │ │ └── setting_quality_page.dart
│ │ ├── history
│ │ └── history_page.dart
│ │ ├── login
│ │ ├── login_page.dart
│ │ └── token_page.dart
│ │ ├── network
│ │ ├── network_page.dart
│ │ ├── network_select.dart
│ │ └── network_setting_page.dart
│ │ ├── painter
│ │ └── painter_list.dart
│ │ ├── picture
│ │ ├── illust_detail_body.dart
│ │ ├── illust_items_page.dart
│ │ ├── illust_lighting_page.dart
│ │ ├── illust_row_page.dart
│ │ ├── illust_vertical_page.dart
│ │ ├── picture_list_page.dart
│ │ ├── row_card.dart
│ │ ├── save_effect_trailing.dart
│ │ ├── tag_for_illust_page.dart
│ │ └── ugoira_loader.dart
│ │ ├── platform
│ │ └── platform_page.dart
│ │ ├── preview
│ │ └── preview_page.dart
│ │ ├── report
│ │ └── report_items_page.dart
│ │ ├── river
│ │ ├── river_page.dart
│ │ └── river_provider.dart
│ │ ├── search
│ │ ├── result
│ │ │ └── painter
│ │ │ │ └── search_result_painter_page.dart
│ │ ├── result_illust_list.dart
│ │ ├── result_page.dart
│ │ └── suggest
│ │ │ └── search_suggestion_page.dart
│ │ ├── shield
│ │ └── shield_page.dart
│ │ ├── soup
│ │ └── soup_page.dart
│ │ ├── splash
│ │ └── splash_page.dart
│ │ ├── spotlight
│ │ └── spotlight_page.dart
│ │ ├── task
│ │ └── job_page.dart
│ │ ├── theme
│ │ └── theme_page.dart
│ │ ├── user
│ │ ├── bookmark
│ │ │ ├── bookmark_page.dart
│ │ │ └── tag
│ │ │ │ └── user_bookmark_tag_page.dart
│ │ ├── detail
│ │ │ └── user_detail.dart
│ │ ├── users_page.dart
│ │ └── works
│ │ │ └── works_page.dart
│ │ ├── vision
│ │ └── vision_page.dart
│ │ ├── webview
│ │ ├── account_deletion_webview_page.dart
│ │ └── webview_page.dart
│ │ └── zoom
│ │ ├── photo_zoom_page.dart
│ │ └── zoom_page.dart
├── generated_plugin_registrant.dart
├── i18n.dart
├── js_eval_plugin.dart
├── l10n
│ ├── intl_en.arb
│ ├── intl_en_US.arb
│ ├── intl_es.arb
│ ├── intl_fil.arb
│ ├── intl_id.arb
│ ├── intl_id_ID.arb
│ ├── intl_ja.arb
│ ├── intl_ko.arb
│ ├── intl_ru.arb
│ ├── intl_tr.arb
│ ├── intl_zh.arb
│ ├── intl_zh_CN.arb
│ └── intl_zh_TW.arb
├── lighting
│ ├── lighting_page.dart
│ └── lighting_store.dart
├── main.dart
├── models
│ ├── account.dart
│ ├── account_edit_response.dart
│ ├── amwork.dart
│ ├── ban_comment_persist.dart
│ ├── ban_illust_id.dart
│ ├── ban_tag.dart
│ ├── ban_user_id.dart
│ ├── board_info.dart
│ ├── bookmark.dart
│ ├── bookmark_detail.dart
│ ├── comment_response.dart
│ ├── create_user_response.dart
│ ├── error_message.dart
│ ├── export_tag_history_data.dart
│ ├── follow_detail.dart
│ ├── glance_illust_persist.dart
│ ├── illust.dart
│ ├── illust_bookmark_tags_response.dart
│ ├── illust_persist.dart
│ ├── illust_series_detail.dart
│ ├── illust_series_with_id_model.dart
│ ├── key_value_pair.dart
│ ├── login_error_response.dart
│ ├── novel_persist.dart
│ ├── novel_recom_response.dart
│ ├── novel_series_detail.dart
│ ├── novel_text_response.dart
│ ├── novel_viewer_persist.dart
│ ├── novel_web_response.dart
│ ├── onezero_response.dart
│ ├── ranking.dart
│ ├── recommend.dart
│ ├── show_ai_response.dart
│ ├── spotlight_response.dart
│ ├── tags.dart
│ ├── task_persist.dart
│ ├── trend_tags.dart
│ ├── ugoira_metadata_response.dart
│ ├── user_detail.dart
│ ├── user_preview.dart
│ └── watchlist_manga_model.dart
├── network
│ ├── account_client.dart
│ ├── api_client.dart
│ ├── oauth_client.dart
│ ├── onezero_client.dart
│ └── refresh_token_interceptor.dart
├── open_setting_plugin.dart
├── page
│ ├── Init
│ │ ├── guide_page.dart
│ │ └── init_page.dart
│ ├── about
│ │ ├── about_page.dart
│ │ ├── contributors.dart
│ │ ├── languages.dart
│ │ ├── last_release.dart
│ │ ├── thanks_list.dart
│ │ ├── thanks_peoples.dart
│ │ └── update_page.dart
│ ├── account
│ │ ├── edit
│ │ │ ├── account_edit_page.dart
│ │ │ └── account_edit_store.dart
│ │ └── select
│ │ │ └── account_select_page.dart
│ ├── board
│ │ └── board_page.dart
│ ├── book
│ │ └── tag
│ │ │ └── book_tag_page.dart
│ ├── comment
│ │ ├── comment_page.dart
│ │ └── comment_store.dart
│ ├── create
│ │ └── user
│ │ │ └── create_user_page.dart
│ ├── directory
│ │ ├── directory_page.dart
│ │ ├── directory_store.dart
│ │ └── save_mode_choice_page.dart
│ ├── follow
│ │ └── follow_list.dart
│ ├── hello
│ │ ├── android_hello_page.dart
│ │ ├── hello_page.dart
│ │ ├── new
│ │ │ ├── illust
│ │ │ │ └── new_illust_page.dart
│ │ │ └── new_page.dart
│ │ ├── ranking
│ │ │ ├── rank_page.dart
│ │ │ ├── rank_store.dart
│ │ │ └── ranking_mode
│ │ │ │ ├── rank_mode_page.dart
│ │ │ │ └── rank_mode_store.dart
│ │ ├── recom
│ │ │ ├── recom_manga_page.dart
│ │ │ ├── recom_spotlight_page.dart
│ │ │ ├── recom_user_page.dart
│ │ │ ├── recom_user_road.dart
│ │ │ ├── recom_user_store.dart
│ │ │ └── spotlight_store.dart
│ │ └── setting
│ │ │ ├── app_cache_page.dart
│ │ │ ├── copy_text_page.dart
│ │ │ ├── data_export_page.dart
│ │ │ ├── export_page.dart
│ │ │ ├── save_eval_page.dart
│ │ │ ├── save_format_page.dart
│ │ │ ├── setting_cross_adapter_page.dart
│ │ │ ├── setting_page.dart
│ │ │ └── setting_quality_page.dart
│ ├── history
│ │ ├── history_page.dart
│ │ ├── history_store.dart
│ │ └── history_store.freezed.dart
│ ├── login
│ │ ├── login_page.dart
│ │ ├── login_store.dart
│ │ └── token_page.dart
│ ├── network
│ │ ├── network_page.dart
│ │ ├── network_select.dart
│ │ ├── network_setting_page.dart
│ │ └── network_setting_store.dart
│ ├── novel
│ │ ├── bookmark
│ │ │ └── novel_bookmark_page.dart
│ │ ├── component
│ │ │ ├── novel_bookmark_button.dart
│ │ │ ├── novel_card.dart
│ │ │ ├── novel_lighting_list.dart
│ │ │ └── novel_lighting_store.dart
│ │ ├── history
│ │ │ ├── novel_history_page.dart
│ │ │ └── novel_history_store.dart
│ │ ├── new
│ │ │ ├── novel_new_list.dart
│ │ │ └── novel_new_page.dart
│ │ ├── novel_page.dart
│ │ ├── novel_rail.dart
│ │ ├── quick
│ │ │ └── novel_quick_page.dart
│ │ ├── rank
│ │ │ ├── novel_rank_mode.dart
│ │ │ └── novel_rank_page.dart
│ │ ├── recom
│ │ │ └── novel_recom_page.dart
│ │ ├── search
│ │ │ ├── novel_result_list.dart
│ │ │ ├── novel_result_page.dart
│ │ │ └── novel_search_page.dart
│ │ ├── series
│ │ │ └── novel_series_page.dart
│ │ ├── user
│ │ │ ├── novel_user_bookmark_page.dart
│ │ │ ├── novel_user_work_page.dart
│ │ │ └── novel_users_page.dart
│ │ ├── viewer
│ │ │ ├── image_text.dart
│ │ │ ├── novel_store.dart
│ │ │ ├── novel_viewer.dart
│ │ │ └── novel_web_viewer.dart
│ │ └── work
│ │ │ └── novel_work_page.dart
│ ├── painter
│ │ ├── painter_list.dart
│ │ └── painter_list_store.dart
│ ├── picture
│ │ ├── illust_about_store.dart
│ │ ├── illust_detail_body.dart
│ │ ├── illust_detail_content.dart
│ │ ├── illust_detail_store.dart
│ │ ├── illust_lighting_page.dart
│ │ ├── illust_row_page.dart
│ │ ├── illust_store.dart
│ │ ├── picture_list_page.dart
│ │ ├── save_effect_trailing.dart
│ │ ├── tag_for_illust_page.dart
│ │ ├── tag_for_illust_store.dart
│ │ ├── ugoira_loader.dart
│ │ ├── ugoira_store.dart
│ │ └── user_follow_button.dart
│ ├── platform
│ │ └── platform_page.dart
│ ├── preview
│ │ └── preview_page.dart
│ ├── report
│ │ └── report_items_page.dart
│ ├── river
│ │ ├── river_page.dart
│ │ └── river_provider.dart
│ ├── saucenao
│ │ ├── sauce_notifier.dart
│ │ ├── sauce_store.dart
│ │ └── saucenao_page.dart
│ ├── search
│ │ ├── result
│ │ │ └── painter
│ │ │ │ └── search_result_painter_page.dart
│ │ ├── result_illust_list.dart
│ │ ├── result_illust_store.dart
│ │ ├── result_page.dart
│ │ ├── search_bar.dart
│ │ ├── search_page.dart
│ │ ├── suggest
│ │ │ ├── search_suggestion_page.dart
│ │ │ └── suggestion_store.dart
│ │ └── trend_tags_store.dart
│ ├── series
│ │ ├── illust_series_notifier.dart
│ │ └── illust_series_page.dart
│ ├── shield
│ │ ├── shield_page.dart
│ │ └── user_show_ai_setting.dart
│ ├── soup
│ │ ├── soup_page.dart
│ │ └── soup_store.dart
│ ├── splash
│ │ ├── splash_page.dart
│ │ └── splash_store.dart
│ ├── spotlight
│ │ └── spotlight_page.dart
│ ├── task
│ │ └── job_page.dart
│ ├── theme
│ │ └── theme_page.dart
│ ├── user
│ │ ├── bookmark
│ │ │ ├── bookmark_page.dart
│ │ │ └── tag
│ │ │ │ ├── bookmark_tag_store.dart
│ │ │ │ └── user_bookmark_tag_page.dart
│ │ ├── detail
│ │ │ └── user_detail.dart
│ │ ├── user_store.dart
│ │ ├── users_page.dart
│ │ └── works
│ │ │ └── works_page.dart
│ ├── vision
│ │ └── vision_page.dart
│ ├── watchlist
│ │ ├── watchlist.dart
│ │ └── watchlist_notifier.dart
│ ├── webview
│ │ ├── account_deletion_webview_page.dart
│ │ ├── saucenao_webview_page.dart
│ │ ├── simple_webview_page.dart
│ │ └── webview_page.dart
│ └── zoom
│ │ ├── photo_zoom_page.dart
│ │ └── zoom_page.dart
├── paths_plugin.dart
├── saf_plugin.dart
├── secure_plugin.dart
├── server
│ └── weiss_server.dart
├── single_instance_plugin.dart
├── store
│ ├── account_store.dart
│ ├── book_tag_store.dart
│ ├── fullscreen_store.dart
│ ├── mute_store.dart
│ ├── save_store.dart
│ ├── tag_history_store.dart
│ ├── top_store.dart
│ └── user_setting.dart
├── supportor_plugin.dart
├── utils.dart
├── weiss_plugin.dart
└── win32_plugin.dart
├── macos
├── .gitignore
├── Flutter
│ ├── Flutter-Debug.xcconfig
│ ├── Flutter-Release.xcconfig
│ └── GeneratedPluginRegistrant.swift
├── Podfile
├── Podfile.lock
├── 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
│ ├── DocumentPlugin.swift
│ ├── Info.plist
│ ├── MainFlutterWindow.swift
│ └── Release.entitlements
└── RunnerTests
│ └── RunnerTests.swift
├── ohos
├── .gitignore
├── AppScope
│ ├── app.json5
│ └── resources
│ │ └── base
│ │ ├── element
│ │ └── string.json
│ │ └── media
│ │ └── app_icon.png
├── build-profile.json5
├── entry
│ ├── .gitignore
│ ├── build-profile.json5
│ ├── hvigorfile.ts
│ ├── oh-package.json5
│ └── src
│ │ ├── main
│ │ ├── ets
│ │ │ ├── entryability
│ │ │ │ └── EntryAbility.ets
│ │ │ └── pages
│ │ │ │ └── Index.ets
│ │ ├── module.json5
│ │ └── resources
│ │ │ ├── base
│ │ │ ├── element
│ │ │ │ ├── color.json
│ │ │ │ └── string.json
│ │ │ ├── media
│ │ │ │ └── icon.png
│ │ │ └── profile
│ │ │ │ └── main_pages.json
│ │ │ ├── en_US
│ │ │ └── element
│ │ │ │ └── string.json
│ │ │ ├── ru_RU
│ │ │ └── element
│ │ │ │ └── string.json
│ │ │ └── zh_CN
│ │ │ └── element
│ │ │ └── string.json
│ │ └── ohosTest
│ │ ├── ets
│ │ ├── test
│ │ │ ├── Ability.test.ets
│ │ │ └── List.test.ets
│ │ ├── testability
│ │ │ ├── TestAbility.ets
│ │ │ └── pages
│ │ │ │ └── Index.ets
│ │ └── testrunner
│ │ │ └── OpenHarmonyTestRunner.ts
│ │ ├── module.json5
│ │ └── resources
│ │ └── base
│ │ ├── element
│ │ ├── color.json
│ │ └── string.json
│ │ ├── media
│ │ └── icon.png
│ │ └── profile
│ │ └── test_pages.json
├── hvigor
│ └── hvigor-config.json5
├── hvigorfile.ts
└── oh-package.json5
├── pubspec.lock
├── pubspec.yaml
├── res
└── values
│ ├── strings_en.arb
│ └── strings_zh_CN.arb
├── test
└── widget_test.dart
├── to_lower.dart
└── windows
├── .gitignore
├── CMakeLists.txt
├── deploy.dart
├── flutter
└── CMakeLists.txt
└── runner
├── CMakeLists.txt
├── Runner.rc
├── flutter_window.cpp
├── flutter_window.h
├── main.cpp
├── plugins
├── clipboard_plugin.cpp
├── clipboard_plugin.h
├── document_plugin.cpp
├── document_plugin.h
├── paths_plugin.cpp
├── paths_plugin.h
├── single_instance_plugin.cpp
├── single_instance_plugin.h
├── weiss_plugin.cpp
├── weiss_plugin.h
├── win32_plugin.cpp
└── win32_plugin.h
├── resource.h
├── resources
├── app_icon.ico
└── ic_launcher-msstore.png
├── runner.exe.manifest
├── settings.cpp
├── settings.h
├── utils.cpp
├── utils.h
├── win32_window.cpp
└── win32_window.h
/.fvmrc:
--------------------------------------------------------------------------------
1 | {
2 | "flutter": "3.29.3"
3 | }
--------------------------------------------------------------------------------
/.github/Not-Unlocked.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/.github/Not-Unlocked.jpg
--------------------------------------------------------------------------------
/.github/board/android.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "title": "公告板",
4 | "content": "这是一个公告板,用来发布一些重要的更新信息",
5 | "startDate": "1726982019000"
6 | },
7 | {
8 | "title": "Discord",
9 | "content": "加入Discord",
10 | "startDate": "1730623304801"
11 | },
12 | {
13 | "title": "421问题",
14 | "content": "需要更新到0.9.53以上, 421问题已经解决",
15 | "startDate": "1733296507000"
16 | }
17 | ]
--------------------------------------------------------------------------------
/.github/board/android_play.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/.github/board/ios.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/.github/preview/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/.github/preview/1.jpg
--------------------------------------------------------------------------------
/.github/preview/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/.github/preview/2.jpg
--------------------------------------------------------------------------------
/.github/workflows/build_ios.yml:
--------------------------------------------------------------------------------
1 | name: Build IOS
2 | on:
3 | workflow_dispatch: {}
4 | jobs:
5 | Build_IOS:
6 | runs-on: macos-latest
7 | steps:
8 | - uses: actions/checkout@v3
9 | - name: Setup Flutter
10 | uses: subosito/flutter-action@v2
11 | with:
12 | channel: 'master'
13 | - run: flutter --version
14 | - run: flutter pub get
15 | - run: flutter packages pub run build_runner build --delete-conflicting-outputs
16 | - run: flutter build ios --release --no-codesign
17 | - name: Create Payload directory and move Runner.app
18 | run: |
19 | mkdir -p build/ios/iphoneos/Payload
20 | mv build/ios/iphoneos/Runner.app build/ios/iphoneos/Payload
21 | - name: Change directory and zip Payload to create pixez-ios.ipa
22 | run: |
23 | cd build/ios/iphoneos/
24 | zip -r pixez-ios.ipa Payload
25 | - uses: actions/upload-artifact@v4
26 | with:
27 | name: pixez-ios.ipa
28 | path: build/ios/iphoneos/pixez-ios.ipa
29 |
--------------------------------------------------------------------------------
/.gradle/6.1.1/executionHistory/executionHistory.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/.gradle/6.1.1/executionHistory/executionHistory.lock
--------------------------------------------------------------------------------
/.gradle/6.1.1/fileChanges/last-build.bin:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gradle/6.1.1/fileHashes/fileHashes.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/.gradle/6.1.1/fileHashes/fileHashes.lock
--------------------------------------------------------------------------------
/.gradle/6.1.1/gc.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/.gradle/6.1.1/gc.properties
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/buildOutputCleanup.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/.gradle/buildOutputCleanup/buildOutputCleanup.lock
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/cache.properties:
--------------------------------------------------------------------------------
1 | #Sun Aug 01 19:43:54 CST 2021
2 | gradle.version=6.1.1
3 |
--------------------------------------------------------------------------------
/.gradle/checksums/checksums.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/.gradle/checksums/checksums.lock
--------------------------------------------------------------------------------
/.gradle/vcs-1/gc.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/.gradle/vcs-1/gc.properties
--------------------------------------------------------------------------------
/.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: "17025dd88227cd9532c33fa78f5250d548d87e9a"
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: 17025dd88227cd9532c33fa78f5250d548d87e9a
17 | base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
18 | - platform: android
19 | create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
20 | base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
21 | - platform: ios
22 | create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
23 | base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
24 | - platform: macos
25 | create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
26 | base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
27 | - platform: windows
28 | create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
29 | base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
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 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // 使用 IntelliSense 了解相关属性。
3 | // 悬停以查看现有属性的描述。
4 | // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.3.0",
6 | "configurations": [
7 | {
8 | "name": "Debug",
9 | "request": "launch",
10 | "type": "dart"
11 | },
12 | {
13 | "name": "Release",
14 | "request": "launch",
15 | "type": "dart",
16 | "flutterMode": "release"
17 | },
18 | {
19 | "name": "Profile",
20 | "request": "launch",
21 | "type": "dart",
22 | "flutterMode": "profile"
23 | },
24 | {
25 | "name": "(Windows) 附加",
26 | "type": "cppvsdbg",
27 | "request": "attach",
28 | "processId": "${command:pickProcess}"
29 | }
30 | ]
31 | }
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/analysis_options.yaml
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 | key.properties
9 | **/*.keystore
10 | **/*.jks
11 | .cxx/
12 | /app/.cxx/
13 | .kotlin/
--------------------------------------------------------------------------------
/android/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | android
4 | Project android created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.buildship.core.gradleprojectbuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.buildship.core.gradleprojectnature
16 |
17 |
18 |
19 | 1636252682327
20 |
21 | 30
22 |
23 | org.eclipse.core.resources.regexFilterMatcher
24 | node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/android/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | arguments=
2 | auto.sync=false
3 | build.scans.enabled=false
4 | connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
5 | connection.project.dir=
6 | eclipse.preferences.version=1
7 | gradle.user.home=
8 | java.home=C\:/Program Files/Microsoft/jdk-11.0.12.7-hotspot
9 | jvm.arguments=
10 | offline.mode=false
11 | override.workspace.settings=true
12 | show.console.view=true
13 | show.executions.view=true
14 |
--------------------------------------------------------------------------------
/android/app/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/android/app/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | app
4 | Project app created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.buildship.core.gradleprojectbuilder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javanature
21 | org.eclipse.buildship.core.gradleprojectnature
22 |
23 |
24 |
25 | 1636252682331
26 |
27 | 30
28 |
29 | org.eclipse.core.resources.regexFilterMatcher
30 | node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/android/app/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | connection.project.dir=..
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
19 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/android/app/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/perol/pixez/CardGlanceWidgetReceiver.kt:
--------------------------------------------------------------------------------
1 | //package com.perol.pixez
2 | //
3 | //import androidx.glance.appwidget.GlanceAppWidget
4 | //import androidx.glance.appwidget.GlanceAppWidgetReceiver
5 | //import com.perol.pixez.glance.ImageGlanceWidget
6 | //
7 | //class CardGlanceWidgetReceiver : GlanceAppWidgetReceiver() {
8 | // override val glanceAppWidget: GlanceAppWidget
9 | // get() = ImageGlanceWidget()
10 | //}
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/perol/pixez/CodeGen.kt:
--------------------------------------------------------------------------------
1 | package com.perol.pixez
2 |
3 | import android.util.Base64
4 | import java.security.MessageDigest
5 | import java.security.SecureRandom
6 |
7 | object CodeGen {
8 |
9 | fun getCodeVer(): String {
10 | val byteArray = ByteArray(32)
11 | SecureRandom().nextBytes(byteArray)
12 | return Base64.encodeToString(byteArray, Base64.URL_SAFE or Base64.NO_WRAP or Base64.NO_PADDING)
13 | }
14 |
15 | fun getCodeChallenge(code: String): String {
16 | val toByteArray = code.toByteArray(charset("US-ASCII"))
17 | val digest = MessageDigest.getInstance("SHA-256").apply { update(toByteArray) }.digest()
18 | return Base64.encodeToString(digest, Base64.URL_SAFE or Base64.NO_WRAP or Base64.NO_PADDING)
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/perol/pixez/PixEz.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020. by perol_notsf, All rights reserved
3 | *
4 | * This program is free software: you can redistribute it and/or modify it under
5 | * the terms of the GNU General Public License as published by the Free Software
6 | * Foundation, either version 3 of the License, or (at your option) any later version.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11 | *
12 | * You should have received a copy of the GNU General Public License along with
13 | * this program. If not, see .
14 | *
15 | */
16 |
17 | package com.perol.pixez
18 |
19 | import android.app.Application
20 | import coil3.ImageLoader
21 | import coil3.PlatformContext
22 | import coil3.SingletonImageLoader
23 | import coil3.request.crossfade
24 |
25 | class PixEz : Application(), SingletonImageLoader.Factory {
26 | override fun onCreate() {
27 | super.onCreate()
28 | CrashHandler.instance.init(applicationContext)
29 | }
30 |
31 | override fun newImageLoader(context: PlatformContext): ImageLoader {
32 | return ImageLoader.Builder(this)
33 | .crossfade(true)
34 | .build()
35 | }
36 | }
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/perol/pixez/glance/GlanceKtx.kt:
--------------------------------------------------------------------------------
1 | //package com.perol.pixez.glance
2 | //
3 | //import android.content.res.Resources
4 | //import android.os.Build
5 | //import androidx.annotation.StringRes
6 | //import androidx.compose.runtime.Composable
7 | //import androidx.compose.ui.unit.dp
8 | //import androidx.glance.GlanceModifier
9 | //import androidx.glance.LocalContext
10 | //import androidx.glance.appwidget.cornerRadius
11 | //
12 | //fun GlanceModifier.appWidgetBackgroundCornerRadius(): GlanceModifier {
13 | // if (Build.VERSION.SDK_INT >= 31) {
14 | // cornerRadius(android.R.dimen.system_app_widget_background_radius)
15 | // } else {
16 | // cornerRadius(16.dp)
17 | // }
18 | // return this
19 | //}
20 | //
21 | //fun GlanceModifier.appWidgetInnerCornerRadius(): GlanceModifier {
22 | // if (Build.VERSION.SDK_INT >= 31) {
23 | // cornerRadius(android.R.dimen.system_app_widget_inner_radius)
24 | // } else {
25 | // cornerRadius(8.dp)
26 | // }
27 | // return this
28 | //}
29 | //
30 | //@Composable
31 | //fun stringResource(@StringRes id: Int, vararg args: Any): String {
32 | // return LocalContext.current.getString(id, args)
33 | //}
34 | //
35 | //val Float.toPx get() = this * Resources.getSystem().displayMetrics.density
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/perol/pixez/plugin/CustomTab.kt:
--------------------------------------------------------------------------------
1 | package com.perol.pixez.plugin
2 |
3 | import android.content.Context
4 | import android.content.Intent
5 | import android.net.Uri
6 | import androidx.browser.customtabs.CustomTabsIntent
7 | import io.flutter.embedding.engine.FlutterEngine
8 | import io.flutter.plugin.common.MethodChannel
9 |
10 |
11 | object CustomTab {
12 | private const val TAG = "CustomTab"
13 | private const val CUSTOM_TAB_CHANNEL = "com.perol.dev/custom_tab"
14 |
15 | fun bindChannel(context: Context, flutterEngine: FlutterEngine) {
16 | MethodChannel(flutterEngine.dartExecutor.binaryMessenger, CUSTOM_TAB_CHANNEL)
17 | .setMethodCallHandler { call, result ->
18 | when (call.method) {
19 | "launch" -> {
20 | val url = call.argument("url")
21 | url?.let {
22 | context.launchUrl(it)
23 | }
24 | }
25 | }
26 | result.success(null)
27 | }
28 | }
29 |
30 | private fun Context.launchUrl(url: String) {
31 | try {
32 | val customTabsIntent = CustomTabsIntent.Builder();
33 | customTabsIntent.build().launchUrl(this, Uri.parse(url));
34 | } catch (e: Throwable) {
35 | val uri = Uri.parse(url)
36 | val intent = Intent(Intent.ACTION_VIEW, uri)
37 | startActivity(intent)
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/perol/pixez/plugin/OpenSettinger.kt:
--------------------------------------------------------------------------------
1 | package com.perol.pixez.plugin
2 |
3 | import android.app.Activity
4 | import android.content.Intent
5 | import android.os.Build
6 | import io.flutter.embedding.engine.FlutterEngine
7 | import io.flutter.plugin.common.MethodChannel
8 |
9 | object OpenSettinger {
10 | private const val OPEN_CHANNEL = "com.perol.dev/open"
11 |
12 | fun bindChannel(flutterEngine: FlutterEngine,activity:Activity) {
13 | MethodChannel(flutterEngine.dartExecutor.binaryMessenger, OPEN_CHANNEL).setMethodCallHandler { call, result ->
14 | when (call.method) {
15 | "open" -> {
16 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
17 | try {
18 | val intent = Intent().apply {
19 | action =
20 | android.provider.Settings.ACTION_APP_OPEN_BY_DEFAULT_SETTINGS
21 | addCategory(Intent.CATEGORY_DEFAULT)
22 | data = android.net.Uri.parse("package:${activity.packageName}")
23 | addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY)
24 | addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS)
25 | }
26 | activity.startActivity(intent)
27 | } catch (ignored:Throwable) {
28 | }
29 | }
30 | }
31 | }
32 | result.success(null)
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/perol/pixez/plugin/SecurePlugin.kt:
--------------------------------------------------------------------------------
1 | package com.perol.pixez.plugin
2 |
3 | import android.app.Activity
4 | import android.os.Build
5 | import android.view.WindowManager.LayoutParams
6 | import io.flutter.embedding.engine.FlutterEngine
7 | import io.flutter.plugin.common.MethodChannel
8 |
9 | class SecurePlugin(val activity: Activity) {
10 | private val CHANNEL = "com.perol.dev/secure"
11 |
12 | fun bindChannel(flutterEngine: FlutterEngine) {
13 | MethodChannel(
14 | flutterEngine.dartExecutor.binaryMessenger,
15 | CHANNEL
16 | ).setMethodCallHandler { call, result ->
17 | when (call.method) {
18 | "configSecureWindow" -> {
19 | val secure = call.argument("value")!!
20 | if (secure) {
21 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
22 | activity.setRecentsScreenshotEnabled(false)
23 | }
24 | activity.window?.addFlags(LayoutParams.FLAG_SECURE)
25 | } else {
26 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
27 | activity.setRecentsScreenshotEnabled(true)
28 | }
29 | activity.window?.clearFlags(LayoutParams.FLAG_SECURE)
30 | }
31 | result.success(null)
32 | }
33 | }
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-anydpi-v24/ic_stat_name.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-hdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/drawable-hdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-hdpi/splash_forground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/drawable-hdpi/splash_forground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/drawable-mdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-mdpi/splash_forground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/drawable-mdpi/splash_forground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-night/launch_background.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | -
23 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-nodpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/drawable-nodpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xhdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/drawable-xhdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xhdpi/splash_forground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/drawable-xhdpi/splash_forground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxhdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/drawable-xxhdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxhdpi/splash_forground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/drawable-xxhdpi/splash_forground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxxhdpi/ic_stat_name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/drawable-xxxhdpi/ic_stat_name.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-xxxhdpi/splash_forground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/drawable-xxxhdpi/splash_forground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/bg_widget_card.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_baseline_folder_open_24.xml:
--------------------------------------------------------------------------------
1 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/ic_baseline_refresh.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | -
23 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/widget_gradient.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/res/layout/activity_webview.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
15 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/layout/card_app_widget.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
12 |
13 |
19 |
20 |
26 |
27 |
--------------------------------------------------------------------------------
/android/app/src/main/res/menu/menu_webview.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values-ru-rRU/strings.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 | Путь сохранения
19 | Выберите соответствующую папку загрузки изображений.
20 | Не удалось получить разрешение. Некоторые функции могут не работать или приложение может завершиться аварийно!
21 | Шифрование завершено.
22 | Выбранный каталог включает в себя каталог загрузки, что может привести к ошибкам хранения. Пожалуйста, выберите папку заново!
23 | Полная иллюстрация.
24 | Иллюстрация с названием.
25 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values-v14/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 | 0dp
9 |
10 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values-zh-rCN/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | save path
20 | 选择合适的图片保存目录授权
21 | 未正确取得授权,可能会导致部分功能失效或闪退
22 | 合成成功
23 | 授权目录包含download(下载)目录,可能会导致保存出错,请重新选择保存目录授权
24 | 充满内容的插画widget
25 | 带标题的插画widget
26 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values-zh-rTW/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | 儲存路徑
20 | 選擇合適的資料夾並授權以儲存圖像
21 | 未正確取得授權,可能造成軟體功能異常或崩潰
22 | 合成成功
23 | 授權的資料夾包含下載目錄,可能會造成儲存失敗,請選擇其他資料夾作為儲存目錄
24 | 充滿內容的插畫widget
25 | 帶標題的插畫widget
26 |
27 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #1895ef
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 | 8dp
9 |
10 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 | Save path
19 | Select the appropriate image download directory
20 | Failed to get authorization. Some functions may fail or the application may crash!
21 | Encoded successfully
22 | Selected directory includes the download directory, which may lead to storage errors. Please re-select the directory!
23 | Full illust
24 | Illust with title
25 |
--------------------------------------------------------------------------------
/android/app/src/main/res/xml/card_app_widget_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/android/app/src/main/res/xml/file_provider_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/android/app/src/main/res/xml/illust_app_widget_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
19 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/android/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020. by perol_notsf, All rights reserved
3 | *
4 | * This program is free software: you can redistribute it and/or modify it under
5 | * the terms of the GNU General Public License as published by the Free Software
6 | * Foundation, either version 3 of the License, or (at your option) any later version.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11 | *
12 | * You should have received a copy of the GNU General Public License along with
13 | * this program. If not, see .
14 | *
15 | */
16 |
17 | allprojects {
18 | repositories {
19 | google()
20 | mavenCentral()
21 | }
22 | }
23 |
24 | val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get()
25 | rootProject.layout.buildDirectory.value(newBuildDir)
26 |
27 | subprojects {
28 | val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
29 | project.layout.buildDirectory.value(newSubprojectBuildDir)
30 | }
31 | subprojects {
32 | project.evaluationDependsOn(":app")
33 | }
34 |
35 | tasks.register("clean") {
36 | delete(rootProject.layout.buildDirectory)
37 | }
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2020. by perol_notsf, All rights reserved
3 | #
4 | # This program is free software: you can redistribute it and/or modify it under
5 | # the terms of the GNU General Public License as published by the Free Software
6 | # Foundation, either version 3 of the License, or (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 | # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11 | #
12 | # You should have received a copy of the GNU General Public License along with
13 | # this program. If not, see .
14 | #
15 | #
16 |
17 | org.gradle.jvmargs=-Xmx4608m
18 | android.useAndroidX=true
19 | android.enableJetifier=true
20 |
21 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Feb 12 16:17:44 CST 2025
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
5 | zipStoreBase=GRADLE_USER_HOME
6 | zipStorePath=wrapper/dists
7 |
--------------------------------------------------------------------------------
/android/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020. by perol_notsf, All rights reserved
3 | *
4 | * This program is free software: you can redistribute it and/or modify it under
5 | * the terms of the GNU General Public License as published by the Free Software
6 | * Foundation, either version 3 of the License, or (at your option) any later version.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11 | *
12 | * You should have received a copy of the GNU General Public License along with
13 | * this program. If not, see .
14 | *
15 | */
16 | pluginManagement {
17 | val flutterSdkPath = run {
18 | val properties = java.util.Properties()
19 | file("local.properties").inputStream().use { properties.load(it) }
20 | val flutterSdkPath = properties.getProperty("flutter.sdk")
21 | require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
22 | flutterSdkPath
23 | }
24 |
25 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
26 |
27 | repositories {
28 | google()
29 | mavenCentral()
30 | gradlePluginPortal()
31 | }
32 | }
33 |
34 | plugins {
35 | id("dev.flutter.flutter-plugin-loader") version "1.0.0"
36 | id("com.android.application") version "8.7.0" apply false
37 | id("org.jetbrains.kotlin.android") version "2.1.0" apply false
38 | }
39 |
40 | include(":app")
--------------------------------------------------------------------------------
/android/weiss/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | weiss
4 | Project weiss created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.buildship.core.gradleprojectbuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.buildship.core.gradleprojectnature
16 |
17 |
18 |
19 | 1636252682378
20 |
21 | 30
22 |
23 | org.eclipse.core.resources.regexFilterMatcher
24 | node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/android/weiss/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | connection.project.dir=..
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/android/weiss/build.gradle:
--------------------------------------------------------------------------------
1 | configurations.maybeCreate("default")
2 | artifacts.add("default", file('weiss.aar'))
--------------------------------------------------------------------------------
/android/weiss/weiss.aar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/android/weiss/weiss.aar
--------------------------------------------------------------------------------
/assets/emojis/101.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/101.png
--------------------------------------------------------------------------------
/assets/emojis/102.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/102.png
--------------------------------------------------------------------------------
/assets/emojis/103.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/103.png
--------------------------------------------------------------------------------
/assets/emojis/104.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/104.png
--------------------------------------------------------------------------------
/assets/emojis/105.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/105.png
--------------------------------------------------------------------------------
/assets/emojis/106.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/106.png
--------------------------------------------------------------------------------
/assets/emojis/107.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/107.png
--------------------------------------------------------------------------------
/assets/emojis/108.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/108.png
--------------------------------------------------------------------------------
/assets/emojis/201.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/201.png
--------------------------------------------------------------------------------
/assets/emojis/202.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/202.png
--------------------------------------------------------------------------------
/assets/emojis/203.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/203.png
--------------------------------------------------------------------------------
/assets/emojis/204.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/204.png
--------------------------------------------------------------------------------
/assets/emojis/205.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/205.png
--------------------------------------------------------------------------------
/assets/emojis/206.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/206.png
--------------------------------------------------------------------------------
/assets/emojis/207.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/207.png
--------------------------------------------------------------------------------
/assets/emojis/208.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/208.png
--------------------------------------------------------------------------------
/assets/emojis/209.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/209.png
--------------------------------------------------------------------------------
/assets/emojis/301.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/301.png
--------------------------------------------------------------------------------
/assets/emojis/302.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/302.png
--------------------------------------------------------------------------------
/assets/emojis/303.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/303.png
--------------------------------------------------------------------------------
/assets/emojis/304.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/304.png
--------------------------------------------------------------------------------
/assets/emojis/305.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/305.png
--------------------------------------------------------------------------------
/assets/emojis/306.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/306.png
--------------------------------------------------------------------------------
/assets/emojis/307.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/307.png
--------------------------------------------------------------------------------
/assets/emojis/308.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/308.png
--------------------------------------------------------------------------------
/assets/emojis/309.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/309.png
--------------------------------------------------------------------------------
/assets/emojis/310.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/310.png
--------------------------------------------------------------------------------
/assets/emojis/401.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/401.png
--------------------------------------------------------------------------------
/assets/emojis/402.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/402.png
--------------------------------------------------------------------------------
/assets/emojis/403.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/403.png
--------------------------------------------------------------------------------
/assets/emojis/404.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/404.png
--------------------------------------------------------------------------------
/assets/emojis/405.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/405.png
--------------------------------------------------------------------------------
/assets/emojis/406.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/406.png
--------------------------------------------------------------------------------
/assets/emojis/407.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/407.png
--------------------------------------------------------------------------------
/assets/emojis/408.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/408.png
--------------------------------------------------------------------------------
/assets/emojis/501.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/501.png
--------------------------------------------------------------------------------
/assets/emojis/502.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/502.png
--------------------------------------------------------------------------------
/assets/emojis/503.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/emojis/503.png
--------------------------------------------------------------------------------
/assets/fonts/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/fonts/iconfont.ttf
--------------------------------------------------------------------------------
/assets/images/fish.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/images/fish.gif
--------------------------------------------------------------------------------
/assets/images/h_long.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/images/h_long.jpg
--------------------------------------------------------------------------------
/assets/images/ic_front.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/images/ic_front.png
--------------------------------------------------------------------------------
/assets/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/images/icon.png
--------------------------------------------------------------------------------
/assets/images/liz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/images/liz.png
--------------------------------------------------------------------------------
/assets/images/me.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/images/me.jpg
--------------------------------------------------------------------------------
/assets/images/nine.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/images/nine.jpg
--------------------------------------------------------------------------------
/assets/images/open_by_default_hint.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/images/open_by_default_hint.png
--------------------------------------------------------------------------------
/assets/images/right_now.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/images/right_now.jpg
--------------------------------------------------------------------------------
/assets/images/step1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/images/step1.png
--------------------------------------------------------------------------------
/assets/images/step2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/images/step2.png
--------------------------------------------------------------------------------
/assets/images/weixin_qr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/assets/images/weixin_qr.png
--------------------------------------------------------------------------------
/assets/json/host.json:
--------------------------------------------------------------------------------
1 | {
2 | "app-api.pixiv.net": "210.140.139.155",
3 | "oauth.secure.pixiv.net": "210.140.139.155",
4 | "i.pximg.net": "210.140.139.133",
5 | "s.pximg.net": "210.140.139.133",
6 | "doh": "doh.dns.sb"
7 | }
--------------------------------------------------------------------------------
/assets/json/recent_message.json:
--------------------------------------------------------------------------------
1 | {
2 | "ios":{
3 | "content": ""
4 | },
5 | "android":{
6 | "content": ""
7 | }
8 | }
--------------------------------------------------------------------------------
/comment_emoji2map.py:
--------------------------------------------------------------------------------
1 | from bs4 import BeautifulSoup
2 | import urllib.request
3 | import re
4 | soup = BeautifulSoup(open("comment_element.html"))
5 | d = {}
6 | for tag in soup.find_all(["button","emoji-mart-emoji"]):
7 | s = tag.find("span")["style"]
8 | pattern = re.compile(r'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+')
9 | k = tag['aria-label']
10 | url = re.findall(pattern,s)[0]
11 | print(k)
12 | print(url.split("/")[-1])
13 | # urllib.request.urlretrieve(url, "./emojis/" + url.split("/")[-1]) //下载逻辑
14 | d[k] = url.split("/")[-1]
15 | print(d)
--------------------------------------------------------------------------------
/devtools_options.yaml:
--------------------------------------------------------------------------------
1 | extensions:
2 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Jan 23 16:31:19 CST 2021
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/ios/Flutter/.last_build_id:
--------------------------------------------------------------------------------
1 | ac0d1235b970334be29d74adb5e842aa
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
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 | 12.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Flutter/ephemeral/flutter_lldb_helper.py:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | import lldb
6 |
7 | def handle_new_rx_page(frame: lldb.SBFrame, bp_loc, extra_args, intern_dict):
8 | """Intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGES and touch the pages."""
9 | base = frame.register["x0"].GetValueAsAddress()
10 | page_len = frame.register["x1"].GetValueAsUnsigned()
11 |
12 | # Note: NOTIFY_DEBUGGER_ABOUT_RX_PAGES will check contents of the
13 | # first page to see if handled it correctly. This makes diagnosing
14 | # misconfiguration (e.g. missing breakpoint) easier.
15 | data = bytearray(page_len)
16 | data[0:8] = b'IHELPED!'
17 |
18 | error = lldb.SBError()
19 | frame.GetThread().GetProcess().WriteMemory(base, data, error)
20 | if not error.Success():
21 | print(f'Failed to write into {base}[+{page_len}]', error)
22 | return
23 |
24 | def __lldb_init_module(debugger: lldb.SBDebugger, _):
25 | target = debugger.GetDummyTarget()
26 | # Caveat: must use BreakpointCreateByRegEx here and not
27 | # BreakpointCreateByName. For some reasons callback function does not
28 | # get carried over from dummy target for the later.
29 | bp = target.BreakpointCreateByRegex("^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$")
30 | bp.SetScriptCallbackFunction('{}.handle_new_rx_page'.format(__name__))
31 | bp.SetAutoContinue(True)
32 | print("-- LLDB integration loaded --")
33 |
--------------------------------------------------------------------------------
/ios/Flutter/ephemeral/flutter_lldbinit:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | command script import --relative-to-command-file flutter_lldb_helper.py
6 |
--------------------------------------------------------------------------------
/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/project.xcworkspace/xcshareddata/swiftpm/Package.resolved:
--------------------------------------------------------------------------------
1 | {
2 | "originHash" : "edf512815619ed6bb2e67b3bdb38a134d5e8f6b3f3f79c05028ab9cbffc0efd2",
3 | "pins" : [
4 | {
5 | "identity" : "fmdb",
6 | "kind" : "remoteSourceControl",
7 | "location" : "https://github.com/ccgus/fmdb",
8 | "state" : {
9 | "revision" : "1227a3fa2b9916bfd75fe380eb45cd210e69e251",
10 | "version" : "2.7.12"
11 | }
12 | }
13 | ],
14 | "version" : 3
15 | }
16 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/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.xcworkspace/xcshareddata/swiftpm/Package.resolved:
--------------------------------------------------------------------------------
1 | {
2 | "originHash" : "edf512815619ed6bb2e67b3bdb38a134d5e8f6b3f3f79c05028ab9cbffc0efd2",
3 | "pins" : [
4 | {
5 | "identity" : "fmdb",
6 | "kind" : "remoteSourceControl",
7 | "location" : "https://github.com/ccgus/fmdb",
8 | "state" : {
9 | "revision" : "1227a3fa2b9916bfd75fe380eb45cd210e69e251",
10 | "version" : "2.7.12"
11 | }
12 | }
13 | ],
14 | "version" : 3
15 | }
16 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "icon-1024 1.png",
5 | "idiom" : "universal",
6 | "platform" : "ios",
7 | "size" : "1024x1024"
8 | },
9 | {
10 | "appearances" : [
11 | {
12 | "appearance" : "luminosity",
13 | "value" : "dark"
14 | }
15 | ],
16 | "filename" : "icon-1024.png",
17 | "idiom" : "universal",
18 | "platform" : "ios",
19 | "size" : "1024x1024"
20 | },
21 | {
22 | "appearances" : [
23 | {
24 | "appearance" : "luminosity",
25 | "value" : "tinted"
26 | }
27 | ],
28 | "filename" : "icon-1024 2.png",
29 | "idiom" : "universal",
30 | "platform" : "ios",
31 | "size" : "1024x1024"
32 | }
33 | ],
34 | "info" : {
35 | "author" : "xcode",
36 | "version" : 1
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-1024 1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-1024 1.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-1024 2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-1024 2.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-1024.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/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/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/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/CodeGen.swift:
--------------------------------------------------------------------------------
1 | import CommonCrypto
2 | import Foundation
3 |
4 | private let codeVerifierKey: String = "com.bravedefault.codeVerifier"
5 |
6 | extension String {
7 | func sha256()->Data {
8 | guard let data = self.data(using: .utf8) else {
9 | fatalError("data initialize is failed")
10 | }
11 | var hash = [UInt8](repeating: 0, count: Int(CC_SHA256_DIGEST_LENGTH))
12 | data.withUnsafeBytes {
13 | _ = CC_SHA256($0, CC_LONG(data.count), &hash)
14 | }
15 | return Data(bytes: hash)
16 | }
17 | }
18 |
19 | public class CodeGen {
20 | /// code verifier 是一个长度位43到128位的随机字符串
21 | /// - Parameter length: pixiv的长度是43,因此默认长度是43
22 | public static func getCodeVer(_ length:Int = 43)->String {
23 | let base = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
24 | var randomString:String = ""
25 |
26 | for _ in 0..String {
35 | return "not need"
36 | }
37 |
38 | public static func updateCodeVerifier(codeVerifier: String) {
39 | let userDefault = UserDefaults.standard
40 | userDefault.setValue(codeVerifier, forKey: codeVerifierKey)
41 | }
42 |
43 | public static func getLocalCodeVerifier()->String? {
44 | return UserDefaults.standard.string(forKey: codeVerifierKey)
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/ios/Runner/Runner.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.application-groups
6 |
7 | group.pixez
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ios/Runner/es.lproj/LaunchScreen.strings:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/ios/Runner/es.lproj/Main.strings:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/ios/Runner/ja.lproj/LaunchScreen.strings:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/ios/Runner/ja.lproj/Main.strings:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/ios/Runner/ko.lproj/LaunchScreen.strings:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/ios/Runner/ko.lproj/Main.strings:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/ios/Runner/ru.lproj/LaunchScreen.strings:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/ios/Runner/ru.lproj/Main.strings:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/ios/Runner/zh-Hans.lproj/LaunchScreen.strings:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/ios/Runner/zh-Hans.lproj/Main.strings:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/ios/Runner/zh-Hant.lproj/LaunchScreen.strings:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/ios/Runner/zh-Hant.lproj/Main.strings:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/ios/Tinker/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/ios/Tinker/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/ios/Tinker/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/ios/Tinker/Assets.xcassets/WidgetBackground.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/ios/Tinker/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | NSExtension
6 |
7 | NSExtensionPointIdentifier
8 | com.apple.widgetkit-extension
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ios/Tinker/TinkerBundle.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TinkerBundle.swift
3 | // Tinker
4 | //
5 | // Created by Perol Notsf on 2024/7/8.
6 | //
7 |
8 | import WidgetKit
9 | import SwiftUI
10 |
11 | @main
12 | struct TinkerBundle: WidgetBundle {
13 | var body: some Widget {
14 | Tinker()
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ios/TinkerExtension.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.application-groups
6 |
7 | group.pixez
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ios/build/.last_build_id:
--------------------------------------------------------------------------------
1 | 56933ddeaf2baa15fe5cda170027aee8
--------------------------------------------------------------------------------
/l10n.yaml:
--------------------------------------------------------------------------------
1 | synthetic-package: false
2 | arb-dir: lib/l10n
3 | template-arb-file: intl_en_US.arb
4 | output-localization-file: app_localizations.dart
5 | output-dir: lib/src/generated/i18n
--------------------------------------------------------------------------------
/lib/component/anim_expand.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class AnimExpand extends StatefulWidget {
4 | final bool expand;
5 | final Widget child;
6 |
7 | const AnimExpand({Key? key, required this.expand, required this.child})
8 | : super(key: key);
9 |
10 | @override
11 | _AnimExpandState createState() => _AnimExpandState();
12 | }
13 |
14 | class _AnimExpandState extends State {
15 | bool _expand = false;
16 |
17 | @override
18 | void initState() {
19 | _expand = widget.expand;
20 | super.initState();
21 | }
22 |
23 | @override
24 | void didUpdateWidget(covariant AnimExpand oldWidget) {
25 | super.didUpdateWidget(oldWidget);
26 | if (oldWidget.expand != widget.expand)
27 | setState(() {
28 | _expand = widget.expand;
29 | });
30 | }
31 |
32 | @override
33 | Widget build(BuildContext context) {
34 | return AnimatedCrossFade(
35 | duration: const Duration(milliseconds: 200),
36 | firstChild: Container(
37 | height: 100,
38 | child: widget.child,
39 | ),
40 | secondChild: Container(
41 | child: widget.child,
42 | ),
43 | crossFadeState:
44 | _expand ? CrossFadeState.showSecond : CrossFadeState.showFirst,
45 | );
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/lib/component/common_back_area.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:pixez/er/leader.dart';
3 |
4 | class CommonBackArea extends StatefulWidget {
5 | const CommonBackArea({super.key});
6 |
7 | @override
8 | State createState() => _CommonBackAreaState();
9 | }
10 |
11 | class _CommonBackAreaState extends State {
12 | bool _isLongPress = false;
13 | @override
14 | Widget build(BuildContext context) {
15 | return GestureDetector(
16 | child: IconButton(
17 | icon: _isLongPress ? Icon(Icons.home) : BackButtonIcon(),
18 | onPressed: () {
19 | Navigator.pop(context);
20 | },
21 | ),
22 | onLongPress: () {
23 | setState(() {
24 | _isLongPress = true;
25 | });
26 | Leader.popUtilHome(context);
27 | },
28 | );
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/component/empty_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class EmptyPage extends StatefulWidget {
4 | @override
5 | _EmptyPageState createState() => _EmptyPageState();
6 | }
7 |
8 | class _EmptyPageState extends State {
9 | @override
10 | Widget build(BuildContext context) {
11 | return Container(
12 | child: Column(
13 | mainAxisSize: MainAxisSize.max,
14 | mainAxisAlignment: MainAxisAlignment.center,
15 | crossAxisAlignment: CrossAxisAlignment.center,
16 | children: [
17 | Container(
18 | height: 90,
19 | ),
20 | Padding(
21 | padding: const EdgeInsets.all(8.0),
22 | child:
23 | Text('[ ]', style: Theme.of(context).textTheme.headlineMedium),
24 | ),
25 | Padding(
26 | padding: const EdgeInsets.symmetric(horizontal: 8.0),
27 | child: Text('Empty'),
28 | ),
29 | ],
30 | ),
31 | );
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/lib/component/fail_face.dart:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020. by perol_notsf, All rights reserved
3 | *
4 | * This program is free software: you can redistribute it and/or modify it under
5 | * the terms of the GNU General Public License as published by the Free Software
6 | * Foundation, either version 3 of the License, or (at your option) any later version.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11 | *
12 | * You should have received a copy of the GNU General Public License along with
13 | * this program. If not, see .
14 | *
15 | */
16 |
17 | import 'package:flutter/material.dart';
18 |
19 | class FailFace extends StatefulWidget {
20 | @override
21 | _FailFaceState createState() => _FailFaceState();
22 | }
23 |
24 | class _FailFaceState extends State {
25 | @override
26 | Widget build(BuildContext context) {
27 | return Container(
28 | child: Center(child: Text("QAQ"),),
29 | );
30 | }
31 | }
--------------------------------------------------------------------------------
/lib/component/new_version_chip.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class NewVersionChip extends StatelessWidget {
4 | @override
5 | Widget build(BuildContext context) {
6 | return Container(
7 | child: Text(
8 | "New",
9 | style: TextStyle(color: Colors.white, fontSize: 12.0),
10 | ),
11 | padding: EdgeInsets.symmetric(horizontal: 4.0, vertical: 2),
12 | decoration: BoxDecoration(
13 | color: Colors.red,
14 | borderRadius: BorderRadius.all(Radius.circular(24.0))),
15 | );
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/lib/component/null_hero.dart:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020. by perol_notsf, All rights reserved
3 | *
4 | * This program is free software: you can redistribute it and/or modify it under
5 | * the terms of the GNU General Public License as published by the Free Software
6 | * Foundation, either version 3 of the License, or (at your option) any later version.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11 | *
12 | * You should have received a copy of the GNU General Public License along with
13 | * this program. If not, see .
14 | */
15 |
16 | import 'package:flutter/widgets.dart';
17 |
18 | class NullHero extends StatelessWidget {
19 | final String? tag;
20 | final Widget child;
21 |
22 | const NullHero({Key? key, this.tag, required this.child}) : super(key: key);
23 |
24 | @override
25 | Widget build(BuildContext context) {
26 | return tag == null
27 | ? child
28 | : Hero(
29 | tag: tag!,
30 | child: child,
31 | );
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/lib/component/pixez_default_header.dart:
--------------------------------------------------------------------------------
1 | import 'package:easy_refresh/easy_refresh.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:pixez/i18n.dart';
4 |
5 | class PixezDefault {
6 | static Header header(BuildContext context,
7 | {IndicatorPosition position = IndicatorPosition.above,
8 | bool safeArea = true}) {
9 | return MaterialHeader(
10 | position: position,
11 | safeArea: safeArea,
12 | backgroundColor: Theme.of(context).scaffoldBackgroundColor);
13 | }
14 |
15 | static Footer footer(BuildContext context,
16 | {IndicatorPosition position = IndicatorPosition.above}) {
17 | return ClassicFooter(
18 | position: position,
19 | processingText: I18n.of(context).footer_loading,
20 | failedText: I18n.of(context).failed,
21 | noMoreText: I18n.of(context).no_more,
22 | showMessage: false,
23 | processedText: I18n.of(context).successed);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/lib/component/sort_group.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class SortGroup extends StatefulWidget {
4 | final List children;
5 | final Function onChange;
6 | final int initIndex;
7 |
8 | const SortGroup(
9 | {Key? key,
10 | required this.children,
11 | required this.onChange,
12 | this.initIndex = 0})
13 | : super(key: key);
14 |
15 | @override
16 | _SortGroupState createState() => _SortGroupState();
17 | }
18 |
19 | class _SortGroupState extends State {
20 | int index = 0;
21 |
22 | @override
23 | void initState() {
24 | this.index = widget.initIndex;
25 | super.initState();
26 | }
27 |
28 | @override
29 | Widget build(BuildContext context) {
30 | return SegmentedButton(
31 | style: ButtonStyle(backgroundColor:
32 | WidgetStateProperty.resolveWith((Set states) {
33 | if (states.contains(WidgetState.disabled)) {
34 | return null;
35 | }
36 | if (states.contains(WidgetState.selected)) {
37 | return Theme.of(context).colorScheme.secondaryContainer;
38 | }
39 | return Theme.of(context).colorScheme.surface;
40 | })),
41 | segments: [
42 | for (var (index, i) in widget.children.indexed)
43 | ButtonSegment(value: index, label: Text(i)),
44 | ],
45 | selected: {this.index},
46 | onSelectionChanged: (p0) {
47 | widget.onChange(p0.first);
48 | if (mounted)
49 | setState(() {
50 | this.index = p0.first;
51 | });
52 | },
53 | );
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/lib/component/staggered_illust.dart:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020. by perol_notsf, All rights reserved
3 | *
4 | * This program is free software: you can redistribute it and/or modify it under
5 | * the terms of the GNU General Public License as published by the Free Software
6 | * Foundation, either version 3 of the License, or (at your option) any later version.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11 | *
12 | * You should have received a copy of the GNU General Public License along with
13 | * this program. If not, see .
14 | *
15 | */
16 |
17 |
--------------------------------------------------------------------------------
/lib/constants.dart:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020. by perol_notsf, All rights reserved
3 | *
4 | * This program is free software: you can redistribute it and/or modify it under
5 | * the terms of the GNU General Public License as published by the Free Software
6 | * Foundation, either version 3 of the License, or (at your option) any later version.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11 | *
12 | * You should have received a copy of the GNU General Public License along with
13 | * this program. If not, see .
14 | *
15 | */
16 |
17 | import 'dart:io';
18 |
19 | class Constants {
20 | static const String no_h = 'assets/images/h_long.jpg';
21 | static String tagName = "0.9.72";
22 | static const isGooglePlay =
23 | bool.fromEnvironment("IS_GOOGLEPLAY", defaultValue: false);
24 | static int type = 0;
25 | static String? code_verifier = null;
26 |
27 | /// 为true表示使用FluentUI 否则为false,不应作为Desktop的判断
28 | static final bool isFluent = Platform.isWindows;
29 | }
30 |
--------------------------------------------------------------------------------
/lib/custom_icon.dart:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020. by perol_notsf, All rights reserved
3 | *
4 | * This program is free software: you can redistribute it and/or modify it under
5 | * the terms of the GNU General Public License as published by the Free Software
6 | * Foundation, either version 3 of the License, or (at your option) any later version.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11 | *
12 | * You should have received a copy of the GNU General Public License along with
13 | * this program. If not, see .
14 | */
15 |
16 | import 'package:flutter/cupertino.dart';
17 |
18 | class CustomIcons {
19 | static const IconData leaderboard =
20 | IconData(0xe800, fontFamily: "iconfont");
21 | }
22 |
--------------------------------------------------------------------------------
/lib/custom_tab_plugin.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:flutter/services.dart';
4 | import 'package:url_launcher/url_launcher_string.dart';
5 |
6 | class CustomTabPlugin {
7 | static const platform = const MethodChannel('com.perol.dev/custom_tab');
8 |
9 | static Future launch(String url) async {
10 | if (Platform.isAndroid)
11 | return await platform.invokeMethod("launch", {'url': url});
12 | else
13 | await launchUrlString(url);
14 | return null;
15 | }
16 | }
--------------------------------------------------------------------------------
/lib/deep_link_plugin.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:flutter/services.dart';
4 |
5 | class DeepLinkPlugin {
6 | static const MethodChannel _mChannel = MethodChannel('deep_links/messages');
7 | static const EventChannel _eChannel = EventChannel('deep_links/events');
8 |
9 | static Future getInitialLink() =>
10 | _mChannel.invokeMethod('getInitialLink');
11 |
12 | static Future getLatestLink() =>
13 | _mChannel.invokeMethod('getLatestLink');
14 |
15 | static Future getInitialUri() async {
16 | final link = await getInitialLink();
17 | if (link == null) return null;
18 | return Uri.parse(link);
19 | }
20 |
21 | static Stream get linkStream => _eChannel
22 | .receiveBroadcastStream()
23 | .map((dynamic link) => link as String?);
24 |
25 | static late final uriLinkStream = linkStream.transform(
26 | StreamTransformer.fromHandlers(
27 | handleData: (String? link, EventSink sink) {
28 | if (link == null) {
29 | sink.add(null);
30 | } else {
31 | sink.add(Uri.parse(link));
32 | }
33 | },
34 | ),
35 | );
36 |
37 | @Deprecated('Use [linkStream]')
38 | Stream getLinksStream() => linkStream;
39 |
40 | @Deprecated('Use [uriLinkStream]')
41 | Stream getUriLinksStream() => uriLinkStream;
42 | }
43 |
--------------------------------------------------------------------------------
/lib/er/prefer.dart:
--------------------------------------------------------------------------------
1 | import 'package:shared_preferences/shared_preferences.dart';
2 |
3 | class Prefer {
4 | static SharedPreferences? _prefs;
5 |
6 | static Future init() async {
7 | if (_prefs == null) {
8 | _prefs = await SharedPreferences.getInstance();
9 | }
10 | }
11 |
12 | static String? getString(String key) {
13 | return _prefs?.getString(key);
14 | }
15 |
16 | static Future setString(String key, String value) async {
17 | await _prefs?.setString(key, value);
18 | }
19 |
20 | static Future setInt(String key, int value) async {
21 | await _prefs?.setInt(key, value);
22 | }
23 |
24 | static int? getInt(String key) {
25 | return _prefs?.getInt(key);
26 | }
27 |
28 | static Future setBool(String key, bool value) async {
29 | await _prefs?.setBool(key, value);
30 | }
31 |
32 | static bool? getBool(String key) {
33 | return _prefs?.getBool(key);
34 | }
35 |
36 | static Future getInstance() async {
37 | if (_prefs == null) {
38 | _prefs = await SharedPreferences.getInstance();
39 | }
40 | return _prefs!;
41 | }
42 |
43 | static List? getStringList(String key) {
44 | return _prefs?.getStringList(key);
45 | }
46 |
47 | static Future setStringList(String key, List value) async {
48 | await _prefs?.setStringList(key, value);
49 | }
50 |
51 | static Future remove(String key) async {
52 | await _prefs?.remove(key);
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/lib/er/sharer.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 | import 'dart:typed_data';
3 |
4 | import 'package:flutter/widgets.dart';
5 | import 'package:path_provider/path_provider.dart';
6 | import 'package:path/path.dart' as p;
7 | import 'package:share_plus/share_plus.dart';
8 |
9 | class Sharer {
10 | static Future exportUint8List(
11 | BuildContext context, Uint8List uint8List, String fileName) async {
12 | final tempDir = await getTemporaryDirectory();
13 | final file = File(p.join(tempDir.path, fileName));
14 | await file.writeAsBytes(uint8List);
15 | final box = context.findRenderObject() as RenderBox?;
16 | Rect? rect;
17 | if (box != null) {
18 | rect = box.localToGlobal(Offset.zero) & box.size;
19 | }
20 | Share.shareXFiles([XFile(file.path)], sharePositionOrigin: rect);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/er/toaster.dart:
--------------------------------------------------------------------------------
1 | import 'package:bot_toast/bot_toast.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class Toaster {
5 | static downloadOk(String text) {
6 | BotToast.showCustomText(
7 | onlyOne: true,
8 | duration: Duration(seconds: 1),
9 | toastBuilder: (textCancel) => Align(
10 | alignment: Alignment(0, 0.8),
11 | child: Card(
12 | child: Row(
13 | mainAxisSize: MainAxisSize.min,
14 | children: [
15 | Padding(
16 | padding: EdgeInsets.symmetric(horizontal: 8.0),
17 | child: Icon(
18 | Icons.check_circle,
19 | color: Colors.green,
20 | ),
21 | ),
22 | Padding(
23 | padding: const EdgeInsets.symmetric(
24 | horizontal: 8.0, vertical: 8.0),
25 | child: Text(text),
26 | )
27 | ],
28 | ),
29 | ),
30 | ));
31 | }
32 |
33 | static showText(String text) {}
34 | }
35 |
--------------------------------------------------------------------------------
/lib/er/updater.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/dio.dart';
2 | import 'package:flutter/foundation.dart';
3 | import 'package:pixez/constants.dart';
4 | import 'package:pixez/er/lprinter.dart';
5 |
6 | enum Result { yes, no, timeout }
7 |
8 | class Updater {
9 | static Result result = Result.timeout;
10 |
11 | static Future check() async {
12 | if (Constants.isGooglePlay) return Result.no;
13 | final result = await compute(checkUpdate, "");
14 | Updater.result = result;
15 | return result;
16 | }
17 | }
18 |
19 | Future checkUpdate(String arg) async {
20 | LPrinter.d("check for update ============");
21 | try {
22 | Response response =
23 | await Dio(BaseOptions(baseUrl: 'https://api.github.com'))
24 | .get('/repos/Notsfsssf/pixez-flutter/releases/latest');
25 | String tagName = response.data['tag_name'];
26 | LPrinter.d("tagName:$tagName ");
27 | if (tagName != Constants.tagName) {
28 | List remoteList = tagName.split(".");
29 | List localList = Constants.tagName.split(".");
30 | LPrinter.d("r:$remoteList l$localList");
31 | if (remoteList.length != localList.length) return Result.yes;
32 | for (var i = 0; i < remoteList.length; i++) {
33 | int r = int.tryParse(remoteList[i]) ?? 0;
34 | int l = int.tryParse(localList[i]) ?? 0;
35 | LPrinter.d("r:$r l$l");
36 | if (r > l) return Result.yes;
37 | }
38 | }
39 | } catch (e) {
40 | print(e);
41 | return Result.timeout;
42 | }
43 | return Result.no;
44 | }
45 |
--------------------------------------------------------------------------------
/lib/fluent/component/context_menu.dart:
--------------------------------------------------------------------------------
1 | import 'package:fluent_ui/fluent_ui.dart';
2 |
3 | class ContextMenu extends StatefulWidget {
4 | final Widget child;
5 | final List items;
6 |
7 | ContextMenu({super.key, required this.child, required this.items});
8 |
9 | @override
10 | State createState() => _ContextMenuState();
11 | }
12 |
13 | class _ContextMenuState extends State {
14 | final _key = GlobalKey();
15 | final _controller = FlyoutController();
16 | @override
17 | Widget build(BuildContext context) => FlyoutTarget(
18 | key: _key,
19 | controller: _controller,
20 | child: GestureDetector(
21 | child: widget.child,
22 | onSecondaryTapUp: (details) {
23 | _controller.showFlyout(
24 | position: _getPosition(context, details.localPosition),
25 | builder: (context) => MenuFlyout(items: widget.items),
26 | );
27 | },
28 | ),
29 | );
30 |
31 | Offset? _getPosition(
32 | BuildContext context,
33 | Offset localPosition,
34 | ) {
35 | // This calculates the position of the flyout according to the parent navigator
36 | final box = context.findRenderObject() as RenderBox;
37 | return box.localToGlobal(
38 | localPosition,
39 | ancestor: Navigator.of(context).context.findRenderObject(),
40 | );
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/lib/fluent/component/focus_wrap.dart:
--------------------------------------------------------------------------------
1 | import 'package:fluent_ui/fluent_ui.dart';
2 |
3 | class FocusWrap extends StatefulWidget {
4 | final Widget child;
5 | final void Function() onInvoke;
6 | final bool? renderOutside;
7 |
8 | FocusWrap(
9 | {super.key,
10 | required this.child,
11 | required this.onInvoke,
12 | this.renderOutside});
13 |
14 | @override
15 | State createState() => _FocusWrapState();
16 | }
17 |
18 | class _FocusWrapState extends State {
19 | bool _shouldShowFocus = false;
20 | @override
21 | Widget build(BuildContext context) => Padding(
22 | padding: widget.renderOutside != null
23 | ? EdgeInsets.zero
24 | : const EdgeInsets.all(2.0),
25 | child: FocusableActionDetector(
26 | child: FocusBorder(
27 | child: widget.child,
28 | focused: _shouldShowFocus,
29 | renderOutside: widget.renderOutside,
30 | ),
31 | onShowFocusHighlight: (v) {
32 | if (mounted) setState(() => _shouldShowFocus = v);
33 | },
34 | actions: {
35 | ActivateIntent: CallbackAction(
36 | onInvoke: (intent) => widget.onInvoke(),
37 | ),
38 | },
39 | ),
40 | );
41 | }
42 |
--------------------------------------------------------------------------------
/lib/fluent/component/new_version_chip.dart:
--------------------------------------------------------------------------------
1 |
2 | import 'package:fluent_ui/fluent_ui.dart';
3 |
4 | class NewVersionChip extends StatelessWidget {
5 | @override
6 | Widget build(BuildContext context) {
7 | return Container(
8 | child: Text(
9 | "New",
10 | style: TextStyle(color: Colors.white, fontSize: 12.0),
11 | ),
12 | padding: EdgeInsets.symmetric(horizontal: 4.0, vertical: 2),
13 | decoration: BoxDecoration(
14 | color: Colors.red,
15 | borderRadius: BorderRadius.all(Radius.circular(24.0))),
16 | );
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/lib/fluent/component/pixez_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:fluent_ui/fluent_ui.dart';
2 |
3 | class PixEzButton extends StatelessWidget {
4 | final Widget child;
5 | final void Function() onPressed;
6 | final bool noPadding;
7 |
8 | const PixEzButton({
9 | super.key,
10 | required this.child,
11 | required this.onPressed,
12 | this.noPadding = false,
13 | });
14 |
15 | @override
16 | Widget build(BuildContext context) => Padding(
17 | padding: noPadding ? EdgeInsets.zero : const EdgeInsets.all(4.0),
18 | child: ButtonTheme(
19 | data: ButtonThemeData(
20 | iconButtonStyle: ButtonStyle(
21 | padding: WidgetStateProperty.all(EdgeInsets.zero),
22 | ),
23 | ),
24 | child: IconButton(
25 | icon: ClipRRect(
26 | borderRadius: const BorderRadius.all(const Radius.circular(4.0)),
27 | child: child,
28 | ),
29 | onPressed: onPressed,
30 | ),
31 | ),
32 | );
33 | }
34 |
--------------------------------------------------------------------------------
/lib/fluent/component/sort_group.dart:
--------------------------------------------------------------------------------
1 | import 'package:fluent_ui/fluent_ui.dart';
2 |
3 | class SortGroup extends StatefulWidget {
4 | final List children;
5 | final Function onChange;
6 |
7 | const SortGroup({Key? key, required this.children, required this.onChange})
8 | : super(key: key);
9 |
10 | @override
11 | _SortGroupState createState() => _SortGroupState();
12 | }
13 |
14 | class _SortGroupState extends State {
15 | int index = 0;
16 |
17 | @override
18 | void initState() {
19 | super.initState();
20 | }
21 |
22 | @override
23 | Widget build(BuildContext context) {
24 | return Wrap(
25 | spacing: 8,
26 | children: [for (var i in widget.children) _buildChild(i)],
27 | );
28 | }
29 |
30 | Widget _buildChild(String i) {
31 | final text = Text(
32 | i,
33 | style: TextStyle(
34 | color: index == widget.children.indexOf(i)
35 | ? Colors.white
36 | : FluentTheme.of(context).typography.body!.color),
37 | );
38 | final onPressed = () {
39 | int ii = widget.children.indexOf(i);
40 | widget.onChange(ii);
41 | if (mounted)
42 | setState(() {
43 | this.index = ii;
44 | });
45 | };
46 | if (index == widget.children.indexOf(i))
47 | return ToggleButton(
48 | checked: true,
49 | child: text,
50 | onChanged: (v) => onPressed(),
51 | );
52 | else
53 | return ToggleButton(
54 | checked: false,
55 | child: text,
56 | onChanged: (v) => onPressed(),
57 | );
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/lib/fluent/page/about/thanks_list.dart:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020. by perol_notsf, All rights reserved
3 | *
4 | * This program is free software: you can redistribute it and/or modify it under
5 | * the terms of the GNU General Public License as published by the Free Software
6 | * Foundation, either version 3 of the License, or (at your option) any later version.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11 | *
12 | * You should have received a copy of the GNU General Public License along with
13 | * this program. If not, see .
14 | *
15 | */
16 |
17 | import 'package:fluent_ui/fluent_ui.dart';
18 | import 'package:pixez/page/about/thanks_peoples.dart';
19 |
20 | class ThanksList extends StatelessWidget {
21 |
22 | @override
23 | Widget build(BuildContext context) {
24 | return ListView(
25 | children: [
26 | ListTile(
27 | title: Text(
28 | ' 一路做到现在的flutter版也过了好久了,虽然多次下架,版本包名甚至名称多次变更,但是在这些时间里,我得到了很多人的帮助,支持与鼓励,积累了许多开发经验还有社会教训,还能够有机会与想法出色、技术出众、审美出彩的用户、开发者、设计师交流,还可以顺便安利自己喜欢的歌曲,真是太棒了,非常感谢你们的支持:'),
29 | ),
30 | Divider(),
31 | ...peoples.map((e) => ListTile(
32 | title: Text(e),
33 | )),
34 | ],
35 | );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/lib/fluent/page/hello/setting/app_cache_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:fluent_ui/fluent_ui.dart';
2 | import 'package:pixez/i18n.dart';
3 |
4 | class AppCachePage extends StatefulWidget {
5 | @override
6 | _AppCachePageState createState() => _AppCachePageState();
7 | }
8 |
9 | class _AppCachePageState extends State {
10 | @override
11 | Widget build(BuildContext context) {
12 | return ScaffoldPage(
13 | header: PageHeader(
14 | title: Text('App Cache'),
15 | ),
16 | content: ListView(
17 | children: [
18 | ListTile(
19 | title: Text(I18n.of(context).clear_all_cache),
20 | ),
21 | ],
22 | ),
23 | );
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/lib/fluent/page/picture/save_effect_trailing.dart:
--------------------------------------------------------------------------------
1 | import 'package:fluent_ui/fluent_ui.dart';
2 | import 'package:flutter_mobx/flutter_mobx.dart';
3 | import 'package:pixez/i18n.dart';
4 | import 'package:pixez/main.dart';
5 |
6 | class SaveEffectTrailing extends StatelessWidget {
7 | const SaveEffectTrailing({Key? key}) : super(key: key);
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return Observer(builder: (_) {
12 | return ToggleSwitch(
13 | content: Text(I18n.of(context).save_effect),
14 | checked: userSetting.saveEffectEnable,
15 | onChanged: (bool value) {
16 | userSetting.saveEffectEnable = value;
17 | },
18 | );
19 | });
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/lib/fluent/page/search/result/painter/search_result_painter_page.dart:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020. by perol_notsf, All rights reserved
3 | *
4 | * This program is free software: you can redistribute it and/or modify it under
5 | * the terms of the GNU General Public License as published by the Free Software
6 | * Foundation, either version 3 of the License, or (at your option) any later version.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11 | *
12 | * You should have received a copy of the GNU General Public License along with
13 | * this program. If not, see .
14 | *
15 | */
16 |
17 | import 'package:fluent_ui/fluent_ui.dart';
18 | import 'package:pixez/network/api_client.dart';
19 | import 'package:pixez/fluent/page/painter/painter_list.dart';
20 |
21 | class SearchResultPainterPage extends StatefulWidget {
22 | final String word;
23 |
24 | SearchResultPainterPage({Key? key, required this.word}) : super(key: key);
25 |
26 | @override
27 | _SearchResultPainterPageState createState() =>
28 | _SearchResultPainterPageState();
29 | }
30 |
31 | class _SearchResultPainterPageState extends State {
32 | @override
33 | Widget build(BuildContext context) {
34 | return PainterList(
35 | futureGet: () => apiClient.getSearchUser(widget.word),
36 | );
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/lib/fluent/page/vision/vision_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:fluent_ui/fluent_ui.dart';
2 |
3 | class VisionPage extends StatefulWidget {
4 | const VisionPage({Key? key}) : super(key: key);
5 |
6 | @override
7 | _VisionPageState createState() => _VisionPageState();
8 | }
9 |
10 | class _VisionPageState extends State {
11 | @override
12 | Widget build(BuildContext context) {
13 | return ScaffoldPage();
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/lib/fluent/page/webview/account_deletion_webview_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:fluent_ui/fluent_ui.dart';
2 | import 'package:pixez/i18n.dart';
3 |
4 | class AccountDeletionPage extends StatefulWidget {
5 | const AccountDeletionPage({Key? key}) : super(key: key);
6 |
7 | @override
8 | State createState() => _AccountDeletionPageState();
9 | }
10 |
11 | class _AccountDeletionPageState extends State {
12 | @override
13 | Widget build(BuildContext context) {
14 | return ScaffoldPage(
15 | header: PageHeader(title: Text(I18n.of(context).account_deletion)),
16 | content: Text('Not Support')
17 | // InAppWebView(
18 | // initialUrlRequest:
19 | // URLRequest(url: Uri.parse("https://www.pixiv.net/leave_pixiv.php")),
20 | // initialOptions: InAppWebViewGroupOptions(
21 | // crossPlatform: InAppWebViewOptions(
22 | // useShouldOverrideUrlLoading: true,
23 | // ),
24 | // android: AndroidInAppWebViewOptions(
25 | // useHybridComposition: true,
26 | // )),
27 | // ),
28 | );
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/generated_plugin_registrant.dart:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // ignore_for_file: lines_longer_than_80_chars
6 |
7 | import 'package:shared_preferences_web/shared_preferences_web.dart';
8 | import 'package:url_launcher_web/url_launcher_web.dart';
9 |
10 | import 'package:flutter_web_plugins/flutter_web_plugins.dart';
11 |
12 | // ignore: public_member_api_docs
13 | void registerPlugins(Registrar registrar) {
14 | SharedPreferencesPlugin.registerWith(registrar);
15 | UrlLauncherPlugin.registerWith(registrar);
16 | registrar.registerMessageHandler();
17 | }
18 |
--------------------------------------------------------------------------------
/lib/i18n.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/widgets.dart';
2 | import 'package:pixez/src/generated/i18n/app_localizations.dart';
3 |
4 | class I18n {
5 | static List supportedLocales = AppLocalizations.supportedLocales;
6 |
7 | static AppLocalizations of(BuildContext context) {
8 | return AppLocalizations.of(context)!;
9 | }
10 |
11 | static AppLocalizations ofContext() {
12 | return AppLocalizations.of(context!)!;
13 | }
14 |
15 | static BuildContext? context;
16 | }
17 |
--------------------------------------------------------------------------------
/lib/js_eval_plugin.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:flutter/services.dart';
4 | import 'package:pixez/models/illust.dart';
5 |
6 | class JSEvalPlugin {
7 | static const platform = const MethodChannel('com.perol.dev/eval');
8 |
9 | static Future eval(
10 | Illusts illusts, String func, int part, String memType) async {
11 | final result = await platform.invokeMethod("eval", {
12 | 'json': jsonEncode(illusts.toJson()),
13 | 'func': func,
14 | 'part': part,
15 | 'mime': memType
16 | });
17 | if (result != null) {
18 | return result;
19 | }
20 | return null;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/models/amwork.dart:
--------------------------------------------------------------------------------
1 | class AmWork {
2 | String? title;
3 | String? user;
4 | String? arworkLink;
5 | String? userLink;
6 | String? userImage;
7 | String? showImage;
8 | }
--------------------------------------------------------------------------------
/lib/models/board_info.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 | import 'dart:io';
3 |
4 | import 'package:dio/dio.dart';
5 | import 'package:flutter/foundation.dart';
6 | import 'package:json_annotation/json_annotation.dart';
7 | import 'package:pixez/constants.dart';
8 |
9 | part 'board_info.g.dart';
10 |
11 | @JsonSerializable()
12 | class BoardInfo {
13 | BoardInfo({
14 | required this.title,
15 | required this.content,
16 | required this.startDate,
17 | required this.endDate,
18 | });
19 |
20 | String title;
21 | String content;
22 | String startDate;
23 | String? endDate;
24 |
25 | factory BoardInfo.fromJson(Map json) =>
26 | _$BoardInfoFromJson(json);
27 | Map toJson() => _$BoardInfoToJson(this);
28 |
29 | static bool boardDataLoaded = false;
30 |
31 | static List boardList = [];
32 |
33 | static String path() {
34 | if (kDebugMode) {
35 | return "android.json";
36 | }
37 | if (Platform.isAndroid) {
38 | if (Constants.isGooglePlay) {
39 | return "android_play.json";
40 | }
41 | return "android.json";
42 | } else if (Platform.isIOS) {
43 | return "ios.json";
44 | }
45 | return "";
46 | }
47 |
48 | static Future> load() async {
49 | print(path());
50 | final request = await Dio().get(
51 | 'https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/refs/heads/master/.github/board/${path()}');
52 | final list = (jsonDecode(request.data) as List)
53 | .map((e) => BoardInfo.fromJson(e))
54 | .toList();
55 | boardList = list;
56 | return list;
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/lib/models/error_message.dart:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020. by perol_notsf, All rights reserved
3 | *
4 | * This program is free software: you can redistribute it and/or modify it under
5 | * the terms of the GNU General Public License as published by the Free Software
6 | * Foundation, either version 3 of the License, or (at your option) any later version.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11 | *
12 | * You should have received a copy of the GNU General Public License along with
13 | * this program. If not, see .
14 | *
15 | */
16 | import 'package:json_annotation/json_annotation.dart';
17 | part 'error_message.g.dart';
18 |
19 | @JsonSerializable()
20 | class ErrorMessage {
21 | Error error;
22 |
23 | ErrorMessage({
24 | required this.error,
25 | });
26 |
27 | factory ErrorMessage.fromJson(Map json) =>
28 | _$ErrorMessageFromJson(json);
29 |
30 | Map toJson() => _$ErrorMessageToJson(this);
31 | }
32 |
33 | @JsonSerializable()
34 | class Error {
35 | String? user_message;
36 | String? message;
37 | String? reason;
38 | Object? user_message_details;
39 |
40 | Error({
41 | required this.user_message,
42 | required this.message,
43 | required this.reason,
44 | this.user_message_details,
45 | });
46 |
47 | factory Error.fromJson(Map json) => _$ErrorFromJson(json);
48 |
49 | Map toJson() => _$ErrorToJson(this);
50 | }
51 |
--------------------------------------------------------------------------------
/lib/models/export_tag_history_data.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 | import 'package:pixez/models/tags.dart';
3 |
4 | part 'export_tag_history_data.g.dart';
5 |
6 | @JsonSerializable()
7 | class ExportData {
8 | List? tagHisotry;
9 | List? bookTags;
10 |
11 | ExportData({this.tagHisotry, this.bookTags});
12 |
13 | factory ExportData.fromJson(Map json) =>
14 | _$ExportDataFromJson(json);
15 |
16 | Map toJson() => _$ExportDataToJson(this);
17 | }
18 |
--------------------------------------------------------------------------------
/lib/models/follow_detail.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 |
3 | part 'follow_detail.g.dart';
4 |
5 | @JsonSerializable()
6 | class FollowDetail {
7 | @JsonKey(name: 'is_followed')
8 | final bool isFollowed;
9 | @JsonKey(name: 'restrict')
10 | final String restrict;
11 |
12 | FollowDetail({required this.isFollowed, required this.restrict});
13 |
14 | factory FollowDetail.fromJson(Map json) =>
15 | _$FollowDetailFromJson(json);
16 |
17 | Map toJson() => _$FollowDetailToJson(this);
18 | }
19 |
--------------------------------------------------------------------------------
/lib/models/ranking.dart:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020. by perol_notsf, All rights reserved
3 | *
4 | * This program is free software: you can redistribute it and/or modify it under
5 | * the terms of the GNU General Public License as published by the Free Software
6 | * Foundation, either version 3 of the License, or (at your option) any later version.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11 | *
12 | * You should have received a copy of the GNU General Public License along with
13 | * this program. If not, see .
14 | *
15 | */
16 |
17 |
--------------------------------------------------------------------------------
/lib/models/show_ai_response.dart:
--------------------------------------------------------------------------------
1 | import 'package:json_annotation/json_annotation.dart';
2 |
3 | part 'show_ai_response.g.dart';
4 |
5 | @JsonSerializable()
6 | class ShowAIResponse {
7 | @JsonKey(name: 'show_ai')
8 | bool showAI;
9 |
10 | ShowAIResponse({
11 | required this.showAI,
12 | });
13 |
14 | factory ShowAIResponse.fromJson(Map json) =>
15 | _$ShowAIResponseFromJson(json);
16 |
17 | Map toJson() => _$ShowAIResponseToJson(this);
18 | }
19 |
--------------------------------------------------------------------------------
/lib/open_setting_plugin.dart:
--------------------------------------------------------------------------------
1 |
2 | import 'package:flutter/services.dart';
3 |
4 | class OpenSettingPlugin {
5 | static const platform = const MethodChannel('com.perol.dev/open');
6 |
7 | //ACTION_APP_OPEN_BY_DEFAULT_SETTINGS
8 | static Future open() async {
9 | platform.invokeMethod("open");
10 | }
11 | }
--------------------------------------------------------------------------------
/lib/page/about/thanks_list.dart:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020. by perol_notsf, All rights reserved
3 | *
4 | * This program is free software: you can redistribute it and/or modify it under
5 | * the terms of the GNU General Public License as published by the Free Software
6 | * Foundation, either version 3 of the License, or (at your option) any later version.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11 | *
12 | * You should have received a copy of the GNU General Public License along with
13 | * this program. If not, see .
14 | *
15 | */
16 |
17 | import 'package:flutter/material.dart';
18 | import 'package:pixez/page/about/thanks_peoples.dart';
19 |
20 | class ThanksList extends StatelessWidget {
21 | @override
22 | Widget build(BuildContext context) {
23 | return ListView(
24 | children: [
25 | ListTile(
26 | title: Text(
27 | ' 一路做到现在的flutter版也过了好久了,虽然多次下架,版本包名甚至名称多次变更,但是在这些时间里,我得到了很多人的帮助,支持与鼓励,积累了许多开发经验还有社会教训,还能够有机会与想法出色、技术出众、审美出彩的用户、开发者、设计师交流,还可以顺便安利自己喜欢的歌曲,真是太棒了,非常感谢你们的支持:'),
28 | ),
29 | Divider(),
30 | ...peoples.map((e) => ListTile(
31 | title: Text(e),
32 | )),
33 | ],
34 | );
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/lib/page/account/edit/account_edit_store.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/dio.dart';
2 | import 'package:mobx/mobx.dart';
3 | import 'package:pixez/network/account_client.dart';
4 | part 'account_edit_store.g.dart';
5 |
6 | class AccountEditStore = _AccountEditStoreBase with _$AccountEditStore;
7 |
8 | abstract class _AccountEditStoreBase with Store {
9 | @observable
10 | String? errorString;
11 |
12 | @action
13 | Future fetch(String newMailAddress, newPassword, oldPassword, newUserAccount) async {
14 | try {
15 | final client = AccountClient();
16 | var response = await client.accountEdit(
17 | newMailAddress: newMailAddress,
18 | newPassword: newPassword,
19 | currentPassword: oldPassword,
20 | newUserAccount: newUserAccount);
21 | print(response.data);
22 | return true;
23 | } catch (e) {
24 | if (e is DioException) {
25 | try {
26 | var a = e.response!.data['body']['validation_errors'].toString();
27 | errorString = a;
28 | } catch (e) {
29 | errorString = e.toString();
30 | }
31 | } else {
32 | errorString = e.toString();
33 | }
34 | return false;
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/lib/page/hello/ranking/ranking_mode/rank_mode_store.dart:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020. by perol_notsf, All rights reserved
3 | *
4 | * This program is free software: you can redistribute it and/or modify it under
5 | * the terms of the GNU General Public License as published by the Free Software
6 | * Foundation, either version 3 of the License, or (at your option) any later version.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11 | *
12 | * You should have received a copy of the GNU General Public License along with
13 | * this program. If not, see .
14 | *
15 | */
16 |
17 | import 'package:mobx/mobx.dart';
18 | import 'package:pixez/models/illust.dart';
19 | import 'package:pixez/models/recommend.dart';
20 | import 'package:pixez/network/api_client.dart';
21 |
22 | part 'rank_mode_store.g.dart';
23 |
24 | class RankModeStore = _RankModeStoreBase with _$RankModeStore;
25 |
26 | abstract class _RankModeStoreBase with Store {
27 | final ApiClient client;
28 | final String mode, date;
29 | _RankModeStoreBase(this.mode, this.date, this.client);
30 |
31 | @observable
32 | ObservableList illusts =ObservableList();
33 | @action
34 | Future start() async {
35 | try {
36 | final response = await client.getIllustRanking(mode, date);
37 | Recommend recommend = Recommend.fromJson(response.data);
38 | illusts.addAll(recommend.illusts);
39 | } catch (e) {
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/lib/page/hello/setting/app_cache_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:pixez/i18n.dart';
3 |
4 | class AppCachePage extends StatefulWidget {
5 | @override
6 | _AppCachePageState createState() => _AppCachePageState();
7 | }
8 |
9 | class _AppCachePageState extends State {
10 | @override
11 | Widget build(BuildContext context) {
12 | return Scaffold(
13 | appBar: AppBar(
14 | title: Text('App Cache'),
15 | ),
16 | body: ListView(
17 | children: [
18 | ListTile(
19 | title: Text(I18n.of(context).clear_all_cache),
20 | ),
21 | ],
22 | ),
23 | );
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/lib/page/hello/setting/export_page.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 | import 'dart:typed_data';
3 |
4 | import 'package:bot_toast/bot_toast.dart';
5 | import 'package:flutter/material.dart';
6 | import 'package:pixez/document_plugin.dart';
7 | import 'package:pixez/main.dart';
8 | import 'package:pixez/models/tags.dart';
9 |
10 | class ExportPage extends StatefulWidget {
11 | const ExportPage({super.key});
12 |
13 | @override
14 | State createState() => _ExportPageState();
15 | }
16 |
17 | class _ExportPageState extends State {
18 | @override
19 | Widget build(BuildContext context) {
20 | return Scaffold(
21 | appBar: AppBar(),
22 | body: ListView(children: [
23 | ListTile(
24 | title: Text("Export tag history"),
25 | onTap: () {
26 | final tags = tagHistoryStore.tags;
27 | List tagsPersist = tags.toList();
28 | String json = jsonEncode(tagsPersist);
29 | final data = Uint8List.fromList(json.codeUnits);
30 | DocumentPlugin.openSave(data, "export_tag_history.json");
31 | },
32 | ),
33 | ListTile(
34 | title: Text("Import tag history"),
35 | onTap: () async {
36 | Uint8List uint8list = Uint8List(10);
37 | String json = String.fromCharCodes(uint8list);
38 | List tagsPersist = jsonDecode(json);
39 | for (var element in tagsPersist) {
40 | await tagHistoryStore.insert(element);
41 | }
42 | BotToast.showText(text: "Ok");
43 | },
44 | ),
45 | ]),
46 | );
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/lib/page/network/network_setting_store.dart:
--------------------------------------------------------------------------------
1 | import 'package:mobx/mobx.dart';
2 | part 'network_setting_store.g.dart';
3 |
4 | class NetworkSettingStore = _NetworkSettingStoreBase with _$NetworkSettingStore;
5 |
6 | abstract class _NetworkSettingStoreBase with Store {
7 |
8 | }
--------------------------------------------------------------------------------
/lib/page/novel/novel_page.dart:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020. by perol_notsf, All rights reserved
3 | *
4 | * This program is free software: you can redistribute it and/or modify it under
5 | * the terms of the GNU General Public License as published by the Free Software
6 | * Foundation, either version 3 of the License, or (at your option) any later version.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11 | *
12 | * You should have received a copy of the GNU General Public License along with
13 | * this program. If not, see .
14 | *
15 | */
16 |
17 | import 'package:flutter/material.dart';
18 | import 'package:pixez/page/novel/recom/novel_recom_page.dart';
19 |
20 | class NovelPage extends StatefulWidget {
21 | @override
22 | _NovelPageState createState() => _NovelPageState();
23 | }
24 |
25 | class _NovelPageState extends State {
26 | @override
27 | Widget build(BuildContext context) {
28 | return Scaffold(
29 | appBar: AppBar(),
30 | body: Container(
31 | child: NovelRecomPage(),
32 | ),
33 | );
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/lib/page/novel/rank/novel_rank_mode.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class NovelRankModePage extends StatefulWidget {
4 | @override
5 | _NovelRankModePageState createState() => _NovelRankModePageState();
6 | }
7 |
8 | class _NovelRankModePageState extends State {
9 | @override
10 | Widget build(BuildContext context) {
11 | return Container(
12 |
13 | );
14 | }
15 | }
--------------------------------------------------------------------------------
/lib/page/novel/viewer/novel_web_viewer.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/dio.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter_inappwebview/flutter_inappwebview.dart';
4 | import 'package:pixez/network/api_client.dart';
5 |
6 | class NovelWebViewer extends StatefulWidget {
7 | final int novelId;
8 | const NovelWebViewer({super.key, required this.novelId});
9 |
10 | @override
11 | State createState() => _NovelWebViewerState();
12 | }
13 |
14 | class _NovelWebViewerState extends State {
15 | String? initNovelHtml;
16 | @override
17 | void initState() {
18 | super.initState();
19 | _fetchData();
20 | }
21 |
22 | _fetchData() async {
23 | try {
24 | Response response = await apiClient.webviewNovel(widget.novelId);
25 | if (mounted) {
26 | setState(() {
27 | initNovelHtml = response.data;
28 | });
29 | }
30 | } catch (e) {}
31 | }
32 |
33 | @override
34 | Widget build(BuildContext context) {
35 | return Scaffold(
36 | appBar: AppBar(),
37 | body: initNovelHtml != null ? _buildWebView(context) : Container());
38 | }
39 |
40 | Widget _buildWebView(BuildContext context) {
41 | return InAppWebView(
42 | initialData: InAppWebViewInitialData(data: initNovelHtml ?? ""),
43 | );
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/lib/page/novel/work/novel_work_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:pixez/network/api_client.dart';
3 | import 'package:pixez/page/novel/component/novel_lighting_list.dart';
4 |
5 | class NovelWorkPage extends StatefulWidget {
6 | final int id;
7 |
8 | const NovelWorkPage({Key? key, required this.id}) : super(key: key);
9 |
10 | @override
11 | _NovelWorkPageState createState() => _NovelWorkPageState();
12 | }
13 |
14 | class _NovelWorkPageState extends State {
15 | @override
16 | Widget build(BuildContext context) {
17 | return Container(
18 | child: NovelLightingList(
19 | futureGet: () => apiClient.getUserNovels(widget.id),
20 | ),
21 | );
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/page/picture/save_effect_trailing.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_mobx/flutter_mobx.dart';
3 | import 'package:pixez/i18n.dart';
4 | import 'package:pixez/main.dart';
5 |
6 | class SaveEffectTrailing extends StatelessWidget {
7 | const SaveEffectTrailing({Key? key}) : super(key: key);
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return Observer(builder: (_) {
12 | return FilterChip(
13 | label: Text(I18n.of(context).save_effect),
14 | selected: userSetting.saveEffectEnable,
15 | onSelected: (bool value) {
16 | userSetting.saveEffectEnable = value;
17 | },
18 | );
19 | });
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/lib/page/river/river_provider.dart:
--------------------------------------------------------------------------------
1 | import 'package:hooks_riverpod/hooks_riverpod.dart';
2 | import 'package:pixez/main.dart';
3 | import 'package:pixez/models/illust.dart';
4 | import 'package:pixez/models/recommend.dart';
5 | import 'package:pixez/network/api_client.dart';
6 |
7 | class IllustListState {
8 | final List illusts;
9 | final int? offset;
10 |
11 | IllustListState(this.illusts, this.offset);
12 | }
13 |
14 | class IllustListNotifier extends StateNotifier {
15 | final Ref ref;
16 | IllustListNotifier(this.ref) : super(IllustListState([], null));
17 |
18 | fetch({int offset = 0}) async {
19 | try {
20 | final response = await apiClient.getBookmarksIllustsOffset(
21 | int.parse(accountStore.now!.userId),
22 | "public",
23 | null,
24 | offset < 30 ? null : offset);
25 | Recommend recommend = Recommend.fromJson(response.data);
26 | final nextCursor = recommend.illusts.length < 30
27 | ? null
28 | : (offset += recommend.illusts.length);
29 | state = IllustListState(recommend.illusts, nextCursor);
30 | } catch (e) {}
31 | }
32 |
33 | next() async {
34 | try {
35 | if (state.offset == null) return;
36 | final response = await apiClient.getBookmarksIllustsOffset(
37 | int.parse(accountStore.now!.userId), "public", null, state.offset);
38 | Recommend recommend = Recommend.fromJson(response.data);
39 | final illusts = [...state.illusts, ...recommend.illusts];
40 | final nextCursor = recommend.illusts.length < 30 ? null : illusts.length;
41 | state = IllustListState(illusts, nextCursor);
42 | } catch (e) {}
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/lib/page/search/result/painter/search_result_painter_page.dart:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020. by perol_notsf, All rights reserved
3 | *
4 | * This program is free software: you can redistribute it and/or modify it under
5 | * the terms of the GNU General Public License as published by the Free Software
6 | * Foundation, either version 3 of the License, or (at your option) any later version.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11 | *
12 | * You should have received a copy of the GNU General Public License along with
13 | * this program. If not, see .
14 | *
15 | */
16 |
17 | import 'package:flutter/material.dart';
18 | import 'package:pixez/network/api_client.dart';
19 | import 'package:pixez/page/painter/painter_list.dart';
20 |
21 | class SearchResultPainterPage extends StatefulWidget {
22 | final String word;
23 |
24 | SearchResultPainterPage({Key? key,required this.word}) : super(key: key);
25 |
26 | @override
27 | _SearchResultPainterPageState createState() =>
28 | _SearchResultPainterPageState();
29 | }
30 |
31 | class _SearchResultPainterPageState extends State {
32 |
33 | @override
34 | Widget build(BuildContext context) {
35 | return PainterList(futureGet: () => apiClient.getSearchUser(widget.word),);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/lib/page/search/result_illust_store.dart:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020. by perol_notsf, All rights reserved
3 | *
4 | * This program is free software: you can redistribute it and/or modify it under
5 | * the terms of the GNU General Public License as published by the Free Software
6 | * Foundation, either version 3 of the License, or (at your option) any later version.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11 | *
12 | * You should have received a copy of the GNU General Public License along with
13 | * this program. If not, see .
14 | *
15 | */
16 |
17 | import 'package:mobx/mobx.dart';
18 |
19 | part 'result_illust_store.g.dart';
20 |
21 | class ResultIllustStore = _ResultIllustStoreBase with _$ResultIllustStore;
22 |
23 | abstract class _ResultIllustStoreBase with Store {
24 | }
25 |
--------------------------------------------------------------------------------
/lib/page/search/suggest/suggestion_store.dart:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020. by perol_notsf, All rights reserved
3 | *
4 | * This program is free software: you can redistribute it and/or modify it under
5 | * the terms of the GNU General Public License as published by the Free Software
6 | * Foundation, either version 3 of the License, or (at your option) any later version.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11 | *
12 | * You should have received a copy of the GNU General Public License along with
13 | * this program. If not, see .
14 | *
15 | */
16 |
17 | import 'package:mobx/mobx.dart';
18 | import 'package:pixez/models/tags.dart';
19 | import 'package:pixez/network/api_client.dart';
20 | part 'suggestion_store.g.dart';
21 |
22 | class SuggestionStore = _SuggestionStoreBase with _$SuggestionStore;
23 |
24 | abstract class _SuggestionStoreBase with Store {
25 | @observable
26 | AutoWords? autoWords;
27 | fetch(String query) async {
28 | try {
29 | AutoWords autoWords =
30 | await apiClient.getSearchAutoCompleteKeywords(query);
31 | this.autoWords = autoWords;
32 | } catch (e) {}
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/lib/page/search/trend_tags_store.dart:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020. by perol_notsf, All rights reserved
3 | *
4 | * This program is free software: you can redistribute it and/or modify it under
5 | * the terms of the GNU General Public License as published by the Free Software
6 | * Foundation, either version 3 of the License, or (at your option) any later version.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11 | *
12 | * You should have received a copy of the GNU General Public License along with
13 | * this program. If not, see .
14 | *
15 | */
16 |
17 | import 'package:dio/dio.dart';
18 | import 'package:mobx/mobx.dart';
19 | import 'package:pixez/models/trend_tags.dart';
20 | import 'package:pixez/network/api_client.dart';
21 |
22 | part 'trend_tags_store.g.dart';
23 |
24 | class TrendTagsStore = _TrendTagsStoreBase with _$TrendTagsStore;
25 |
26 | abstract class _TrendTagsStoreBase with Store {
27 | @observable
28 | ObservableList trendTags = ObservableList();
29 |
30 | _TrendTagsStoreBase();
31 |
32 | @action
33 | fetch() async {
34 | try {
35 | Response response = await apiClient.getIllustTrendTags();
36 | TrendingTag trendingTag = TrendingTag.fromJson(response.data);
37 | trendTags.clear();
38 | trendTags.addAll(trendingTag.trend_tags);
39 | } catch (e) {
40 | print(e);
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/lib/page/vision/vision_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class VisionPage extends StatefulWidget {
4 | const VisionPage({Key? key}) : super(key: key);
5 |
6 | @override
7 | _VisionPageState createState() => _VisionPageState();
8 | }
9 |
10 | class _VisionPageState extends State {
11 | @override
12 | Widget build(BuildContext context) {
13 | return Scaffold(
14 | extendBody: true,
15 | extendBodyBehindAppBar: true,
16 |
17 | );
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/lib/page/webview/account_deletion_webview_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_inappwebview/flutter_inappwebview.dart';
3 | import 'package:pixez/i18n.dart';
4 |
5 | class AccountDeletionPage extends StatefulWidget {
6 | const AccountDeletionPage({Key? key}) : super(key: key);
7 |
8 | @override
9 | State createState() => _AccountDeletionPageState();
10 | }
11 |
12 | class _AccountDeletionPageState extends State {
13 | @override
14 | Widget build(BuildContext context) {
15 | return Scaffold(
16 | appBar: AppBar(
17 | title: Text(I18n.of(context).account_deletion),
18 | ),
19 | body: InAppWebView(
20 | initialUrlRequest:
21 | URLRequest(url: WebUri("https://www.pixiv.net/leave_pixiv.php")),
22 | initialSettings: InAppWebViewSettings(
23 | useShouldOverrideUrlLoading: true, useHybridComposition: true),
24 | ),
25 | );
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/lib/paths_plugin.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/services.dart';
2 |
3 | class Paths {
4 | static MethodChannel channel = MethodChannel("com.perol.dev/paths");
5 |
6 | static Future getDatabaseFolderPath() async {
7 | return await channel.invokeMethod("getDatabaseFolderPath");
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/lib/saf_plugin.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:file_picker/file_picker.dart';
4 | import 'package:flutter/services.dart';
5 |
6 | class SAFPlugin {
7 | static const platform = const MethodChannel('com.perol.dev/saf');
8 |
9 | static Future createFile(String name, String type) async {
10 | final result = await platform
11 | .invokeMethod("createFile", {'name': name, 'mimeType': type});
12 | if (result != null) {
13 | return result;
14 | }
15 | return null;
16 | }
17 |
18 | static Future writeUri(String uri, Uint8List data) async {
19 | return platform.invokeMethod("writeUri", {'uri': uri, 'data': data});
20 | }
21 |
22 | static Future openFile() async {
23 | if (Platform.isIOS) {
24 | try {
25 | FilePickerResult? result = await FilePicker.platform.pickFiles();
26 | if (result != null) {
27 | return File(result.files.single.path!).readAsBytes();
28 | }
29 | } catch (e) {}
30 | return null;
31 | }
32 | return platform
33 | .invokeMethod("openFile", {'type': "application/json"});
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/lib/secure_plugin.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:flutter/services.dart';
4 |
5 | class SecurePlugin {
6 | static const platform = const MethodChannel('com.perol.dev/secure');
7 |
8 | static Future configSecureWindow(bool enabled) async {
9 | try {
10 | if (Platform.isAndroid) {
11 | await platform.invokeMethod("configSecureWindow", {'value': enabled});
12 | }
13 | } catch (e) {}
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/lib/server/weiss_server.dart:
--------------------------------------------------------------------------------
1 |
2 | class WeissServer {
3 | static listener() async {
4 |
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/lib/single_instance_plugin.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/services.dart';
2 | import 'package:flutter/widgets.dart';
3 | import 'package:pixez/er/leader.dart';
4 | import 'package:pixez/main.dart';
5 |
6 | class SingleInstancePlugin {
7 | static final platform = const EventChannel("pixez/single_instance");
8 | static bool _isInitialized = false;
9 |
10 | // 这个函数是确保同一时间有且只有一个Pixez实例存在的
11 | //
12 | // 它需要将其他实例的命令行参数转发给第一个实例
13 | // 然后结束自己的进程
14 | static void initialize({Function()? callback}) {
15 | if (_isInitialized) throw Exception('ReInitialized');
16 | platform.receiveBroadcastStream().listen(
17 | (event) {
18 | final args = event.toString().split('\n');
19 | debugPrint("从另一实例接收到的参数: $args");
20 | argsParser(args, callback: callback);
21 | },
22 | );
23 | _isInitialized = true;
24 | }
25 |
26 | /// 解析命令行参数字符串
27 | static void argsParser(List args, {Function()? callback}) async {
28 | if (args.length < 1) return;
29 |
30 | final uri = Uri.tryParse(args[0]);
31 | if (uri != null) {
32 | debugPrint("::argsParser(): 合法的Uri: \"${uri}\"");
33 |
34 | if (callback != null) callback();
35 | Leader.pushWithUri(routeObserver.navigator!.context, uri);
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/lib/store/fullscreen_store.dart:
--------------------------------------------------------------------------------
1 | import 'package:mobx/mobx.dart';
2 |
3 | part 'fullscreen_store.g.dart';
4 |
5 | class FullScreenStore = _FullScreenStoreBase with _$FullScreenStore;
6 |
7 | abstract class _FullScreenStoreBase with Store {
8 | @observable
9 | bool fullscreen = false;
10 |
11 | @action
12 | void toggle() {
13 | fullscreen = !fullscreen;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/lib/store/top_store.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:mobx/mobx.dart';
4 | import 'package:pixez/er/lprinter.dart';
5 |
6 | part 'top_store.g.dart';
7 |
8 | class TopStore = _TopStoreBase with _$TopStore;
9 |
10 | abstract class _TopStoreBase with Store {
11 | late StreamController _streamController;
12 |
13 | late ObservableStream topStream;
14 |
15 | _TopStoreBase() {
16 | _streamController = StreamController();
17 | topStream = ObservableStream(_streamController.stream.asBroadcastStream());
18 | }
19 |
20 | @observable
21 | int code = 0;
22 |
23 | @action
24 | setCode(int code) {
25 | this.code = code;
26 | }
27 |
28 | dispose() {
29 | _streamController.close();
30 | }
31 |
32 | setTop(String name) {
33 | LPrinter.d(name);
34 | _streamController.add(name);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/lib/supportor_plugin.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/services.dart';
2 |
3 | class ResolvePack {
4 | final String package;
5 | final String name;
6 |
7 | ResolvePack(this.package, this.name);
8 | }
9 |
10 | class SupportorPlugin {
11 | static const platform = const MethodChannel('com.perol.dev/supporter');
12 | static var supportTranslate = false;
13 |
14 | static Future processText() async {
15 | bool result = await platform.invokeMethod("process_text");
16 | supportTranslate = result;
17 | return result;
18 | }
19 |
20 | static Future start(String text) async {
21 | await platform.invokeMethod("process", {"text": text});
22 | }
23 |
24 | static Future existApp() async {
25 | try {
26 | await platform.invokeMethod("exist");
27 | } catch (e) {}
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/utils.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'dart:io';
3 |
4 | import 'package:flutter/widgets.dart';
5 |
6 | /// 当使用鼠标滚轮滚动时 距离底边还有多少距离时开始加载下一页
7 | const double kLazyLoadSize = 300;
8 |
9 | /// 初始化滚动懒加载
10 | ///
11 | /// 因为鼠标滚轮不能滚出视图,无法触发EazyRefresh,所以需要使用这个方法来
12 | /// 为桌面平台提供更好的体验
13 | ///
14 | /// 这个方法返回一个用于注销监听器的方法
15 | void Function()? initializeScrollController(
16 | ScrollController controller,
17 | Future Function() next,
18 | ) {
19 | if (!Platform.isWindows && !Platform.isMacOS && !Platform.isLinux)
20 | return null;
21 |
22 | final listener = () async {
23 | if (controller.position.extentAfter > kLazyLoadSize) return;
24 |
25 | await next();
26 | };
27 |
28 | controller.addListener(listener);
29 | return () => controller.removeListener(listener);
30 | }
31 |
--------------------------------------------------------------------------------
/lib/weiss_plugin.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:flutter/services.dart';
4 | import 'package:pixez/er/hoster.dart';
5 |
6 | class WeissPlugin {
7 | static const platform = const MethodChannel('com.perol.dev/weiss');
8 |
9 | static Future start() async {
10 | final map = Hoster.hardMap();
11 |
12 | String data = "";
13 | try {
14 | if (map.containsKey("doh")) {
15 | final iMap = Map();
16 | iMap["doh"] = map["doh"];
17 | data = json.encode(iMap);
18 | }
19 | } catch (e) {}
20 | return await platform.invokeMethod("start", {"port": "9876", "map": data});
21 | }
22 |
23 | static Future stop() async {
24 | return await platform.invokeMethod("stop");
25 | }
26 |
27 | static Future proxy() async {
28 | return await platform.invokeMethod("proxy");
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/win32_plugin.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/services.dart';
2 |
3 | class Win32 {
4 | static MethodChannel channel = MethodChannel("com.perol.dev/win32");
5 |
6 | /// 判断系统build版本号是否大于 [build]
7 | static Future isBuildOrGreater(int build) async {
8 | try {
9 | return await channel.invokeMethod("isBuildOrGreater", {
10 | 'build': build
11 | });
12 | } catch (e) {
13 | return false;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/macos/.gitignore:
--------------------------------------------------------------------------------
1 | # Flutter-related
2 | **/Flutter/ephemeral/
3 | **/Pods/
4 |
5 | # Xcode-related
6 | **/dgph
7 | **/xcuserdata/
8 |
--------------------------------------------------------------------------------
/macos/Flutter/Flutter-Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/macos/Flutter/Flutter-Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/macos/Podfile:
--------------------------------------------------------------------------------
1 | platform :osx, '10.15'
2 |
3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
5 |
6 | project 'Runner', {
7 | 'Debug' => :debug,
8 | 'Profile' => :release,
9 | 'Release' => :release,
10 | }
11 |
12 | def flutter_root
13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
14 | unless File.exist?(generated_xcode_build_settings_path)
15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
16 | end
17 |
18 | File.foreach(generated_xcode_build_settings_path) do |line|
19 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
20 | return matches[1].strip if matches
21 | end
22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
23 | end
24 |
25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
26 |
27 | flutter_macos_podfile_setup
28 |
29 | target 'Runner' do
30 | use_frameworks!
31 | use_modular_headers!
32 |
33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
34 | target 'RunnerTests' do
35 | inherit! :search_paths
36 | end
37 | end
38 |
39 | post_install do |installer|
40 | installer.pods_project.targets.each do |target|
41 | flutter_additional_macos_build_settings(target)
42 | end
43 | end
44 |
--------------------------------------------------------------------------------
/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/macos/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/macos/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | @main
5 | class AppDelegate: FlutterAppDelegate {
6 | var eventSink: FlutterEventSink?
7 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
8 | return true
9 | }
10 |
11 | override func application(_ application: NSApplication, open urls: [URL]) {
12 | print(urls)
13 | for i in urls {
14 | eventSink?(i.absoluteString)
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "16x16",
5 | "idiom" : "mac",
6 | "filename" : "app_icon_16.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "16x16",
11 | "idiom" : "mac",
12 | "filename" : "app_icon_32.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "32x32",
17 | "idiom" : "mac",
18 | "filename" : "app_icon_32.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "32x32",
23 | "idiom" : "mac",
24 | "filename" : "app_icon_64.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "128x128",
29 | "idiom" : "mac",
30 | "filename" : "app_icon_128.png",
31 | "scale" : "1x"
32 | },
33 | {
34 | "size" : "128x128",
35 | "idiom" : "mac",
36 | "filename" : "app_icon_256.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "256x256",
41 | "idiom" : "mac",
42 | "filename" : "app_icon_256.png",
43 | "scale" : "1x"
44 | },
45 | {
46 | "size" : "256x256",
47 | "idiom" : "mac",
48 | "filename" : "app_icon_512.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "512x512",
53 | "idiom" : "mac",
54 | "filename" : "app_icon_512.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "512x512",
59 | "idiom" : "mac",
60 | "filename" : "app_icon_1024.png",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
--------------------------------------------------------------------------------
/macos/Runner/Configs/AppInfo.xcconfig:
--------------------------------------------------------------------------------
1 | // Application-level settings for the Runner target.
2 | //
3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
4 | // future. If not, the values below would default to using the project name when this becomes a
5 | // 'flutter create' template.
6 |
7 | // The application's name. By default this is also the title of the Flutter window.
8 | PRODUCT_NAME = pixez_flutter
9 |
10 | // The application's bundle identifier
11 | PRODUCT_BUNDLE_IDENTIFIER = com.perol.pixezFlutter
12 |
13 | // The copyright displayed in application information
14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.perol. All rights reserved.
15 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Debug.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Release.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/Warnings.xcconfig:
--------------------------------------------------------------------------------
1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
2 | GCC_WARN_UNDECLARED_SELECTOR = YES
3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
6 | CLANG_WARN_PRAGMA_PACK = YES
7 | CLANG_WARN_STRICT_PROTOTYPES = YES
8 | CLANG_WARN_COMMA = YES
9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES
10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
12 | GCC_WARN_SHADOW = YES
13 | CLANG_WARN_UNREACHABLE_CODE = YES
14 |
--------------------------------------------------------------------------------
/macos/Runner/DebugProfile.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.developer.applesignin
6 |
7 | Default
8 |
9 | com.apple.security.app-sandbox
10 |
11 | com.apple.security.cs.allow-jit
12 |
13 | com.apple.security.network.server
14 |
15 | com.apple.security.network.client
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/macos/Runner/Release.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.network.client
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/macos/RunnerTests/RunnerTests.swift:
--------------------------------------------------------------------------------
1 | import FlutterMacOS
2 | import Cocoa
3 | import XCTest
4 |
5 | class RunnerTests: XCTestCase {
6 |
7 | func testExample() {
8 | // If you add code to the Runner application, consider adding tests here.
9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/ohos/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | /oh_modules
3 | /local.properties
4 | /.idea
5 | **/build
6 | /.hvigor
7 | .cxx
8 | /.clangd
9 | /.clang-format
10 | /.clang-tidy
11 | **/.test
12 | *.har
13 | **/BuildProfile.ets
14 | **/oh-package-lock.json5
15 |
16 | **/src/main/resources/rawfile/flutter_assets/
17 | **/libs/arm64-v8a/libapp.so
18 | **/libs/arm64-v8a/libflutter.so
19 | **/libs/arm64-v8a/libvmservice_snapshot.so
20 |
--------------------------------------------------------------------------------
/ohos/AppScope/app.json5:
--------------------------------------------------------------------------------
1 | {
2 | "app": {
3 | "bundleName": "com.perol.pixez_flutter",
4 | "vendor": "example",
5 | "versionCode": 1000000,
6 | "versionName": "1.0.0",
7 | "icon": "$media:app_icon",
8 | "label": "$string:app_name"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/ohos/AppScope/resources/base/element/string.json:
--------------------------------------------------------------------------------
1 | {
2 | "string": [
3 | {
4 | "name": "app_name",
5 | "value": "pixez_flutter"
6 | }
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/ohos/AppScope/resources/base/media/app_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/ohos/AppScope/resources/base/media/app_icon.png
--------------------------------------------------------------------------------
/ohos/build-profile.json5:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | {
17 | "app": {
18 | "signingConfigs": [],
19 | "products": [
20 | {
21 | "name": "default",
22 | "signingConfig": "default",
23 | "compatibleSdkVersion": "5.0.0(12)",
24 | "runtimeOS": "HarmonyOS",
25 | }
26 | ]
27 | },
28 | "modules": [
29 | {
30 | "name": "entry",
31 | "srcPath": "./entry",
32 | "targets": [
33 | {
34 | "name": "default",
35 | "applyToProducts": [
36 | "default"
37 | ]
38 | }
39 | ]
40 | }
41 | ]
42 | }
--------------------------------------------------------------------------------
/ohos/entry/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | /node_modules
3 | /oh_modules
4 | /.preview
5 | /build
6 | /.cxx
7 | /.test
--------------------------------------------------------------------------------
/ohos/entry/build-profile.json5:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | {
17 | "apiType": 'stageMode',
18 | "buildOption": {
19 | },
20 | "targets": [
21 | {
22 | "name": "default",
23 | "runtimeOS": "HarmonyOS"
24 | },
25 | {
26 | "name": "ohosTest",
27 | }
28 | ]
29 | }
--------------------------------------------------------------------------------
/ohos/entry/hvigorfile.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | // Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
17 | export { hapTasks } from '@ohos/hvigor-ohos-plugin';
18 |
--------------------------------------------------------------------------------
/ohos/entry/oh-package.json5:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | {
17 | "name": "entry",
18 | "version": "1.0.0",
19 | "description": "Please describe the basic information.",
20 | "main": "",
21 | "author": "",
22 | "license": "",
23 | "dependencies": {
24 | },
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/ohos/entry/src/main/ets/entryability/EntryAbility.ets:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | import { FlutterAbility, FlutterEngine } from '@ohos/flutter_ohos';
17 | import { GeneratedPluginRegistrant } from '../plugins/GeneratedPluginRegistrant';
18 |
19 | export default class EntryAbility extends FlutterAbility {
20 | configureFlutterEngine(flutterEngine: FlutterEngine) {
21 | super.configureFlutterEngine(flutterEngine)
22 | GeneratedPluginRegistrant.registerWith(flutterEngine)
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/ohos/entry/src/main/ets/pages/Index.ets:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | import common from '@ohos.app.ability.common';
17 | import { FlutterPage } from '@ohos/flutter_ohos'
18 |
19 | let storage = LocalStorage.getShared()
20 | const EVENT_BACK_PRESS = 'EVENT_BACK_PRESS'
21 |
22 | @Entry(storage)
23 | @Component
24 | struct Index {
25 | private context = getContext(this) as common.UIAbilityContext
26 | @LocalStorageLink('viewId') viewId: string = "";
27 |
28 | build() {
29 | Column() {
30 | FlutterPage({ viewId: this.viewId })
31 | }
32 | }
33 |
34 | onBackPress(): boolean {
35 | this.context.eventHub.emit(EVENT_BACK_PRESS)
36 | return true
37 | }
38 | }
--------------------------------------------------------------------------------
/ohos/entry/src/main/resources/base/element/color.json:
--------------------------------------------------------------------------------
1 | {
2 | "color": [
3 | {
4 | "name": "start_window_background",
5 | "value": "#FFFFFF"
6 | }
7 | ]
8 | }
--------------------------------------------------------------------------------
/ohos/entry/src/main/resources/base/element/string.json:
--------------------------------------------------------------------------------
1 | {
2 | "string": [
3 | {
4 | "name": "module_desc",
5 | "value": "module description"
6 | },
7 | {
8 | "name": "EntryAbility_desc",
9 | "value": "description"
10 | },
11 | {
12 | "name": "EntryAbility_label",
13 | "value": "pixez_flutter"
14 | }
15 | ]
16 | }
--------------------------------------------------------------------------------
/ohos/entry/src/main/resources/base/media/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/ohos/entry/src/main/resources/base/media/icon.png
--------------------------------------------------------------------------------
/ohos/entry/src/main/resources/base/profile/main_pages.json:
--------------------------------------------------------------------------------
1 | {
2 | "src": [
3 | "pages/Index"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/ohos/entry/src/main/resources/en_US/element/string.json:
--------------------------------------------------------------------------------
1 | {
2 | "string": [
3 | {
4 | "name": "module_desc",
5 | "value": "module description"
6 | },
7 | {
8 | "name": "EntryAbility_desc",
9 | "value": "description"
10 | },
11 | {
12 | "name": "EntryAbility_label",
13 | "value": "pixez_flutter"
14 | }
15 | ]
16 | }
--------------------------------------------------------------------------------
/ohos/entry/src/main/resources/ru_RU/element/string.json:
--------------------------------------------------------------------------------
1 | {
2 | "string": [
3 | {
4 | "name": "module_desc",
5 | "value": "описание модуля"
6 | },
7 | {
8 | "name": "EntryAbility_desc",
9 | "value": "description"
10 | },
11 | {
12 | "name": "EntryAbility_label",
13 | "value": "pixez_flutter"
14 | }
15 | ]
16 | }
--------------------------------------------------------------------------------
/ohos/entry/src/main/resources/zh_CN/element/string.json:
--------------------------------------------------------------------------------
1 | {
2 | "string": [
3 | {
4 | "name": "module_desc",
5 | "value": "模块描述"
6 | },
7 | {
8 | "name": "EntryAbility_desc",
9 | "value": "description"
10 | },
11 | {
12 | "name": "EntryAbility_label",
13 | "value": "pixez_flutter"
14 | }
15 | ]
16 | }
--------------------------------------------------------------------------------
/ohos/entry/src/ohosTest/ets/test/List.test.ets:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | import abilityTest from './Ability.test'
17 |
18 | export default function testsuite() {
19 | abilityTest()
20 | }
--------------------------------------------------------------------------------
/ohos/entry/src/ohosTest/ets/testability/pages/Index.ets:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | import hilog from '@ohos.hilog';
17 |
18 | @Entry
19 | @Component
20 | struct Index {
21 | aboutToAppear() {
22 | hilog.info(0x0000, 'testTag', '%{public}s', 'TestAbility index aboutToAppear');
23 | }
24 | @State message: string = 'Hello World'
25 | build() {
26 | Row() {
27 | Column() {
28 | Text(this.message)
29 | .fontSize(50)
30 | .fontWeight(FontWeight.Bold)
31 | Button() {
32 | Text('next page')
33 | .fontSize(20)
34 | .fontWeight(FontWeight.Bold)
35 | }.type(ButtonType.Capsule)
36 | .margin({
37 | top: 20
38 | })
39 | .backgroundColor('#0D9FFB')
40 | .width('35%')
41 | .height('5%')
42 | .onClick(()=>{
43 | })
44 | }
45 | .width('100%')
46 | }
47 | .height('100%')
48 | }
49 | }
--------------------------------------------------------------------------------
/ohos/entry/src/ohosTest/resources/base/element/color.json:
--------------------------------------------------------------------------------
1 | {
2 | "color": [
3 | {
4 | "name": "start_window_background",
5 | "value": "#FFFFFF"
6 | }
7 | ]
8 | }
--------------------------------------------------------------------------------
/ohos/entry/src/ohosTest/resources/base/element/string.json:
--------------------------------------------------------------------------------
1 | {
2 | "string": [
3 | {
4 | "name": "module_test_desc",
5 | "value": "test ability description"
6 | },
7 | {
8 | "name": "TestAbility_desc",
9 | "value": "the test ability"
10 | },
11 | {
12 | "name": "TestAbility_label",
13 | "value": "test label"
14 | }
15 | ]
16 | }
--------------------------------------------------------------------------------
/ohos/entry/src/ohosTest/resources/base/media/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/ohos/entry/src/ohosTest/resources/base/media/icon.png
--------------------------------------------------------------------------------
/ohos/entry/src/ohosTest/resources/base/profile/test_pages.json:
--------------------------------------------------------------------------------
1 | {
2 | "src": [
3 | "testability/pages/Index"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/ohos/hvigor/hvigor-config.json5:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | {
17 | "modelVersion": "5.0.0",
18 | "dependencies": {
19 | }
20 | }
--------------------------------------------------------------------------------
/ohos/hvigorfile.ts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | import { appTasks } from '@ohos/hvigor-ohos-plugin';
17 |
18 | export default {
19 | system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
20 | plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
21 | }
--------------------------------------------------------------------------------
/ohos/oh-package.json5:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | {
17 | "modelVersion": "5.0.0",
18 | "name": "pixez_flutter",
19 | "version": "1.0.0",
20 | "description": "Please describe the basic information.",
21 | "main": "",
22 | "author": "",
23 | "license": "",
24 | "dependencies": {
25 | "@ohos/flutter_ohos": "file:./har/flutter.har"
26 | },
27 | "devDependencies": {
28 | "@ohos/hypium": "1.0.6"
29 | },
30 | "overrides": {
31 | "@ohos/flutter_ohos": "file:./har/flutter.har"
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/res/values/strings_en.arb:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/res/values/strings_zh_CN.arb:
--------------------------------------------------------------------------------
1 | {
2 | "hello":"s"
3 | }
--------------------------------------------------------------------------------
/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020. by perol_notsf, All rights reserved
3 | *
4 | * This program is free software: you can redistribute it and/or modify it under
5 | * the terms of the GNU General Public License as published by the Free Software
6 | * Foundation, either version 3 of the License, or (at your option) any later version.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11 | *
12 | * You should have received a copy of the GNU General Public License along with
13 | * this program. If not, see .
14 | *
15 | */
16 |
17 | // This is a basic Flutter widget test.
18 | //
19 | // To perform an interaction with a widget in your test, use the WidgetTester
20 | // utility that Flutter provides. For example, you can send tap and scroll
21 | // gestures. You can also use WidgetTester to find child widgets in the widget
22 | // tree, read text, and verify that the values of widget properties are correct.
23 | import 'package:flutter_test/flutter_test.dart';
24 |
25 | void main() {
26 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
27 | });
28 | }
29 |
--------------------------------------------------------------------------------
/to_lower.dart:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020. by perol_notsf, All rights reserved
3 | *
4 | * This program is free software: you can redistribute it and/or modify it under
5 | * the terms of the GNU General Public License as published by the Free Software
6 | * Foundation, either version 3 of the License, or (at your option) any later version.
7 | *
8 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY
9 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11 | *
12 | * You should have received a copy of the GNU General Public License along with
13 | * this program. If not, see .
14 | *
15 | */
16 |
17 | import 'dart:convert';
18 | import 'dart:io';
19 |
20 | //给key转小写的工具
21 | void main(args) {
22 | String fileName = 'en_US.arb';
23 | var file = File('./${fileName}');
24 | Map scores = jsonDecode(file.readAsStringSync());
25 | var keys = scores.keys.toList();
26 | for (var i = 0; i < keys.length; i++) {
27 | var key = keys[i];
28 | var resultKey = key.toLowerCase();
29 | if (resultKey == key) {
30 | continue;
31 | }
32 | scores[resultKey] = scores[key];
33 | scores.remove(key);
34 | }
35 | String out = "{\n";
36 | var outFile = File('./${fileName}.json');
37 | if (!outFile.existsSync()) {
38 | outFile.createSync();
39 | }
40 | for (var j in scores.keys.toList()..sort()) {
41 | out += "\"$j\":\"${scores[j]}\",\n";
42 | }
43 | out += "}";
44 | outFile.writeAsStringSync(out);
45 | print(scores.keys.length);
46 | }
47 |
--------------------------------------------------------------------------------
/windows/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral/
2 |
3 | # Visual Studio user-specific files.
4 | *.suo
5 | *.user
6 | *.userosscache
7 | *.sln.docstates
8 |
9 | # Visual Studio build-related files.
10 | x64/
11 | x86/
12 |
13 | # Visual Studio cache files
14 | # files ending in .cache can be ignored
15 | *.[Cc]ache
16 | # but keep track of directories ending in .cache
17 | !*.[Cc]ache/
18 |
19 | flutter/generated_plugin*
20 |
--------------------------------------------------------------------------------
/windows/deploy.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:msix/msix.dart';
4 |
5 | Future main(List arguments) async {
6 | final release = arguments.contains('--release');
7 | final manifest = release
8 | ? 'build\\windows\\x64\\runner\\Release\\AppxManifest.xml'
9 | : 'build\\windows\\x64\\runner\\Debug\\AppxManifest.xml';
10 |
11 | await Msix([
12 | if (!release) '--debug',
13 | '--sign-msix=false',
14 | ...arguments,
15 | ]).build();
16 |
17 | print('\r\npackage deploying...');
18 | final result = await Process.run(
19 | 'powershell.exe',
20 | [
21 | '-NoLogo',
22 | '-NoProfile',
23 | '-NonInteractive',
24 | '-Command',
25 | '{Add-AppxPackage -Path ${manifest} -Register}',
26 | ],
27 | );
28 |
29 | if (result.exitCode == 0)
30 | print('deploy finished.');
31 | else
32 | print(result.stderr);
33 | }
34 |
--------------------------------------------------------------------------------
/windows/runner/flutter_window.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_FLUTTER_WINDOW_H_
2 | #define RUNNER_FLUTTER_WINDOW_H_
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | #include "win32_window.h"
9 |
10 | // A window that does nothing but host a Flutter view.
11 | class FlutterWindow : public Win32Window {
12 | public:
13 | // Creates a new FlutterWindow hosting a Flutter view running |project|.
14 | explicit FlutterWindow(const flutter::DartProject& project);
15 | virtual ~FlutterWindow();
16 |
17 | protected:
18 | // Win32Window:
19 | bool OnCreate() override;
20 | void OnDestroy() override;
21 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,
22 | LPARAM const lparam) noexcept override;
23 |
24 | private:
25 | // The project to run.
26 | flutter::DartProject project_;
27 |
28 | // The Flutter instance hosted by this window.
29 | std::unique_ptr flutter_controller_;
30 | };
31 |
32 | #endif // RUNNER_FLUTTER_WINDOW_H_
33 |
--------------------------------------------------------------------------------
/windows/runner/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | #include "plugins/single_instance_plugin.h"
6 | #include "flutter_window.h"
7 | #include "utils.h"
8 |
9 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
10 | _In_ wchar_t *command_line, _In_ int show_command) {
11 | auto hMutex = SingleInstance::SetMutex();
12 | if (hMutex == INVALID_HANDLE_VALUE) {
13 | return EXIT_FAILURE;
14 | }
15 |
16 | // Attach to console when present (e.g., 'flutter run') or create a
17 | // new console when running with a debugger.
18 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
19 | CreateAndAttachConsole();
20 | }
21 |
22 | // Initialize COM, so that it is available for use in the library and/or
23 | // plugins.
24 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
25 |
26 | flutter::DartProject project(L"data");
27 |
28 | std::vector command_line_arguments =
29 | GetCommandLineArguments();
30 |
31 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
32 |
33 | FlutterWindow window(project);
34 | Win32Window::Point origin(10, 10);
35 | Win32Window::Size size(1280, 720);
36 | if (!window.Create(L"pixez", origin, size)) {
37 | ReleaseMutex(hMutex);
38 | return EXIT_FAILURE;
39 | }
40 | window.SetQuitOnClose(true);
41 |
42 | ::MSG msg;
43 | while (::GetMessage(&msg, nullptr, 0, 0)) {
44 | ::TranslateMessage(&msg);
45 | ::DispatchMessage(&msg);
46 | }
47 |
48 | ::CoUninitialize();
49 | ReleaseMutex(hMutex);
50 | return EXIT_SUCCESS;
51 | }
52 |
--------------------------------------------------------------------------------
/windows/runner/plugins/clipboard_plugin.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 |
7 | class Clipboard
8 | {
9 | private:
10 | static std::string name;
11 | static winrt::Windows::Foundation::IAsyncAction CopyImageFromPathAsync(const std::string &path);
12 |
13 | public:
14 | static void Initialize(flutter::BinaryMessenger *messenger, const flutter::StandardMethodCodec *codec);
15 | };
--------------------------------------------------------------------------------
/windows/runner/plugins/document_plugin.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | class Document
9 | {
10 | private:
11 | static std::string name;
12 |
13 | static winrt::Windows::Foundation::IAsyncOperation SaveAsync(const std::vector &data, winrt::hstring fileName);
14 | static winrt::Windows::Foundation::IAsyncOperation OpenSaveAsync(const std::vector &data, winrt::hstring fileName, HWND hWnd);
15 | static winrt::Windows::Foundation::IAsyncOperation ExistAsync(winrt::hstring fileName);
16 | static winrt::Windows::Foundation::IAsyncOperation GetPathAsync();
17 | static winrt::Windows::Foundation::IAsyncOperation ChoiceFolderAsync(HWND hWnd);
18 |
19 | public:
20 | static void Initialize(flutter::BinaryMessenger *messenger, const flutter::StandardMethodCodec *codec, HWND hWnd);
21 | };
--------------------------------------------------------------------------------
/windows/runner/plugins/paths_plugin.cpp:
--------------------------------------------------------------------------------
1 | #include "paths_plugin.h"
2 | #include "../settings.h"
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | using namespace std;
9 | using namespace flutter;
10 | using namespace winrt;
11 | using namespace Windows::Storage;
12 |
13 | string Paths::name = "com.perol.dev/paths";
14 | hstring folder = L"\\PixEz";
15 |
16 | void Paths::Initialize(BinaryMessenger *messenger, const StandardMethodCodec *codec)
17 | {
18 | MethodChannel channel(messenger, name, codec);
19 |
20 | channel.SetMethodCallHandler(
21 | [](const MethodCall &call,
22 | unique_ptr> result)
23 | {
24 | if (call.method_name().compare("getDatabaseFolderPath") == 0)
25 | {
26 | result->Success(to_string(GetDatabaseFolderPath()));
27 | }
28 | });
29 | }
30 |
31 | hstring Paths::GetDatabaseFolderPath()
32 | {
33 | return Settings::AppDataFolder();
34 | }
35 |
--------------------------------------------------------------------------------
/windows/runner/plugins/paths_plugin.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 |
7 | class Paths
8 | {
9 | private:
10 | static std::string name;
11 |
12 | static winrt::hstring GetDatabaseFolderPath();
13 | static winrt::hstring GetPicturesFolderPath();
14 |
15 | public:
16 | static void Initialize(flutter::BinaryMessenger *messenger, const flutter::StandardMethodCodec *codec);
17 | };
--------------------------------------------------------------------------------
/windows/runner/plugins/single_instance_plugin.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 |
9 | class SingleInstance
10 | {
11 | private:
12 | static LPCTSTR name;
13 | static LPCTSTR pipePrefix;
14 |
15 | static void sentEvent(
16 | std::unique_ptr> &&event);
17 | static std::unique_ptr> onListen(
18 | const flutter::EncodableValue *args,
19 | std::unique_ptr> &&event);
20 | static std::unique_ptr> onCancel(
21 | const flutter::EncodableValue *args);
22 |
23 | public:
24 | static void Initialize(flutter::BinaryMessenger *messenger, const flutter::StandardMethodCodec *codec);
25 |
26 | static HANDLE SetMutex();
27 | };
28 |
--------------------------------------------------------------------------------
/windows/runner/plugins/weiss_plugin.cpp:
--------------------------------------------------------------------------------
1 | #include "weiss_plugin.h"
2 |
3 | #include
4 |
5 | using namespace std;
6 | using namespace flutter;
7 |
8 | string Weiss::name = "com.perol.dev/weiss";
9 | string Weiss::port = "9876";
10 |
11 | void Weiss::Initialize(BinaryMessenger *messenger, const StandardMethodCodec *codec)
12 | {
13 | MethodChannel channel(messenger, name, codec);
14 |
15 | channel.SetMethodCallHandler(
16 | [](const MethodCall &call,
17 | unique_ptr> result)
18 | {
19 | if (call.method_name().compare("start") == 0)
20 | {
21 | const auto *arguments = get_if(call.arguments());
22 | const auto p = get(arguments->at(EncodableValue("port")));
23 | const auto map = get(arguments->at(EncodableValue("map")));
24 | if (!p.empty())
25 | port = p;
26 |
27 | Start(map);
28 | result->Success();
29 | }
30 | else if (call.method_name().compare("stop") == 0)
31 | {
32 | Stop();
33 | result->Success();
34 | }
35 | else if (call.method_name().compare("proxy") == 0)
36 | {
37 | Proxy();
38 | result->Success();
39 | }
40 | });
41 | }
42 |
43 | void Weiss::Start(string json)
44 | {
45 | // TODO
46 | }
47 | void Weiss::Stop()
48 | {
49 | // TODO
50 | }
51 | void Weiss::Proxy()
52 | {
53 | // TODO
54 | }
--------------------------------------------------------------------------------
/windows/runner/plugins/weiss_plugin.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 |
6 | class Weiss
7 | {
8 | private:
9 | static std::string name;
10 | static std::string port;
11 |
12 | static void Start(std::string json);
13 | static void Stop();
14 | static void Proxy();
15 |
16 | public:
17 | static void Initialize(flutter::BinaryMessenger *messenger, const flutter::StandardMethodCodec *codec);
18 | };
19 |
--------------------------------------------------------------------------------
/windows/runner/plugins/win32_plugin.cpp:
--------------------------------------------------------------------------------
1 | #include "win32_plugin.h"
2 |
3 | #include
4 |
5 | using namespace std;
6 | using namespace flutter;
7 |
8 | string Win32::name = "com.perol.dev/win32";
9 |
10 | void Win32::Initialize(BinaryMessenger *messenger, const StandardMethodCodec *codec)
11 | {
12 | MethodChannel channel(messenger, name, codec);
13 |
14 | channel.SetMethodCallHandler(
15 | [](const MethodCall &call,
16 | unique_ptr> result)
17 | {
18 | if (call.method_name().compare("isBuildOrGreater") == 0)
19 | {
20 | const auto *arguments = get_if(call.arguments());
21 | auto data = arguments->find(EncodableValue("build"))->second;
22 | DWORD build = get(data);
23 | result->Success(IsBuildOrGreater(build));
24 | }
25 | });
26 | }
27 |
28 | bool Win32::IsBuildOrGreater(DWORD build)
29 | {
30 | OSVERSIONINFOEX lpVersionInformation;
31 | lpVersionInformation.dwBuildNumber = build;
32 |
33 | auto dwlConditionMask = VerSetConditionMask(
34 | 0,
35 | VER_BUILDNUMBER,
36 | VER_GREATER_EQUAL);
37 |
38 | return VerifyVersionInfo(
39 | &lpVersionInformation,
40 | VER_BUILDNUMBER,
41 | dwlConditionMask) ==
42 | TRUE;
43 | }
--------------------------------------------------------------------------------
/windows/runner/plugins/win32_plugin.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | #include
6 | #include
7 |
8 | class Win32
9 | {
10 | private:
11 | static std::string name;
12 |
13 | static bool IsBuildOrGreater(DWORD build);
14 |
15 | public:
16 | static void Initialize(flutter::BinaryMessenger *messenger, const flutter::StandardMethodCodec *codec);
17 | };
--------------------------------------------------------------------------------
/windows/runner/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by Runner.rc
4 | //
5 | #define IDI_APP_ICON 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 102
12 | #define _APS_NEXT_COMMAND_VALUE 40001
13 | #define _APS_NEXT_CONTROL_VALUE 1001
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/windows/runner/resources/app_icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/windows/runner/resources/app_icon.ico
--------------------------------------------------------------------------------
/windows/runner/resources/ic_launcher-msstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Notsfsssf/pixez-flutter/5acdfa1b6827c7a4c258ced6352af790da9be293/windows/runner/resources/ic_launcher-msstore.png
--------------------------------------------------------------------------------
/windows/runner/runner.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PerMonitorV2
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/windows/runner/settings.cpp:
--------------------------------------------------------------------------------
1 | #include "settings.h"
2 |
3 | #include
4 | #include
5 | #include
6 |
7 | using namespace winrt;
8 | using namespace Windows::Data::Json;
9 | using namespace Windows::Foundation;
10 | using namespace Windows::Foundation::Collections;
11 | using namespace Windows::Storage;
12 |
13 | hstring Settings::_appDataFolder = UserDataPaths::GetDefault().RoamingAppData() + L"\\PixEz";
14 |
15 | IAsyncOperation Settings::TryGetValueAsync(hstring key)
16 | {
17 | auto dataFolder = co_await StorageFolder::GetFolderFromPathAsync(AppDataFolder());
18 | auto settingsFile = co_await dataFolder.CreateFileAsync(L"settings.json", CreationCollisionOption::OpenIfExists);
19 | auto jsonString = co_await FileIO::ReadTextAsync(settingsFile);
20 | JsonObject json{};
21 | if (jsonString.empty() || !JsonObject::TryParse(jsonString, json) || !json.HasKey(key))
22 | co_return (wchar_t *) nullptr;
23 |
24 | co_return json.GetNamedString(key);
25 | }
26 |
27 | IAsyncAction Settings::SetValueAsync(hstring key, hstring value)
28 | {
29 | auto dataFolder = co_await StorageFolder::GetFolderFromPathAsync(AppDataFolder());
30 | auto settingsFileTask = dataFolder.CreateFileAsync(L"settings.json", CreationCollisionOption::ReplaceExisting);
31 |
32 | JsonObject json{};
33 | json.SetNamedValue(key, JsonValue::CreateStringValue(value));
34 | co_await FileIO::WriteTextAsync(co_await settingsFileTask, json.Stringify());
35 | }
36 |
--------------------------------------------------------------------------------
/windows/runner/settings.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 |
6 | class Settings
7 | {
8 | private:
9 | static winrt::hstring _appDataFolder;
10 |
11 | public:
12 | static inline winrt::hstring AppDataFolder()
13 | {
14 | return _appDataFolder;
15 | }
16 | static winrt::Windows::Foundation::IAsyncOperation TryGetValueAsync(winrt::hstring key);
17 | static winrt::Windows::Foundation::IAsyncAction SetValueAsync(winrt::hstring key, winrt::hstring value);
18 | };
--------------------------------------------------------------------------------
/windows/runner/utils.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_UTILS_H_
2 | #define RUNNER_UTILS_H_
3 |
4 | #include
5 | #include
6 |
7 | // Creates a console for the process, and redirects stdout and stderr to
8 | // it for both the runner and the Flutter library.
9 | void CreateAndAttachConsole();
10 |
11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string
12 | // encoded in UTF-8. Returns an empty std::string on failure.
13 | std::string Utf8FromUtf16(const wchar_t* utf16_string);
14 |
15 | // Gets the command line arguments passed in as a std::vector,
16 | // encoded in UTF-8. Returns an empty std::vector on failure.
17 | std::vector GetCommandLineArguments();
18 |
19 | #endif // RUNNER_UTILS_H_
20 |
--------------------------------------------------------------------------------