├── .flutter-plugins
├── .flutter-plugins-dependencies
├── .gitignore
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── README.en-US.md
├── README.md
├── analysis_options.yaml
├── assets
├── fonts
│ └── icon-antd.ttf
├── icons
│ ├── ic_error.png
│ ├── ic_info.png
│ ├── ic_success.png
│ └── ic_warning.png
├── lottie
│ └── error.json
└── svgs
│ ├── error.svg
│ ├── info.svg
│ ├── question.svg
│ ├── success.svg
│ ├── time.svg
│ └── warn.svg
├── example
├── .gitignore
├── .metadata
├── README.md
├── analysis_options.yaml
├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── ic_launcher-playstore.png
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── example
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── res
│ │ │ │ ├── drawable-hdpi
│ │ │ │ ├── android12splash.png
│ │ │ │ └── splash.png
│ │ │ │ ├── drawable-mdpi
│ │ │ │ ├── android12splash.png
│ │ │ │ └── splash.png
│ │ │ │ ├── drawable-night-hdpi
│ │ │ │ ├── android12splash.png
│ │ │ │ └── splash.png
│ │ │ │ ├── drawable-night-mdpi
│ │ │ │ ├── android12splash.png
│ │ │ │ └── splash.png
│ │ │ │ ├── drawable-night-v21
│ │ │ │ ├── background.png
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── drawable-night-xhdpi
│ │ │ │ ├── android12splash.png
│ │ │ │ └── splash.png
│ │ │ │ ├── drawable-night-xxhdpi
│ │ │ │ ├── android12splash.png
│ │ │ │ └── splash.png
│ │ │ │ ├── drawable-night-xxxhdpi
│ │ │ │ ├── android12splash.png
│ │ │ │ └── splash.png
│ │ │ │ ├── drawable-night
│ │ │ │ ├── background.png
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── drawable-v21
│ │ │ │ ├── background.png
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── drawable-xhdpi
│ │ │ │ ├── android12splash.png
│ │ │ │ └── splash.png
│ │ │ │ ├── drawable-xxhdpi
│ │ │ │ ├── android12splash.png
│ │ │ │ └── splash.png
│ │ │ │ ├── drawable-xxxhdpi
│ │ │ │ ├── android12splash.png
│ │ │ │ └── splash.png
│ │ │ │ ├── drawable
│ │ │ │ ├── background.png
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ └── ic_launcher.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ │ ├── values-night-v31
│ │ │ │ └── styles.xml
│ │ │ │ ├── values-night
│ │ │ │ └── styles.xml
│ │ │ │ ├── values-v31
│ │ │ │ └── styles.xml
│ │ │ │ └── values
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── assets
│ ├── fonts
│ │ ├── Montserrat-Black.ttf
│ │ ├── Montserrat-Bold.ttf
│ │ ├── Montserrat-ExtraBold.ttf
│ │ ├── Montserrat-ExtraLight.ttf
│ │ ├── Montserrat-Light.ttf
│ │ ├── Montserrat-Medium.ttf
│ │ ├── Montserrat-Regular.ttf
│ │ ├── Montserrat-SemiBold.ttf
│ │ └── Montserrat-Thin.ttf
│ ├── icons
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_adaptive.png
│ │ └── ic_launcher_adaptive_dark.png
│ ├── images
│ │ ├── captcha_bg1.jpg
│ │ ├── captcha_bg2.jpg
│ │ ├── captcha_bg3.jpg
│ │ └── captcha_bg4.jpg
│ └── svgs
│ │ └── icon1.svg
├── flutter_01.png
├── flutter_02.png
├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Podfile
│ ├── Podfile.lock
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ ├── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ │ ├── Icon-App-20x20@1x.png
│ │ │ │ ├── Icon-App-20x20@2x.png
│ │ │ │ ├── Icon-App-20x20@3x.png
│ │ │ │ ├── Icon-App-29x29@1x.png
│ │ │ │ ├── Icon-App-29x29@2x.png
│ │ │ │ ├── Icon-App-29x29@3x.png
│ │ │ │ ├── Icon-App-40x40@1x.png
│ │ │ │ ├── Icon-App-40x40@2x.png
│ │ │ │ ├── Icon-App-40x40@3x.png
│ │ │ │ ├── Icon-App-60x60@2x.png
│ │ │ │ ├── Icon-App-60x60@3x.png
│ │ │ │ ├── Icon-App-76x76@1x.png
│ │ │ │ ├── Icon-App-76x76@2x.png
│ │ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ │ ├── LaunchBackground.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── background.png
│ │ │ │ └── darkbackground.png
│ │ │ └── LaunchImage.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchImage.png
│ │ │ │ ├── LaunchImage@2x.png
│ │ │ │ ├── LaunchImage@3x.png
│ │ │ │ ├── LaunchImageDark.png
│ │ │ │ ├── LaunchImageDark@2x.png
│ │ │ │ ├── LaunchImageDark@3x.png
│ │ │ │ └── README.md
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── Runner-Bridging-Header.h
│ └── RunnerTests
│ │ └── RunnerTests.swift
├── lib
│ ├── common
│ │ ├── langs
│ │ │ ├── index.dart
│ │ │ ├── locales
│ │ │ │ ├── locale_en.dart
│ │ │ │ ├── locale_es.dart
│ │ │ │ └── locale_zh.dart
│ │ │ ├── text_key.dart
│ │ │ └── translation_library.dart
│ │ ├── model
│ │ │ └── base_model.dart
│ │ └── styles
│ │ │ └── theme.dart
│ ├── main.dart
│ └── pages
│ │ ├── base_widgets
│ │ ├── controller.dart
│ │ ├── index.dart
│ │ └── view.dart
│ │ ├── dialog
│ │ ├── controller.dart
│ │ ├── index.dart
│ │ └── view.dart
│ │ ├── home
│ │ ├── controller.dart
│ │ ├── index.dart
│ │ └── view.dart
│ │ ├── language
│ │ ├── controller.dart
│ │ ├── index.dart
│ │ └── view.dart
│ │ ├── load_container
│ │ ├── controller.dart
│ │ ├── index.dart
│ │ └── view.dart
│ │ ├── network
│ │ ├── controller.dart
│ │ ├── index.dart
│ │ └── view.dart
│ │ ├── permission
│ │ ├── controller.dart
│ │ ├── index.dart
│ │ └── view.dart
│ │ ├── theme
│ │ ├── controller.dart
│ │ ├── index.dart
│ │ └── view.dart
│ │ └── theme_color
│ │ ├── controller.dart
│ │ ├── index.dart
│ │ └── view.dart
├── linux
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── flutter
│ │ ├── CMakeLists.txt
│ │ ├── generated_plugin_registrant.cc
│ │ ├── generated_plugin_registrant.h
│ │ └── generated_plugins.cmake
│ ├── main.cc
│ ├── my_application.cc
│ └── my_application.h
├── macos
│ ├── .gitignore
│ ├── Flutter
│ │ ├── Flutter-Debug.xcconfig
│ │ ├── Flutter-Release.xcconfig
│ │ └── GeneratedPluginRegistrant.swift
│ ├── 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
│ │ ├── Info.plist
│ │ ├── MainFlutterWindow.swift
│ │ └── Release.entitlements
│ └── RunnerTests
│ │ └── RunnerTests.swift
├── pubspec.lock
├── pubspec.yaml
├── web
│ ├── favicon.png
│ ├── icons
│ │ ├── Icon-192.png
│ │ ├── Icon-512.png
│ │ ├── Icon-maskable-192.png
│ │ └── Icon-maskable-512.png
│ ├── index.html
│ ├── manifest.json
│ └── splash
│ │ └── img
│ │ ├── dark-1x.png
│ │ ├── dark-2x.png
│ │ ├── dark-3x.png
│ │ ├── dark-4x.png
│ │ ├── light-1x.png
│ │ ├── light-2x.png
│ │ ├── light-3x.png
│ │ └── light-4x.png
└── windows
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── flutter
│ ├── CMakeLists.txt
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ └── generated_plugins.cmake
│ └── runner
│ ├── CMakeLists.txt
│ ├── Runner.rc
│ ├── flutter_window.cpp
│ ├── flutter_window.h
│ ├── main.cpp
│ ├── resource.h
│ ├── resources
│ └── app_icon.ico
│ ├── runner.exe.manifest
│ ├── utils.cpp
│ ├── utils.h
│ ├── win32_window.cpp
│ └── win32_window.h
├── img.png
├── lib
├── common
│ ├── base
│ │ ├── base_controller_mixin.dart
│ │ └── index.dart
│ ├── common.dart
│ ├── components
│ │ ├── brn_toast.dart
│ │ ├── dialog_x.dart
│ │ ├── getx_app.dart
│ │ ├── index.dart
│ │ └── loading.dart
│ ├── event
│ │ ├── index.dart
│ │ ├── lifecycle.dart
│ │ └── refresh_ui.dart
│ ├── extensions
│ │ ├── ex_color.dart
│ │ ├── ex_date_time.dart
│ │ ├── ex_list.dart
│ │ ├── ex_num.dart
│ │ ├── ex_scroll.dart
│ │ ├── ex_string.dart
│ │ ├── ex_widget.dart
│ │ └── index.dart
│ ├── index.dart
│ ├── resources
│ │ ├── antd_icon.dart
│ │ ├── index.dart
│ │ └── theme_color.dart
│ ├── services
│ │ ├── global.dart
│ │ ├── http.dart
│ │ └── index.dart
│ ├── utils
│ │ ├── date_util.dart
│ │ ├── dio_logger.dart
│ │ ├── encrypt_util.dart
│ │ ├── index.dart
│ │ ├── json_util.dart
│ │ ├── jwt_decoder.dart
│ │ ├── log_util.dart
│ │ ├── money_util.dart
│ │ ├── num_util.dart
│ │ ├── object_util.dart
│ │ ├── permission_util.dart
│ │ ├── regex_util.dart
│ │ ├── rsa_util.dart
│ │ ├── shared_pref.dart
│ │ ├── text_util.dart
│ │ ├── timeline_util.dart
│ │ ├── timer_util.dart
│ │ └── toast_util.dart
│ └── widgets
│ │ ├── button_x.dart
│ │ ├── divider_x.dart
│ │ ├── double_press_back.dart
│ │ ├── icon_x.dart
│ │ ├── image_x.dart
│ │ ├── index.dart
│ │ ├── keep_alive_wrapper.dart
│ │ ├── list_tile_x.dart
│ │ ├── load_container.dart
│ │ ├── navigation_x.dart
│ │ ├── read_more_text.dart
│ │ ├── rich_text_x.dart
│ │ ├── rotation_transition_widget.dart
│ │ ├── text_tag.dart
│ │ └── text_x.dart
└── getx_scaffold.dart
└── pubspec.yaml
/.flutter-plugins:
--------------------------------------------------------------------------------
1 | # This is a generated file; do not edit or check into version control.
2 | connectivity_plus=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/connectivity_plus-6.0.5/
3 | device_info_plus=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/device_info_plus-10.1.2/
4 | package_info_plus=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/package_info_plus-8.0.2/
5 | path_provider=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/path_provider-2.1.4/
6 | path_provider_android=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/path_provider_android-2.2.10/
7 | path_provider_foundation=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/path_provider_foundation-2.4.0/
8 | path_provider_linux=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/path_provider_linux-2.2.1/
9 | path_provider_windows=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/path_provider_windows-2.3.0/
10 | permission_handler=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/permission_handler-11.3.1/
11 | permission_handler_android=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/permission_handler_android-12.0.12/
12 | permission_handler_apple=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/permission_handler_apple-9.4.5/
13 | permission_handler_html=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/permission_handler_html-0.1.3+2/
14 | permission_handler_windows=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/permission_handler_windows-0.2.1/
15 | shared_preferences=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-2.3.2/
16 | shared_preferences_android=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_android-2.3.2/
17 | shared_preferences_foundation=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_foundation-2.5.2/
18 | shared_preferences_linux=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_linux-2.4.1/
19 | shared_preferences_web=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_web-2.4.2/
20 | shared_preferences_windows=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_windows-2.4.1/
21 | url_launcher=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-6.3.0/
22 | url_launcher_android=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_android-6.3.10/
23 | url_launcher_ios=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_ios-6.3.1/
24 | url_launcher_linux=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_linux-3.2.0/
25 | url_launcher_macos=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_macos-3.2.0/
26 | url_launcher_web=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_web-2.3.3/
27 | url_launcher_windows=/Users/zhangyu/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_windows-3.1.2/
28 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
26 | /pubspec.lock
27 | **/doc/api/
28 | .dart_tool/
29 | build/
30 |
--------------------------------------------------------------------------------
/.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: "300451adae589accbece3490f4396f10bdf15e6e"
8 | channel: "stable"
9 |
10 | project_type: plugin
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: 300451adae589accbece3490f4396f10bdf15e6e
17 | base_revision: 300451adae589accbece3490f4396f10bdf15e6e
18 | - platform: android
19 | create_revision: 300451adae589accbece3490f4396f10bdf15e6e
20 | base_revision: 300451adae589accbece3490f4396f10bdf15e6e
21 | - platform: ios
22 | create_revision: 300451adae589accbece3490f4396f10bdf15e6e
23 | base_revision: 300451adae589accbece3490f4396f10bdf15e6e
24 |
25 | # User provided section
26 |
27 | # List of Local paths (relative to this file) that should be
28 | # ignored by the migrate tool.
29 | #
30 | # Files that are not part of the templates will be ignored by default.
31 | unmanaged_files:
32 | - 'lib/main.dart'
33 | - 'ios/Runner.xcodeproj/project.pbxproj'
34 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 0.0.1
2 |
3 | - Initial release
4 |
5 | ## 0.0.2
6 |
7 | - Modify README.md
8 |
9 | ## 0.0.3
10 |
11 | - Modify README.md
12 |
13 | ## 0.0.4
14 |
15 | - Adapted for Flutter version 3.22.2
16 |
17 | ## 0.0.5
18 |
19 | - Update pubspec.yaml description
20 |
21 | ## 0.1.0
22 |
23 | - Add PermissionUtil
24 | - Fix Android example code
25 |
26 | ## 0.2.0
27 |
28 | - Fixs
29 |
30 | ## 0.2.1
31 |
32 | - Fixs
33 |
34 | ## 0.2.1
35 |
36 | - Fixs
37 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2024 Kxmrg
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | include: package:flutter_lints/flutter.yaml
2 |
3 | # Additional information about this file can be found at
4 | # https://dart.dev/guides/language/analysis-options
5 |
--------------------------------------------------------------------------------
/assets/fonts/icon-antd.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/assets/fonts/icon-antd.ttf
--------------------------------------------------------------------------------
/assets/icons/ic_error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/assets/icons/ic_error.png
--------------------------------------------------------------------------------
/assets/icons/ic_info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/assets/icons/ic_info.png
--------------------------------------------------------------------------------
/assets/icons/ic_success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/assets/icons/ic_success.png
--------------------------------------------------------------------------------
/assets/icons/ic_warning.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/assets/icons/ic_warning.png
--------------------------------------------------------------------------------
/assets/svgs/error.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svgs/info.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svgs/question.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svgs/success.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svgs/time.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/svgs/warn.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Symbolication related
35 | app.*.symbols
36 |
37 | # Obfuscation related
38 | app.*.map.json
39 |
40 | # Android Studio will place build artifacts here
41 | /android/app/debug
42 | /android/app/profile
43 | /android/app/release
44 |
--------------------------------------------------------------------------------
/example/.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: "300451adae589accbece3490f4396f10bdf15e6e"
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: 300451adae589accbece3490f4396f10bdf15e6e
17 | base_revision: 300451adae589accbece3490f4396f10bdf15e6e
18 | - platform: android
19 | create_revision: 300451adae589accbece3490f4396f10bdf15e6e
20 | base_revision: 300451adae589accbece3490f4396f10bdf15e6e
21 | - platform: ios
22 | create_revision: 300451adae589accbece3490f4396f10bdf15e6e
23 | base_revision: 300451adae589accbece3490f4396f10bdf15e6e
24 | - platform: linux
25 | create_revision: 300451adae589accbece3490f4396f10bdf15e6e
26 | base_revision: 300451adae589accbece3490f4396f10bdf15e6e
27 | - platform: macos
28 | create_revision: 300451adae589accbece3490f4396f10bdf15e6e
29 | base_revision: 300451adae589accbece3490f4396f10bdf15e6e
30 | - platform: web
31 | create_revision: 300451adae589accbece3490f4396f10bdf15e6e
32 | base_revision: 300451adae589accbece3490f4396f10bdf15e6e
33 | - platform: windows
34 | create_revision: 300451adae589accbece3490f4396f10bdf15e6e
35 | base_revision: 300451adae589accbece3490f4396f10bdf15e6e
36 |
37 | # User provided section
38 |
39 | # List of Local paths (relative to this file) that should be
40 | # ignored by the migrate tool.
41 | #
42 | # Files that are not part of the templates will be ignored by default.
43 | unmanaged_files:
44 | - 'lib/main.dart'
45 | - 'ios/Runner.xcodeproj/project.pbxproj'
46 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | # example
2 |
3 | A new Flutter project.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
13 |
14 | For help getting started with Flutter development, view the
15 | [online documentation](https://docs.flutter.dev/), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/example/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at https://dart.dev/lints.
17 | #
18 | # Instead of disabling a lint rule for the entire project in the
19 | # section below, it can also be suppressed for a single line of code
20 | # or a specific dart file by using the `// ignore: name_of_lint` and
21 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
22 | # producing the lint.
23 | rules:
24 | constant_identifier_names: false
25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27 | # Additional information about this file can be found at
28 | # https://dart.dev/guides/language/analysis-options
29 |
--------------------------------------------------------------------------------
/example/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id "com.android.application"
3 | id "kotlin-android"
4 | id "dev.flutter.flutter-gradle-plugin"
5 | }
6 |
7 | def localProperties = new Properties()
8 | def localPropertiesFile = rootProject.file('local.properties')
9 | if (localPropertiesFile.exists()) {
10 | localPropertiesFile.withReader('UTF-8') { reader ->
11 | localProperties.load(reader)
12 | }
13 | }
14 |
15 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
16 | if (flutterVersionCode == null) {
17 | flutterVersionCode = '1'
18 | }
19 |
20 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
21 | if (flutterVersionName == null) {
22 | flutterVersionName = '1.0'
23 | }
24 |
25 | android {
26 | namespace "com.example.example"
27 | compileSdk 34
28 | ndkVersion flutter.ndkVersion
29 |
30 | compileOptions {
31 | sourceCompatibility JavaVersion.VERSION_1_8
32 | targetCompatibility JavaVersion.VERSION_1_8
33 | }
34 |
35 | kotlinOptions {
36 | jvmTarget = '1.8'
37 | }
38 |
39 | sourceSets {
40 | main.java.srcDirs += 'src/main/kotlin'
41 | }
42 |
43 | defaultConfig {
44 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
45 | applicationId "com.example.getx_scaffold"
46 | // You can update the following values to match your application needs.
47 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
48 | minSdkVersion flutter.minSdkVersion
49 | targetSdkVersion flutter.targetSdkVersion
50 | versionCode flutterVersionCode.toInteger()
51 | versionName flutterVersionName
52 | }
53 |
54 | buildTypes {
55 | release {
56 | // TODO: Add your own signing config for the release build.
57 | // Signing with the debug keys for now, so `flutter run --release` works.
58 | signingConfig signingConfigs.debug
59 | }
60 | }
61 | }
62 |
63 | flutter {
64 | source '../..'
65 | }
66 |
67 | dependencies {
68 | }
69 |
70 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
12 |
14 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
28 |
36 |
40 |
44 |
45 |
46 |
47 |
48 |
49 |
51 |
54 |
55 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/example/android/app/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.example
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity()
6 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-hdpi/android12splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-hdpi/android12splash.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-hdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-hdpi/splash.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-mdpi/android12splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-mdpi/android12splash.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-mdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-mdpi/splash.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-night-hdpi/android12splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-night-hdpi/android12splash.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-night-hdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-night-hdpi/splash.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-night-mdpi/android12splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-night-mdpi/android12splash.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-night-mdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-night-mdpi/splash.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-night-v21/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-night-v21/background.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-night-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 | -
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-night-xhdpi/android12splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-night-xhdpi/android12splash.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-night-xhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-night-xhdpi/splash.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-night-xxhdpi/android12splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-night-xxhdpi/android12splash.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-night-xxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-night-xxhdpi/splash.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-night-xxxhdpi/android12splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-night-xxxhdpi/android12splash.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-night-xxxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-night-xxxhdpi/splash.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-night/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-night/background.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-night/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 | -
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-v21/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-v21/background.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 | -
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-xhdpi/android12splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-xhdpi/android12splash.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-xhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-xhdpi/splash.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-xxhdpi/android12splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-xxhdpi/android12splash.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-xxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-xxhdpi/splash.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-xxxhdpi/android12splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-xxxhdpi/android12splash.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-xxxhdpi/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable-xxxhdpi/splash.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/drawable/background.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 | -
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values-night-v31/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
18 |
21 |
22 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
19 |
22 |
23 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values-v31/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
18 |
21 |
22 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFFFF
4 |
5 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
19 |
22 |
23 |
--------------------------------------------------------------------------------
/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | allprojects {
2 | repositories {
3 | // google()
4 | // mavenCentral()
5 | maven { url 'https://maven.aliyun.com/repository/google' }//google
6 | maven { url 'https://maven.aliyun.com/repository/central' }//central
7 | maven { url 'https://maven.aliyun.com/repository/public' }//jcenter//public
8 | maven { url 'https://maven.aliyun.com/repository/gradle-plugin'}//gradle-plugin
9 | }
10 | }
11 |
12 | rootProject.buildDir = '../build'
13 | subprojects {
14 | project.buildDir = "${rootProject.buildDir}/${project.name}"
15 | }
16 | subprojects {
17 | project.evaluationDependsOn(':app')
18 | }
19 |
20 | tasks.register("clean", Delete) {
21 | delete rootProject.buildDir
22 | }
23 |
24 |
25 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx4G
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
6 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | def flutterSdkPath = {
3 | def properties = new Properties()
4 | file("local.properties").withInputStream { properties.load(it) }
5 | def flutterSdkPath = properties.getProperty("flutter.sdk")
6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7 | return flutterSdkPath
8 | }
9 | settings.ext.flutterSdkPath = flutterSdkPath()
10 |
11 | includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
12 |
13 | repositories {
14 | google()
15 | mavenCentral()
16 | gradlePluginPortal()
17 | }
18 | }
19 |
20 | plugins {
21 | id "dev.flutter.flutter-plugin-loader" version "1.0.0"
22 | id "com.android.application" version "7.3.0" apply false
23 | id "org.jetbrains.kotlin.android" version "1.7.10" apply false
24 | }
25 |
26 | include ":app"
27 |
--------------------------------------------------------------------------------
/example/assets/fonts/Montserrat-Black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/assets/fonts/Montserrat-Black.ttf
--------------------------------------------------------------------------------
/example/assets/fonts/Montserrat-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/assets/fonts/Montserrat-Bold.ttf
--------------------------------------------------------------------------------
/example/assets/fonts/Montserrat-ExtraBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/assets/fonts/Montserrat-ExtraBold.ttf
--------------------------------------------------------------------------------
/example/assets/fonts/Montserrat-ExtraLight.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/assets/fonts/Montserrat-ExtraLight.ttf
--------------------------------------------------------------------------------
/example/assets/fonts/Montserrat-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/assets/fonts/Montserrat-Light.ttf
--------------------------------------------------------------------------------
/example/assets/fonts/Montserrat-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/assets/fonts/Montserrat-Medium.ttf
--------------------------------------------------------------------------------
/example/assets/fonts/Montserrat-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/assets/fonts/Montserrat-Regular.ttf
--------------------------------------------------------------------------------
/example/assets/fonts/Montserrat-SemiBold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/assets/fonts/Montserrat-SemiBold.ttf
--------------------------------------------------------------------------------
/example/assets/fonts/Montserrat-Thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/assets/fonts/Montserrat-Thin.ttf
--------------------------------------------------------------------------------
/example/assets/icons/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/assets/icons/ic_launcher.png
--------------------------------------------------------------------------------
/example/assets/icons/ic_launcher_adaptive.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/assets/icons/ic_launcher_adaptive.png
--------------------------------------------------------------------------------
/example/assets/icons/ic_launcher_adaptive_dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/assets/icons/ic_launcher_adaptive_dark.png
--------------------------------------------------------------------------------
/example/assets/images/captcha_bg1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/assets/images/captcha_bg1.jpg
--------------------------------------------------------------------------------
/example/assets/images/captcha_bg2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/assets/images/captcha_bg2.jpg
--------------------------------------------------------------------------------
/example/assets/images/captcha_bg3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/assets/images/captcha_bg3.jpg
--------------------------------------------------------------------------------
/example/assets/images/captcha_bg4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/assets/images/captcha_bg4.jpg
--------------------------------------------------------------------------------
/example/assets/svgs/icon1.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/example/flutter_01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/flutter_01.png
--------------------------------------------------------------------------------
/example/flutter_02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/flutter_02.png
--------------------------------------------------------------------------------
/example/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/example/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 12.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '12.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | target 'RunnerTests' do
36 | inherit! :search_paths
37 | end
38 | end
39 |
40 | post_install do |installer|
41 | installer.pods_project.targets.each do |target|
42 | flutter_additional_ios_build_settings(target)
43 | target.build_configurations.each do |config|
44 | config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
45 | '$(inherited)',
46 | 'PERMISSION_CAMERA=1',
47 | 'PERMISSION_PHOTOS=1',
48 | 'PERMISSION_BLUETOOTH=1',
49 | 'PERMISSION_MICROPHONE=1',
50 | ]
51 | end
52 | end
53 | end
54 |
--------------------------------------------------------------------------------
/example/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - connectivity_plus (0.0.1):
3 | - Flutter
4 | - FlutterMacOS
5 | - device_info_plus (0.0.1):
6 | - Flutter
7 | - Flutter (1.0.0)
8 | - flutter_native_splash (0.0.1):
9 | - Flutter
10 | - package_info_plus (0.4.5):
11 | - Flutter
12 | - path_provider_foundation (0.0.1):
13 | - Flutter
14 | - FlutterMacOS
15 | - permission_handler_apple (9.3.0):
16 | - Flutter
17 | - shared_preferences_foundation (0.0.1):
18 | - Flutter
19 | - FlutterMacOS
20 | - url_launcher_ios (0.0.1):
21 | - Flutter
22 |
23 | DEPENDENCIES:
24 | - connectivity_plus (from `.symlinks/plugins/connectivity_plus/darwin`)
25 | - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
26 | - Flutter (from `Flutter`)
27 | - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
28 | - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
29 | - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
30 | - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
31 | - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
32 | - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
33 |
34 | EXTERNAL SOURCES:
35 | connectivity_plus:
36 | :path: ".symlinks/plugins/connectivity_plus/darwin"
37 | device_info_plus:
38 | :path: ".symlinks/plugins/device_info_plus/ios"
39 | Flutter:
40 | :path: Flutter
41 | flutter_native_splash:
42 | :path: ".symlinks/plugins/flutter_native_splash/ios"
43 | package_info_plus:
44 | :path: ".symlinks/plugins/package_info_plus/ios"
45 | path_provider_foundation:
46 | :path: ".symlinks/plugins/path_provider_foundation/darwin"
47 | permission_handler_apple:
48 | :path: ".symlinks/plugins/permission_handler_apple/ios"
49 | shared_preferences_foundation:
50 | :path: ".symlinks/plugins/shared_preferences_foundation/darwin"
51 | url_launcher_ios:
52 | :path: ".symlinks/plugins/url_launcher_ios/ios"
53 |
54 | SPEC CHECKSUMS:
55 | connectivity_plus: ddd7f30999e1faaef5967c23d5b6d503d10434db
56 | device_info_plus: 97af1d7e84681a90d0693e63169a5d50e0839a0d
57 | Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
58 | flutter_native_splash: edf599c81f74d093a4daf8e17bd7a018854bc778
59 | package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c
60 | path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
61 | permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
62 | shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
63 | url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
64 |
65 | PODFILE CHECKSUM: 0be366c6aab056cfc935b79bc6f19b50721d2a94
66 |
67 | COCOAPODS: 1.15.2
68 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @main
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images": [
3 | {
4 | "filename": "Icon-App-20x20@2x.png",
5 | "idiom": "iphone",
6 | "scale": "2x",
7 | "size": "20x20"
8 | },
9 | {
10 | "filename": "Icon-App-20x20@3x.png",
11 | "idiom": "iphone",
12 | "scale": "3x",
13 | "size": "20x20"
14 | },
15 | {
16 | "filename": "Icon-App-29x29@1x.png",
17 | "idiom": "iphone",
18 | "scale": "1x",
19 | "size": "29x29"
20 | },
21 | {
22 | "filename": "Icon-App-29x29@2x.png",
23 | "idiom": "iphone",
24 | "scale": "2x",
25 | "size": "29x29"
26 | },
27 | {
28 | "filename": "Icon-App-29x29@3x.png",
29 | "idiom": "iphone",
30 | "scale": "3x",
31 | "size": "29x29"
32 | },
33 | {
34 | "filename": "Icon-App-40x40@2x.png",
35 | "idiom": "iphone",
36 | "scale": "2x",
37 | "size": "40x40"
38 | },
39 | {
40 | "filename": "Icon-App-40x40@3x.png",
41 | "idiom": "iphone",
42 | "scale": "3x",
43 | "size": "40x40"
44 | },
45 | {
46 | "filename": "Icon-App-60x60@2x.png",
47 | "idiom": "iphone",
48 | "scale": "2x",
49 | "size": "60x60"
50 | },
51 | {
52 | "filename": "Icon-App-60x60@3x.png",
53 | "idiom": "iphone",
54 | "scale": "3x",
55 | "size": "60x60"
56 | },
57 | {
58 | "filename": "Icon-App-20x20@1x.png",
59 | "idiom": "ipad",
60 | "scale": "1x",
61 | "size": "20x20"
62 | },
63 | {
64 | "filename": "Icon-App-20x20@2x.png",
65 | "idiom": "ipad",
66 | "scale": "2x",
67 | "size": "20x20"
68 | },
69 | {
70 | "filename": "Icon-App-29x29@1x.png",
71 | "idiom": "ipad",
72 | "scale": "1x",
73 | "size": "29x29"
74 | },
75 | {
76 | "filename": "Icon-App-29x29@2x.png",
77 | "idiom": "ipad",
78 | "scale": "2x",
79 | "size": "29x29"
80 | },
81 | {
82 | "filename": "Icon-App-40x40@1x.png",
83 | "idiom": "ipad",
84 | "scale": "1x",
85 | "size": "40x40"
86 | },
87 | {
88 | "filename": "Icon-App-40x40@2x.png",
89 | "idiom": "ipad",
90 | "scale": "2x",
91 | "size": "40x40"
92 | },
93 | {
94 | "filename": "Icon-App-76x76@1x.png",
95 | "idiom": "ipad",
96 | "scale": "1x",
97 | "size": "76x76"
98 | },
99 | {
100 | "filename": "Icon-App-76x76@2x.png",
101 | "idiom": "ipad",
102 | "scale": "2x",
103 | "size": "76x76"
104 | },
105 | {
106 | "filename": "Icon-App-83.5x83.5@2x.png",
107 | "idiom": "ipad",
108 | "scale": "2x",
109 | "size": "83.5x83.5"
110 | },
111 | {
112 | "filename": "Icon-App-1024x1024@1x.png",
113 | "idiom": "ios-marketing",
114 | "scale": "1x",
115 | "size": "1024x1024"
116 | }
117 | ],
118 | "info": {
119 | "author": "icons_launcher",
120 | "version": 1
121 | }
122 | }
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "background.png",
5 | "idiom" : "universal"
6 | },
7 | {
8 | "appearances" : [
9 | {
10 | "appearance" : "luminosity",
11 | "value" : "dark"
12 | }
13 | ],
14 | "filename" : "darkbackground.png",
15 | "idiom" : "universal"
16 | }
17 | ],
18 | "info" : {
19 | "author" : "xcode",
20 | "version" : 1
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchBackground.imageset/darkbackground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/LaunchBackground.imageset/darkbackground.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "LaunchImage.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "appearances" : [
10 | {
11 | "appearance" : "luminosity",
12 | "value" : "dark"
13 | }
14 | ],
15 | "filename" : "LaunchImageDark.png",
16 | "idiom" : "universal",
17 | "scale" : "1x"
18 | },
19 | {
20 | "filename" : "LaunchImage@2x.png",
21 | "idiom" : "universal",
22 | "scale" : "2x"
23 | },
24 | {
25 | "appearances" : [
26 | {
27 | "appearance" : "luminosity",
28 | "value" : "dark"
29 | }
30 | ],
31 | "filename" : "LaunchImageDark@2x.png",
32 | "idiom" : "universal",
33 | "scale" : "2x"
34 | },
35 | {
36 | "filename" : "LaunchImage@3x.png",
37 | "idiom" : "universal",
38 | "scale" : "3x"
39 | },
40 | {
41 | "appearances" : [
42 | {
43 | "appearance" : "luminosity",
44 | "value" : "dark"
45 | }
46 | ],
47 | "filename" : "LaunchImageDark@3x.png",
48 | "idiom" : "universal",
49 | "scale" : "3x"
50 | }
51 | ],
52 | "info" : {
53 | "author" : "xcode",
54 | "version" : 1
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImageDark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImageDark.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImageDark@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImageDark@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImageDark@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImageDark@3x.png
--------------------------------------------------------------------------------
/example/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.
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | GetxScaffold
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | GetxScaffold
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(FLUTTER_BUILD_NUMBER)
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | CADisableMinimumFrameDurationOnPhone
45 |
46 | UIApplicationSupportsIndirectInputEvents
47 |
48 | UIStatusBarHidden
49 |
50 | LSApplicationQueriesSchemes
51 |
52 | sms
53 | tel
54 |
55 | NSCameraUsageDescription
56 | 应用程序请求访问摄像头
57 | NSMicrophoneUsageDescription
58 | 应用程序请求访问麦克风
59 | NSPhotoLibraryAddUsageDescription
60 | 应用程序请求相册访问权限
61 | NSPhotoLibraryUsageDescription
62 | 应用程序请求相册访问权限
63 | NSBluetoothPeripheralUsageDescription
64 | 应用程序请求蓝牙访问权限
65 | NSBluetoothAlwaysUsageDescription
66 | 应用程序请求蓝牙访问权限
67 |
68 |
69 |
--------------------------------------------------------------------------------
/example/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/example/ios/RunnerTests/RunnerTests.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
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 |
--------------------------------------------------------------------------------
/example/lib/common/langs/index.dart:
--------------------------------------------------------------------------------
1 | library langs;
2 |
3 | export 'text_key.dart';
4 | export 'translation_library.dart';
5 |
--------------------------------------------------------------------------------
/example/lib/common/langs/locales/locale_en.dart:
--------------------------------------------------------------------------------
1 | import 'package:example/common/langs/text_key.dart';
2 |
3 | const Map en = {
4 | TextKey.zhuTi: 'Theme',
5 | TextKey.genSuiXiTong: 'Follow System',
6 | TextKey.liangSeZhuTi: 'Light Mode',
7 | TextKey.anSeZhuTi: 'Dark Mode',
8 | TextKey.yuYan: 'Language',
9 | TextKey.yingYongBanBen: 'App Version',
10 | TextKey.sheBeiXinXi: 'Device Info',
11 | TextKey.huoQuDangQianShiJianChuo: 'Current time stamp',
12 | TextKey.shiJianChuoZhuanRiQi: 'Timestamp to date',
13 | TextKey.queRenWangLuoLianJie: 'Check the network connection',
14 | TextKey.daKaiWangYe: 'Open web page',
15 | TextKey.boDaDianHua: 'Call phone',
16 | TextKey.jiChuZuJian: 'Base Widget',
17 | TextKey.duiHuaKuang: 'Dialog',
18 | TextKey.wangLuoQingQiu: 'Network request',
19 | TextKey.md5JiaMi: 'Md5 encryption',
20 | TextKey.base64BianMa: 'Base64 encoding',
21 | TextKey.xianShiLoading: 'Show Loading',
22 | TextKey.xianShiError: 'Show Error',
23 | TextKey.shiYongZhuTiSe: 'Use theme color',
24 | TextKey.jiZaiRongQiZuJian: 'Loading container widget',
25 | TextKey.qingChuTuPianHuanCun: 'Clear disk cached images',
26 | TextKey.shenQingQuanXian: 'Request permission',
27 | };
28 |
--------------------------------------------------------------------------------
/example/lib/common/langs/locales/locale_es.dart:
--------------------------------------------------------------------------------
1 | import 'package:example/common/langs/text_key.dart';
2 |
3 | const Map es = {
4 | TextKey.zhuTi: 'Tema',
5 | TextKey.genSuiXiTong: 'Sistema de seguimiento',
6 | TextKey.liangSeZhuTi: 'Tema de color brillante',
7 | TextKey.anSeZhuTi: 'Tema oscuro',
8 | TextKey.yuYan: 'Idiomas',
9 | TextKey.yingYongBanBen: 'Versión de la aplicación',
10 | TextKey.sheBeiXinXi: 'Información del equipo',
11 | TextKey.huoQuDangQianShiJianChuo: 'Marca de tiempo actual',
12 | TextKey.shiJianChuoZhuanRiQi: 'Marca de tiempo a fecha',
13 | TextKey.queRenWangLuoLianJie: 'Comprobar la conexión a la red',
14 | TextKey.daKaiWangYe: 'Abrir página web',
15 | TextKey.boDaDianHua: 'Llamar',
16 | TextKey.jiChuZuJian: 'Componentes básicos',
17 | TextKey.duiHuaKuang: 'Diálogo',
18 | TextKey.wangLuoQingQiu: 'Solicitud de red',
19 | TextKey.md5JiaMi: 'Cifrado MD5',
20 | TextKey.base64BianMa: 'Codificación base64',
21 | TextKey.xianShiLoading: 'Mostrar carga',
22 | TextKey.xianShiError: 'Error de visualización',
23 | TextKey.shiYongZhuTiSe: 'Usar colores temáticos',
24 | TextKey.jiZaiRongQiZuJian: 'Componentes del contenedor de carga',
25 | TextKey.qingChuTuPianHuanCun: 'Borrar toda la caché de imágenes',
26 | TextKey.shenQingQuanXian: 'Autoridad de solicitud',
27 | };
28 |
--------------------------------------------------------------------------------
/example/lib/common/langs/locales/locale_zh.dart:
--------------------------------------------------------------------------------
1 | import 'package:example/common/langs/text_key.dart';
2 |
3 | const Map zh = {
4 | TextKey.zhuTi: '主题',
5 | TextKey.genSuiXiTong: '跟随系统',
6 | TextKey.liangSeZhuTi: '亮色主题',
7 | TextKey.anSeZhuTi: '暗色主题',
8 | TextKey.yuYan: '语言',
9 | TextKey.yingYongBanBen: '应用版本',
10 | TextKey.sheBeiXinXi: '设备信息',
11 | TextKey.huoQuDangQianShiJianChuo: '获取当前时间戳',
12 | TextKey.shiJianChuoZhuanRiQi: '时间戳转日期',
13 | TextKey.queRenWangLuoLianJie: '确认网络连接',
14 | TextKey.daKaiWangYe: '打开网页',
15 | TextKey.boDaDianHua: '拨打电话',
16 | TextKey.jiChuZuJian: '基础组件',
17 | TextKey.duiHuaKuang: '对话框',
18 | TextKey.wangLuoQingQiu: '网络请求',
19 | TextKey.md5JiaMi: 'Md5 加密',
20 | TextKey.base64BianMa: 'Base64 编码',
21 | TextKey.xianShiLoading: '显示Loading',
22 | TextKey.xianShiError: '显示Error',
23 | TextKey.shiYongZhuTiSe: '使用主题色',
24 | TextKey.jiZaiRongQiZuJian: '加载容器组件',
25 | TextKey.qingChuTuPianHuanCun: '清除全部图片缓存',
26 | TextKey.shenQingQuanXian: '申请权限',
27 | };
28 |
--------------------------------------------------------------------------------
/example/lib/common/langs/text_key.dart:
--------------------------------------------------------------------------------
1 | class TextKey {
2 | static const zhuTi = 'zhuTi';
3 | static const genSuiXiTong = 'genSuiXiTong';
4 | static const liangSeZhuTi = 'liangSeZhuTi';
5 | static const anSeZhuTi = 'anSeZhuTi';
6 | static const yuYan = 'yuYan';
7 | static const yingYongBanBen = 'yingYongBanBen';
8 | static const sheBeiXinXi = 'sheBeiXinXi';
9 | static const huoQuDangQianShiJianChuo = 'huoQuDangQianShiJianChuo';
10 | static const shiJianChuoZhuanRiQi = 'shiJianChuoZhuanRiQi';
11 | static const queRenWangLuoLianJie = 'queRenWangLuoLianJie';
12 | static const daKaiWangYe = 'daKaiWangYe';
13 | static const boDaDianHua = 'boDaDianHua';
14 | static const jiChuZuJian = 'jiChuZuJian';
15 | static const duiHuaKuang = 'duiHuaKuang';
16 | static const wangLuoQingQiu = 'wangLuoQingQiu';
17 | static const md5JiaMi = 'md5JiaMi';
18 | static const base64BianMa = 'base64BianMa';
19 | static const xianShiLoading = 'xianShiLoading';
20 | static const xianShiError = 'xianShiError';
21 | static const shiYongZhuTiSe = 'shiYongZhuTiSe';
22 | static const jiZaiRongQiZuJian = 'jiZaiRongQiZuJian';
23 | static const qingChuTuPianHuanCun = 'qingChuTuPianHuanCun';
24 | static const shenQingQuanXian = 'shenQingQuanXian';
25 | }
26 |
--------------------------------------------------------------------------------
/example/lib/common/langs/translation_library.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_localizations/flutter_localizations.dart';
2 | import 'package:getx_scaffold/getx_scaffold.dart';
3 |
4 | import 'locales/locale_en.dart';
5 | import 'locales/locale_es.dart';
6 | import 'locales/locale_zh.dart';
7 |
8 | class TranslationLibrary extends Translations {
9 | // 默认语言 Locale(语言代码, 国家代码)
10 | static const fallbackLocale = Locale('zh', 'CN');
11 |
12 | static const supportedLocales = [
13 | Locale('zh', 'CN'),
14 | Locale('en', 'US'),
15 | Locale('es', 'ES'),
16 | ];
17 |
18 | @override
19 | Map> get keys => {
20 | 'zh': zh,
21 | 'en': en,
22 | 'es': es,
23 | };
24 |
25 | static const localizationsDelegates = [
26 | GlobalMaterialLocalizations.delegate,
27 | GlobalWidgetsLocalizations.delegate,
28 | GlobalCupertinoLocalizations.delegate,
29 | ];
30 | }
31 |
--------------------------------------------------------------------------------
/example/lib/common/model/base_model.dart:
--------------------------------------------------------------------------------
1 | class BaseModel {
2 | bool? success;
3 | String? type;
4 | String? url;
5 |
6 | BaseModel({this.success, this.type, this.url});
7 |
8 | factory BaseModel.fromJson(Map json) => BaseModel(
9 | success: json['success']?.toString().contains("true"),
10 | type: json['type']?.toString(),
11 | url: json['url']?.toString(),
12 | );
13 |
14 | Map toJson() => {
15 | if (success != null) 'success': success,
16 | if (type != null) 'type': type,
17 | if (url != null) 'url': url,
18 | };
19 | }
20 |
--------------------------------------------------------------------------------
/example/lib/common/styles/theme.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class AppTheme {
4 | static const String Font_Montserrat = 'Montserrat';
5 |
6 | static const String Font_YuYang = 'YuYang';
7 |
8 | static const Color themeColor = Color(0xFFE73B26);
9 |
10 | static const Color secondaryColor = Colors.orange;
11 |
12 | static const Color darkThemeColor = Color(0xFF032896);
13 |
14 | /// 亮色主题样式
15 | static ThemeData light = ThemeData(
16 | useMaterial3: false,
17 | fontFamily: Font_Montserrat,
18 | colorScheme: ColorScheme.fromSeed(
19 | seedColor: themeColor,
20 | primary: themeColor,
21 | secondary: secondaryColor,
22 | brightness: Brightness.light,
23 | surface: Colors.white,
24 | surfaceTint: Colors.transparent,
25 | ),
26 | appBarTheme: const AppBarTheme(
27 | backgroundColor: Colors.white,
28 | foregroundColor: Color.fromARGB(200, 0, 0, 0),
29 | centerTitle: true,
30 | titleTextStyle: TextStyle(
31 | fontSize: 18,
32 | fontWeight: FontWeight.bold,
33 | color: Color.fromARGB(200, 0, 0, 0),
34 | ),
35 | ),
36 | );
37 |
38 | /// 暗色主题样式
39 | static ThemeData dark = ThemeData(
40 | useMaterial3: false,
41 | fontFamily: Font_Montserrat,
42 | colorScheme: ColorScheme.fromSeed(
43 | seedColor: darkThemeColor,
44 | brightness: Brightness.dark,
45 | surface: const Color.fromARGB(255, 42, 42, 42),
46 | surfaceTint: Colors.transparent,
47 | ),
48 | appBarTheme: const AppBarTheme(
49 | backgroundColor: Color.fromARGB(255, 34, 34, 34),
50 | centerTitle: true,
51 | titleTextStyle: TextStyle(
52 | fontSize: 18,
53 | fontWeight: FontWeight.bold,
54 | ),
55 | ),
56 | bottomAppBarTheme: const BottomAppBarTheme(
57 | color: Color.fromARGB(255, 34, 34, 34),
58 | ),
59 | );
60 | }
61 |
--------------------------------------------------------------------------------
/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:example/common/langs/index.dart';
2 | import 'package:example/pages/home/index.dart';
3 | import 'package:example/common/styles/theme.dart';
4 | import 'package:flutter/foundation.dart';
5 | import 'package:flutter_native_splash/flutter_native_splash.dart';
6 | import 'package:getx_scaffold/getx_scaffold.dart';
7 |
8 | /**
9 | * @author: Kxmrg
10 | * @github: https://github.com/Kxmrg
11 | * @version: 1.0.0
12 | * @copyright: Copyright © 2023-2024 Kxmrg
13 | * @license: MIT License
14 | * @date: 2024-07-03
15 | * @description:
16 | */
17 |
18 | /// Main
19 | void main() async {
20 | WidgetsBinding widgetsBinding = await init(
21 | isDebug: kDebugMode,
22 | logTag: 'GetxScaffold',
23 | supportedLocales: TranslationLibrary.supportedLocales,
24 | );
25 | FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
26 | runApp(
27 | GetxApp(
28 | // 设计稿尺寸 单位:dp
29 | designSize: const Size(390, 844),
30 | // Getx Log
31 | enableLog: kDebugMode,
32 | // 默认的跳转动画
33 | defaultTransition: Transition.rightToLeft,
34 | // 主题模式
35 | themeMode: GlobalService.to.themeMode,
36 | // 主题
37 | theme: AppTheme.light,
38 | // Dark主题
39 | darkTheme: AppTheme.dark,
40 | // 国际化配置
41 | locale: GlobalService.to.locale,
42 | translations: TranslationLibrary(),
43 | fallbackLocale: TranslationLibrary.fallbackLocale,
44 | supportedLocales: TranslationLibrary.supportedLocales,
45 | localizationsDelegates: TranslationLibrary.localizationsDelegates,
46 | // AppTitle
47 | title: 'GetxScaffold',
48 | // 首页
49 | home: const HomePage(),
50 | // Builder
51 | builder: (context, widget) {
52 | // do something....
53 | return widget!;
54 | },
55 | ),
56 | );
57 | }
58 |
--------------------------------------------------------------------------------
/example/lib/pages/base_widgets/controller.dart:
--------------------------------------------------------------------------------
1 | import 'package:getx_scaffold/getx_scaffold.dart';
2 |
3 | class BaseWidgetsController extends GetxController with BaseControllerMixin {
4 | @override
5 | String get builderId => 'baseWidgets';
6 |
7 | BaseWidgetsController();
8 |
9 | bool showDot = true;
10 | int number = 0;
11 | int pageIndex = 0;
12 |
13 | void increment() {
14 | number++;
15 | updateUi();
16 | }
17 |
18 | void updateDot() {
19 | showDot = !showDot;
20 | updateUi();
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/example/lib/pages/base_widgets/index.dart:
--------------------------------------------------------------------------------
1 | library base_widgets;
2 |
3 | export 'controller.dart';
4 | export 'view.dart';
5 |
--------------------------------------------------------------------------------
/example/lib/pages/dialog/controller.dart:
--------------------------------------------------------------------------------
1 | import 'package:getx_scaffold/getx_scaffold.dart';
2 |
3 | class DialogController extends GetxController with BaseControllerMixin {
4 | @override
5 | String get builderId => 'dialog';
6 |
7 | DialogController();
8 | }
9 |
--------------------------------------------------------------------------------
/example/lib/pages/dialog/index.dart:
--------------------------------------------------------------------------------
1 | library dialog;
2 |
3 | export 'controller.dart';
4 | export 'view.dart';
5 |
--------------------------------------------------------------------------------
/example/lib/pages/home/controller.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_native_splash/flutter_native_splash.dart';
2 | import 'package:getx_scaffold/getx_scaffold.dart';
3 |
4 | class HomeController extends GetxController with BaseControllerMixin {
5 | @override
6 | String get builderId => 'home';
7 |
8 | HomeController();
9 |
10 | @override
11 | void onInit() {
12 | super.onInit();
13 | FlutterNativeSplash.remove();
14 | }
15 |
16 | /// 是否监听生命周期事件
17 | @override
18 | bool get listenLifecycleEvent => true;
19 |
20 | /// listenLifecycleEvent设置为true时,会调用以下生命周期方法
21 | @override
22 | void onDetached() {
23 | log('onDetached');
24 | }
25 |
26 | @override
27 | void onHidden() {
28 | log('onHidden');
29 | }
30 |
31 | @override
32 | void onInactive() {
33 | log('onInactive');
34 | }
35 |
36 | @override
37 | void onPaused() {
38 | log('onPaused');
39 | }
40 |
41 | @override
42 | void onResumed() {
43 | log('onResumed');
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/example/lib/pages/home/index.dart:
--------------------------------------------------------------------------------
1 | library home;
2 |
3 | export 'controller.dart';
4 | export 'view.dart';
5 |
--------------------------------------------------------------------------------
/example/lib/pages/language/controller.dart:
--------------------------------------------------------------------------------
1 | import 'package:getx_scaffold/getx_scaffold.dart';
2 |
3 | class LanguageController extends GetxController with BaseControllerMixin {
4 | @override
5 | String get builderId => 'language';
6 |
7 | LanguageController();
8 | }
9 |
--------------------------------------------------------------------------------
/example/lib/pages/language/index.dart:
--------------------------------------------------------------------------------
1 | library language;
2 |
3 | export 'controller.dart';
4 | export 'view.dart';
5 |
--------------------------------------------------------------------------------
/example/lib/pages/language/view.dart:
--------------------------------------------------------------------------------
1 | import 'package:example/common/langs/index.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:getx_scaffold/getx_scaffold.dart';
4 |
5 | import 'index.dart';
6 |
7 | class LanguagePage extends GetView {
8 | const LanguagePage({super.key});
9 |
10 | // 主视图
11 | Widget _buildView() {
12 | return [
13 | ListTile(
14 | title: const Text('简体中文'),
15 | trailing: GlobalService.to.locale == const Locale('zh', 'CN')
16 | ? const Icon(Icons.check)
17 | : null,
18 | onTap: () {
19 | changeLanguage(const Locale('zh', 'CN'));
20 | },
21 | ),
22 | ListTile(
23 | title: const Text('English'),
24 | trailing: GlobalService.to.locale == const Locale('en', 'US')
25 | ? const Icon(Icons.check)
26 | : null,
27 | onTap: () {
28 | changeLanguage(const Locale('en', 'US'));
29 | },
30 | ),
31 | ListTile(
32 | title: const Text('Spanish'),
33 | trailing: GlobalService.to.locale == const Locale('es', 'ES')
34 | ? const Icon(Icons.check)
35 | : null,
36 | onTap: () {
37 | changeLanguage(const Locale('es', 'ES'));
38 | },
39 | ),
40 | ].toListView(
41 | separator: const DividerX(),
42 | );
43 | }
44 |
45 | @override
46 | Widget build(BuildContext context) {
47 | return GetBuilder(
48 | init: LanguageController(),
49 | id: 'language',
50 | builder: (_) {
51 | return Scaffold(
52 | appBar: AppBar(title: Text(TextKey.yuYan.tr), elevation: 1),
53 | body: SafeArea(
54 | child: _buildView(),
55 | ),
56 | );
57 | },
58 | );
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/example/lib/pages/load_container/controller.dart:
--------------------------------------------------------------------------------
1 | import 'package:getx_scaffold/getx_scaffold.dart';
2 |
3 | class LoadContainerController extends GetxController with BaseControllerMixin {
4 | @override
5 | String get builderId => 'loadContainer';
6 |
7 | LoadController? loadController = LoadController();
8 |
9 | @override
10 | void onInit() {
11 | super.onInit();
12 | onLoad();
13 | }
14 |
15 | @override
16 | void onClose() {
17 | super.onClose();
18 | loadController?.dispose();
19 | loadController = null;
20 | }
21 |
22 | void onLoad() {
23 | loadController?.loading();
24 | delayed(3000, () => loadController?.complete());
25 | }
26 |
27 | void onEmpty() {
28 | loadController?.loading();
29 | delayed(3000, () => loadController?.empty());
30 | }
31 |
32 | void onError() {
33 | loadController?.loading();
34 | delayed(3000, () => loadController?.error());
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/example/lib/pages/load_container/index.dart:
--------------------------------------------------------------------------------
1 | library load_container;
2 |
3 | export 'controller.dart';
4 | export 'view.dart';
5 |
--------------------------------------------------------------------------------
/example/lib/pages/load_container/view.dart:
--------------------------------------------------------------------------------
1 | import 'package:example/common/langs/index.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:getx_scaffold/getx_scaffold.dart';
4 |
5 | import 'index.dart';
6 |
7 | class LoadContainerPage extends GetView {
8 | const LoadContainerPage({super.key});
9 |
10 | // 主视图
11 | Widget _buildView() {
12 | return [
13 | TextX.titleLarge('Page contents'),
14 | ButtonX(
15 | 'Show Load Error',
16 | onPressed: () => controller.onError(),
17 | ).width(double.infinity).padding(top: 30.h, horizontal: 50.w),
18 | ButtonX(
19 | 'Show Load Empty',
20 | onPressed: () => controller.onEmpty(),
21 | ).width(double.infinity).padding(top: 10.h, horizontal: 50.w),
22 | ].toColumn(mainAxisSize: MainAxisSize.min).center();
23 | }
24 |
25 | @override
26 | Widget build(BuildContext context) {
27 | return GetBuilder(
28 | init: LoadContainerController(),
29 | id: 'loadContainer',
30 | builder: (_) {
31 | return Scaffold(
32 | appBar:
33 | AppBar(title: Text(TextKey.jiZaiRongQiZuJian.tr), elevation: 1),
34 | body: SafeArea(
35 | child: LoadContainer(
36 | controller: controller.loadController!,
37 | onReLoad: controller.onLoad,
38 | child: _buildView(),
39 | ),
40 | ),
41 | );
42 | },
43 | );
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/example/lib/pages/network/controller.dart:
--------------------------------------------------------------------------------
1 | import 'package:getx_scaffold/getx_scaffold.dart';
2 |
3 | class NetworkController extends GetxController with BaseControllerMixin {
4 | @override
5 | String get builderId => 'network';
6 |
7 | CancelToken? cancelToken;
8 |
9 | NetworkController();
10 | }
11 |
--------------------------------------------------------------------------------
/example/lib/pages/network/index.dart:
--------------------------------------------------------------------------------
1 | library network;
2 |
3 | export 'controller.dart';
4 | export 'view.dart';
5 |
--------------------------------------------------------------------------------
/example/lib/pages/permission/controller.dart:
--------------------------------------------------------------------------------
1 | import 'package:getx_scaffold/getx_scaffold.dart';
2 |
3 | class PermissionController extends GetxController with BaseControllerMixin {
4 | @override
5 | String get builderId => 'permission';
6 |
7 | PermissionController();
8 | }
9 |
--------------------------------------------------------------------------------
/example/lib/pages/permission/index.dart:
--------------------------------------------------------------------------------
1 | library permission;
2 |
3 | export 'controller.dart';
4 | export 'view.dart';
5 |
--------------------------------------------------------------------------------
/example/lib/pages/permission/view.dart:
--------------------------------------------------------------------------------
1 | import 'package:example/common/langs/index.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:getx_scaffold/getx_scaffold.dart';
4 |
5 | import 'index.dart';
6 |
7 | class PermissionPage extends GetView {
8 | const PermissionPage({super.key});
9 |
10 | // 主视图
11 | Widget _buildView() {
12 | return [
13 | ListTile(
14 | title: const Text('申请相机权限'),
15 | onTap: () async {
16 | if (await requestCameraPermission()) {
17 | showSuccessToast('已获取相机权限');
18 | }
19 | },
20 | ),
21 | ListTile(
22 | title: const Text('申请相册权限'),
23 | onTap: () async {
24 | if (await requestPhotosPermission()) {
25 | showSuccessToast('已获取相册权限');
26 | }
27 | },
28 | ),
29 | ListTile(
30 | title: const Text('申请麦克风权限'),
31 | onTap: () async {
32 | var result = await requestPermission(
33 | permission: Permission.microphone,
34 | message: '我们申请使用您设备的麦克风权限,用于拍摄录音',
35 | error: '请授权麦克风权限',
36 | );
37 | if (result) {
38 | showSuccessToast('已获取麦克风权限');
39 | }
40 | },
41 | ),
42 | ].toListView(
43 | separator: const DividerX(),
44 | );
45 | }
46 |
47 | @override
48 | Widget build(BuildContext context) {
49 | return GetBuilder(
50 | init: PermissionController(),
51 | id: 'permission',
52 | builder: (_) {
53 | return Scaffold(
54 | appBar:
55 | AppBar(title: Text(TextKey.shenQingQuanXian.tr), elevation: 1),
56 | body: SafeArea(
57 | child: _buildView(),
58 | ),
59 | );
60 | },
61 | );
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/example/lib/pages/theme/controller.dart:
--------------------------------------------------------------------------------
1 | import 'package:getx_scaffold/getx_scaffold.dart';
2 |
3 | class ThemeController extends GetxController with BaseControllerMixin {
4 | @override
5 | String get builderId => 'theme';
6 |
7 | ThemeController();
8 | }
9 |
--------------------------------------------------------------------------------
/example/lib/pages/theme/index.dart:
--------------------------------------------------------------------------------
1 | library theme;
2 |
3 | export 'controller.dart';
4 | export 'view.dart';
5 |
--------------------------------------------------------------------------------
/example/lib/pages/theme/view.dart:
--------------------------------------------------------------------------------
1 | import 'package:example/common/langs/index.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:getx_scaffold/getx_scaffold.dart';
4 |
5 | import 'index.dart';
6 |
7 | class ThemePage extends GetView {
8 | const ThemePage({super.key});
9 |
10 | // 主视图
11 | Widget _buildView() {
12 | return [
13 | ListTile(
14 | title: Text(TextKey.genSuiXiTong.tr),
15 | trailing: GlobalService.to.themeMode == ThemeMode.system
16 | ? const Icon(Icons.check)
17 | : null,
18 | onTap: () {
19 | changeThemeMode(ThemeMode.system);
20 | },
21 | ),
22 | ListTile(
23 | title: Text(TextKey.liangSeZhuTi.tr),
24 | trailing: GlobalService.to.themeMode == ThemeMode.light
25 | ? const Icon(Icons.check)
26 | : null,
27 | onTap: () {
28 | changeThemeMode(ThemeMode.light);
29 | },
30 | ),
31 | ListTile(
32 | title: Text(TextKey.anSeZhuTi.tr),
33 | trailing: GlobalService.to.themeMode == ThemeMode.dark
34 | ? const Icon(Icons.check)
35 | : null,
36 | onTap: () {
37 | changeThemeMode(ThemeMode.dark);
38 | },
39 | ),
40 | ].toListView(
41 | separator: const DividerX(),
42 | );
43 | }
44 |
45 | @override
46 | Widget build(BuildContext context) {
47 | return GetBuilder(
48 | init: ThemeController(),
49 | id: 'theme',
50 | builder: (_) {
51 | return Scaffold(
52 | appBar: AppBar(title: Text(TextKey.zhuTi.tr), elevation: 1),
53 | body: SafeArea(
54 | child: _buildView(),
55 | ),
56 | );
57 | },
58 | );
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/example/lib/pages/theme_color/controller.dart:
--------------------------------------------------------------------------------
1 | import 'package:getx_scaffold/getx_scaffold.dart';
2 |
3 | class ThemeColorController extends GetxController with BaseControllerMixin {
4 | @override
5 | String get builderId => 'themeColor';
6 |
7 | ThemeColorController();
8 | }
9 |
--------------------------------------------------------------------------------
/example/lib/pages/theme_color/index.dart:
--------------------------------------------------------------------------------
1 | library theme_color;
2 |
3 | export 'controller.dart';
4 | export 'view.dart';
5 |
--------------------------------------------------------------------------------
/example/linux/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral
2 |
--------------------------------------------------------------------------------
/example/linux/flutter/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # This file controls Flutter-level build steps. It should not be edited.
2 | cmake_minimum_required(VERSION 3.10)
3 |
4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
5 |
6 | # Configuration provided via flutter tool.
7 | include(${EPHEMERAL_DIR}/generated_config.cmake)
8 |
9 | # TODO: Move the rest of this into files in ephemeral. See
10 | # https://github.com/flutter/flutter/issues/57146.
11 |
12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...),
13 | # which isn't available in 3.10.
14 | function(list_prepend LIST_NAME PREFIX)
15 | set(NEW_LIST "")
16 | foreach(element ${${LIST_NAME}})
17 | list(APPEND NEW_LIST "${PREFIX}${element}")
18 | endforeach(element)
19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
20 | endfunction()
21 |
22 | # === Flutter Library ===
23 | # System-level dependencies.
24 | find_package(PkgConfig REQUIRED)
25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
28 |
29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
30 |
31 | # Published to parent scope for install step.
32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
36 |
37 | list(APPEND FLUTTER_LIBRARY_HEADERS
38 | "fl_basic_message_channel.h"
39 | "fl_binary_codec.h"
40 | "fl_binary_messenger.h"
41 | "fl_dart_project.h"
42 | "fl_engine.h"
43 | "fl_json_message_codec.h"
44 | "fl_json_method_codec.h"
45 | "fl_message_codec.h"
46 | "fl_method_call.h"
47 | "fl_method_channel.h"
48 | "fl_method_codec.h"
49 | "fl_method_response.h"
50 | "fl_plugin_registrar.h"
51 | "fl_plugin_registry.h"
52 | "fl_standard_message_codec.h"
53 | "fl_standard_method_codec.h"
54 | "fl_string_codec.h"
55 | "fl_value.h"
56 | "fl_view.h"
57 | "flutter_linux.h"
58 | )
59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
60 | add_library(flutter INTERFACE)
61 | target_include_directories(flutter INTERFACE
62 | "${EPHEMERAL_DIR}"
63 | )
64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
65 | target_link_libraries(flutter INTERFACE
66 | PkgConfig::GTK
67 | PkgConfig::GLIB
68 | PkgConfig::GIO
69 | )
70 | add_dependencies(flutter flutter_assemble)
71 |
72 | # === Flutter tool backend ===
73 | # _phony_ is a non-existent file to force this command to run every time,
74 | # since currently there's no way to get a full input/output list from the
75 | # flutter tool.
76 | add_custom_command(
77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_
79 | COMMAND ${CMAKE_COMMAND} -E env
80 | ${FLUTTER_TOOL_ENVIRONMENT}
81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
83 | VERBATIM
84 | )
85 | add_custom_target(flutter_assemble DEPENDS
86 | "${FLUTTER_LIBRARY}"
87 | ${FLUTTER_LIBRARY_HEADERS}
88 | )
89 |
--------------------------------------------------------------------------------
/example/linux/flutter/generated_plugin_registrant.cc:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #include "generated_plugin_registrant.h"
8 |
9 | #include
10 |
11 | void fl_register_plugins(FlPluginRegistry* registry) {
12 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
13 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
14 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
15 | }
16 |
--------------------------------------------------------------------------------
/example/linux/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GENERATED_PLUGIN_REGISTRANT_
8 | #define GENERATED_PLUGIN_REGISTRANT_
9 |
10 | #include
11 |
12 | // Registers Flutter plugins.
13 | void fl_register_plugins(FlPluginRegistry* registry);
14 |
15 | #endif // GENERATED_PLUGIN_REGISTRANT_
16 |
--------------------------------------------------------------------------------
/example/linux/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | url_launcher_linux
7 | )
8 |
9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST
10 | )
11 |
12 | set(PLUGIN_BUNDLED_LIBRARIES)
13 |
14 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
19 | endforeach(plugin)
20 |
21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
24 | endforeach(ffi_plugin)
25 |
--------------------------------------------------------------------------------
/example/linux/main.cc:
--------------------------------------------------------------------------------
1 | #include "my_application.h"
2 |
3 | int main(int argc, char** argv) {
4 | g_autoptr(MyApplication) app = my_application_new();
5 | return g_application_run(G_APPLICATION(app), argc, argv);
6 | }
7 |
--------------------------------------------------------------------------------
/example/linux/my_application.h:
--------------------------------------------------------------------------------
1 | #ifndef FLUTTER_MY_APPLICATION_H_
2 | #define FLUTTER_MY_APPLICATION_H_
3 |
4 | #include
5 |
6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,
7 | GtkApplication)
8 |
9 | /**
10 | * my_application_new:
11 | *
12 | * Creates a new Flutter-based application.
13 | *
14 | * Returns: a new #MyApplication.
15 | */
16 | MyApplication* my_application_new();
17 |
18 | #endif // FLUTTER_MY_APPLICATION_H_
19 |
--------------------------------------------------------------------------------
/example/macos/.gitignore:
--------------------------------------------------------------------------------
1 | # Flutter-related
2 | **/Flutter/ephemeral/
3 | **/Pods/
4 |
5 | # Xcode-related
6 | **/dgph
7 | **/xcuserdata/
8 |
--------------------------------------------------------------------------------
/example/macos/Flutter/Flutter-Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/macos/Flutter/Flutter-Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/macos/Flutter/GeneratedPluginRegistrant.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | import FlutterMacOS
6 | import Foundation
7 |
8 | import connectivity_plus
9 | import device_info_plus
10 | import package_info_plus
11 | import path_provider_foundation
12 | import shared_preferences_foundation
13 | import url_launcher_macos
14 |
15 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
16 | ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin"))
17 | DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
18 | FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
19 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
20 | SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
21 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
22 | }
23 |
--------------------------------------------------------------------------------
/example/macos/Podfile:
--------------------------------------------------------------------------------
1 | platform :osx, '10.14'
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 |
--------------------------------------------------------------------------------
/example/macos/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - connectivity_plus (0.0.1):
3 | - Flutter
4 | - FlutterMacOS
5 | - device_info_plus (0.0.1):
6 | - FlutterMacOS
7 | - FlutterMacOS (1.0.0)
8 | - package_info_plus (0.0.1):
9 | - FlutterMacOS
10 | - path_provider_foundation (0.0.1):
11 | - Flutter
12 | - FlutterMacOS
13 | - shared_preferences_foundation (0.0.1):
14 | - Flutter
15 | - FlutterMacOS
16 | - url_launcher_macos (0.0.1):
17 | - FlutterMacOS
18 |
19 | DEPENDENCIES:
20 | - connectivity_plus (from `Flutter/ephemeral/.symlinks/plugins/connectivity_plus/darwin`)
21 | - device_info_plus (from `Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos`)
22 | - FlutterMacOS (from `Flutter/ephemeral`)
23 | - package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`)
24 | - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
25 | - shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
26 | - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
27 |
28 | EXTERNAL SOURCES:
29 | connectivity_plus:
30 | :path: Flutter/ephemeral/.symlinks/plugins/connectivity_plus/darwin
31 | device_info_plus:
32 | :path: Flutter/ephemeral/.symlinks/plugins/device_info_plus/macos
33 | FlutterMacOS:
34 | :path: Flutter/ephemeral
35 | package_info_plus:
36 | :path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos
37 | path_provider_foundation:
38 | :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
39 | shared_preferences_foundation:
40 | :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
41 | url_launcher_macos:
42 | :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
43 |
44 | SPEC CHECKSUMS:
45 | connectivity_plus: ddd7f30999e1faaef5967c23d5b6d503d10434db
46 | device_info_plus: ce1b7762849d3ec103d0e0517299f2db7ad60720
47 | FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
48 | package_info_plus: fa739dd842b393193c5ca93c26798dff6e3d0e0c
49 | path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
50 | shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
51 | url_launcher_macos: 5f437abeda8c85500ceb03f5c1938a8c5a705399
52 |
53 | PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367
54 |
55 | COCOAPODS: 1.15.2
56 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/macos/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | @main
5 | class AppDelegate: FlutterAppDelegate {
6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
7 | return true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/example/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 |
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
--------------------------------------------------------------------------------
/example/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 = example
9 |
10 | // The application's bundle identifier
11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example
12 |
13 | // The copyright displayed in application information
14 | PRODUCT_COPYRIGHT = Copyright © 2024 com.example. All rights reserved.
15 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Debug.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Release.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/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 |
--------------------------------------------------------------------------------
/example/macos/Runner/DebugProfile.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.cs.allow-jit
8 |
9 | com.apple.security.network.server
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/example/macos/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | $(PRODUCT_COPYRIGHT)
27 | NSMainNibFile
28 | MainMenu
29 | NSPrincipalClass
30 | NSApplication
31 |
32 |
33 |
--------------------------------------------------------------------------------
/example/macos/Runner/MainFlutterWindow.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | class MainFlutterWindow: NSWindow {
5 | override func awakeFromNib() {
6 | let flutterViewController = FlutterViewController()
7 | let windowFrame = self.frame
8 | self.contentViewController = flutterViewController
9 | self.setFrame(windowFrame, display: true)
10 |
11 | RegisterGeneratedPlugins(registry: flutterViewController)
12 |
13 | super.awakeFromNib()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/example/macos/Runner/Release.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/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 |
--------------------------------------------------------------------------------
/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: example
2 | description: "A new Flutter project."
3 | publish_to: "none"
4 | version: 1.0.0+1
5 |
6 | environment:
7 | sdk: ">=3.3.3 <4.0.0"
8 |
9 | dependencies:
10 | flutter:
11 | sdk: flutter
12 | flutter_localizations:
13 | sdk: flutter
14 | cupertino_icons: ^1.0.6
15 | flutter_native_splash: ^2.4.1
16 | getx_scaffold:
17 | path: ../
18 |
19 | dev_dependencies:
20 | flutter_test:
21 | sdk: flutter
22 | flutter_lints: ^4.0.0
23 | icons_launcher: ^2.1.7
24 |
25 | # flutter_icons 应用启动图标配置 https://pub-web.flutter-io.cn/packages/icons_launcher
26 | # flutter pub run icons_launcher:create
27 | icons_launcher:
28 | image_path: "assets/icons/ic_launcher.png"
29 | platforms:
30 | android:
31 | enable: true
32 | adaptive_background_color: "#ffffff"
33 | adaptive_foreground_image: "assets/icons/ic_launcher_adaptive.png"
34 | ios:
35 | enable: true
36 |
37 | # flutter_native_splash 闪屏页配置 https://pub-web.flutter-io.cn/packages/flutter_native_splash
38 | # dart pub run flutter_native_splash:create
39 | # dart pub run flutter_native_splash:remove
40 | flutter_native_splash:
41 | android: true
42 | ios: true
43 | color: "#ffffff"
44 | color_dark: "#23232a"
45 | image: "assets/icons/ic_launcher_adaptive.png"
46 | image_dark: "assets/icons/ic_launcher_adaptive_dark.png"
47 | android_12:
48 | color: "#ffffff"
49 | color_dark: "#23232a"
50 | image: "assets/icons/ic_launcher_adaptive.png"
51 | image_dark: "assets/icons/ic_launcher_adaptive_dark.png"
52 |
53 | flutter:
54 | uses-material-design: true
55 |
56 | assets:
57 | - assets/icons/
58 | - assets/svgs/
59 | - assets/images/
60 |
61 | fonts:
62 | - family: Montserrat
63 | fonts:
64 | - asset: assets/fonts/Montserrat-Thin.ttf
65 | weight: 100
66 | - asset: assets/fonts/Montserrat-ExtraLight.ttf
67 | weight: 200
68 | - asset: assets/fonts/Montserrat-Light.ttf
69 | weight: 300
70 | - asset: assets/fonts/Montserrat-Regular.ttf
71 | weight: 400
72 | - asset: assets/fonts/Montserrat-Medium.ttf
73 | weight: 500
74 | - asset: assets/fonts/Montserrat-SemiBold.ttf
75 | weight: 600
76 | - asset: assets/fonts/Montserrat-Bold.ttf
77 | weight: 700
78 | - asset: assets/fonts/Montserrat-SemiBold.ttf
79 | weight: 800
80 | - asset: assets/fonts/Montserrat-Black.ttf
81 | weight: 900
82 |
--------------------------------------------------------------------------------
/example/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/web/favicon.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-maskable-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/web/icons/Icon-maskable-192.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-maskable-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/web/icons/Icon-maskable-512.png
--------------------------------------------------------------------------------
/example/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "example",
3 | "short_name": "example",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | },
22 | {
23 | "src": "icons/Icon-maskable-192.png",
24 | "sizes": "192x192",
25 | "type": "image/png",
26 | "purpose": "maskable"
27 | },
28 | {
29 | "src": "icons/Icon-maskable-512.png",
30 | "sizes": "512x512",
31 | "type": "image/png",
32 | "purpose": "maskable"
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/example/web/splash/img/dark-1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/web/splash/img/dark-1x.png
--------------------------------------------------------------------------------
/example/web/splash/img/dark-2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/web/splash/img/dark-2x.png
--------------------------------------------------------------------------------
/example/web/splash/img/dark-3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/web/splash/img/dark-3x.png
--------------------------------------------------------------------------------
/example/web/splash/img/dark-4x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/web/splash/img/dark-4x.png
--------------------------------------------------------------------------------
/example/web/splash/img/light-1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/web/splash/img/light-1x.png
--------------------------------------------------------------------------------
/example/web/splash/img/light-2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/web/splash/img/light-2x.png
--------------------------------------------------------------------------------
/example/web/splash/img/light-3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/web/splash/img/light-3x.png
--------------------------------------------------------------------------------
/example/web/splash/img/light-4x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/web/splash/img/light-4x.png
--------------------------------------------------------------------------------
/example/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 |
--------------------------------------------------------------------------------
/example/windows/flutter/generated_plugin_registrant.cc:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #include "generated_plugin_registrant.h"
8 |
9 | #include
10 | #include
11 | #include
12 |
13 | void RegisterPlugins(flutter::PluginRegistry* registry) {
14 | ConnectivityPlusWindowsPluginRegisterWithRegistrar(
15 | registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
16 | PermissionHandlerWindowsPluginRegisterWithRegistrar(
17 | registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
18 | UrlLauncherWindowsRegisterWithRegistrar(
19 | registry->GetRegistrarForPlugin("UrlLauncherWindows"));
20 | }
21 |
--------------------------------------------------------------------------------
/example/windows/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GENERATED_PLUGIN_REGISTRANT_
8 | #define GENERATED_PLUGIN_REGISTRANT_
9 |
10 | #include
11 |
12 | // Registers Flutter plugins.
13 | void RegisterPlugins(flutter::PluginRegistry* registry);
14 |
15 | #endif // GENERATED_PLUGIN_REGISTRANT_
16 |
--------------------------------------------------------------------------------
/example/windows/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | connectivity_plus
7 | permission_handler_windows
8 | url_launcher_windows
9 | )
10 |
11 | list(APPEND FLUTTER_FFI_PLUGIN_LIST
12 | )
13 |
14 | set(PLUGIN_BUNDLED_LIBRARIES)
15 |
16 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
17 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})
18 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
19 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
20 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
21 | endforeach(plugin)
22 |
23 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
24 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
25 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
26 | endforeach(ffi_plugin)
27 |
--------------------------------------------------------------------------------
/example/windows/runner/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(runner LANGUAGES CXX)
3 |
4 | # Define the application target. To change its name, change BINARY_NAME in the
5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
6 | # work.
7 | #
8 | # Any new source files that you add to the application should be added here.
9 | add_executable(${BINARY_NAME} WIN32
10 | "flutter_window.cpp"
11 | "main.cpp"
12 | "utils.cpp"
13 | "win32_window.cpp"
14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
15 | "Runner.rc"
16 | "runner.exe.manifest"
17 | )
18 |
19 | # Apply the standard set of build settings. This can be removed for applications
20 | # that need different build settings.
21 | apply_standard_settings(${BINARY_NAME})
22 |
23 | # Add preprocessor definitions for the build version.
24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"")
25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}")
26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}")
27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}")
28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}")
29 |
30 | # Disable Windows macros that collide with C++ standard library functions.
31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
32 |
33 | # Add dependency libraries and include directories. Add any application-specific
34 | # dependencies here.
35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib")
37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
38 |
39 | # Run the Flutter tool portions of the build. This must not be removed.
40 | add_dependencies(${BINARY_NAME} flutter_assemble)
41 |
--------------------------------------------------------------------------------
/example/windows/runner/flutter_window.cpp:
--------------------------------------------------------------------------------
1 | #include "flutter_window.h"
2 |
3 | #include
4 |
5 | #include "flutter/generated_plugin_registrant.h"
6 |
7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project)
8 | : project_(project) {}
9 |
10 | FlutterWindow::~FlutterWindow() {}
11 |
12 | bool FlutterWindow::OnCreate() {
13 | if (!Win32Window::OnCreate()) {
14 | return false;
15 | }
16 |
17 | RECT frame = GetClientArea();
18 |
19 | // The size here must match the window dimensions to avoid unnecessary surface
20 | // creation / destruction in the startup path.
21 | flutter_controller_ = std::make_unique(
22 | frame.right - frame.left, frame.bottom - frame.top, project_);
23 | // Ensure that basic setup of the controller was successful.
24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) {
25 | return false;
26 | }
27 | RegisterPlugins(flutter_controller_->engine());
28 | SetChildContent(flutter_controller_->view()->GetNativeWindow());
29 |
30 | flutter_controller_->engine()->SetNextFrameCallback([&]() {
31 | this->Show();
32 | });
33 |
34 | // Flutter can complete the first frame before the "show window" callback is
35 | // registered. The following call ensures a frame is pending to ensure the
36 | // window is shown. It is a no-op if the first frame hasn't completed yet.
37 | flutter_controller_->ForceRedraw();
38 |
39 | return true;
40 | }
41 |
42 | void FlutterWindow::OnDestroy() {
43 | if (flutter_controller_) {
44 | flutter_controller_ = nullptr;
45 | }
46 |
47 | Win32Window::OnDestroy();
48 | }
49 |
50 | LRESULT
51 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message,
52 | WPARAM const wparam,
53 | LPARAM const lparam) noexcept {
54 | // Give Flutter, including plugins, an opportunity to handle window messages.
55 | if (flutter_controller_) {
56 | std::optional result =
57 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam,
58 | lparam);
59 | if (result) {
60 | return *result;
61 | }
62 | }
63 |
64 | switch (message) {
65 | case WM_FONTCHANGE:
66 | flutter_controller_->engine()->ReloadSystemFonts();
67 | break;
68 | }
69 |
70 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam);
71 | }
72 |
--------------------------------------------------------------------------------
/example/windows/runner/flutter_window.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_FLUTTER_WINDOW_H_
2 | #define RUNNER_FLUTTER_WINDOW_H_
3 |
4 | #include
5 | #include
6 |
7 | #include
8 |
9 | #include "win32_window.h"
10 |
11 | // A window that does nothing but host a Flutter view.
12 | class FlutterWindow : public Win32Window {
13 | public:
14 | // Creates a new FlutterWindow hosting a Flutter view running |project|.
15 | explicit FlutterWindow(const flutter::DartProject& project);
16 | virtual ~FlutterWindow();
17 |
18 | protected:
19 | // Win32Window:
20 | bool OnCreate() override;
21 | void OnDestroy() override;
22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,
23 | LPARAM const lparam) noexcept override;
24 |
25 | private:
26 | // The project to run.
27 | flutter::DartProject project_;
28 |
29 | // The Flutter instance hosted by this window.
30 | std::unique_ptr flutter_controller_;
31 | };
32 |
33 | #endif // RUNNER_FLUTTER_WINDOW_H_
34 |
--------------------------------------------------------------------------------
/example/windows/runner/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | #include "flutter_window.h"
6 | #include "utils.h"
7 |
8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
9 | _In_ wchar_t *command_line, _In_ int show_command) {
10 | // Attach to console when present (e.g., 'flutter run') or create a
11 | // new console when running with a debugger.
12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
13 | CreateAndAttachConsole();
14 | }
15 |
16 | // Initialize COM, so that it is available for use in the library and/or
17 | // plugins.
18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
19 |
20 | flutter::DartProject project(L"data");
21 |
22 | std::vector command_line_arguments =
23 | GetCommandLineArguments();
24 |
25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
26 |
27 | FlutterWindow window(project);
28 | Win32Window::Point origin(10, 10);
29 | Win32Window::Size size(1280, 720);
30 | if (!window.Create(L"example", origin, size)) {
31 | return EXIT_FAILURE;
32 | }
33 | window.SetQuitOnClose(true);
34 |
35 | ::MSG msg;
36 | while (::GetMessage(&msg, nullptr, 0, 0)) {
37 | ::TranslateMessage(&msg);
38 | ::DispatchMessage(&msg);
39 | }
40 |
41 | ::CoUninitialize();
42 | return EXIT_SUCCESS;
43 | }
44 |
--------------------------------------------------------------------------------
/example/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 |
--------------------------------------------------------------------------------
/example/windows/runner/resources/app_icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/example/windows/runner/resources/app_icon.ico
--------------------------------------------------------------------------------
/example/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 |
--------------------------------------------------------------------------------
/example/windows/runner/utils.cpp:
--------------------------------------------------------------------------------
1 | #include "utils.h"
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | #include
9 |
10 | void CreateAndAttachConsole() {
11 | if (::AllocConsole()) {
12 | FILE *unused;
13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
14 | _dup2(_fileno(stdout), 1);
15 | }
16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) {
17 | _dup2(_fileno(stdout), 2);
18 | }
19 | std::ios::sync_with_stdio();
20 | FlutterDesktopResyncOutputStreams();
21 | }
22 | }
23 |
24 | std::vector GetCommandLineArguments() {
25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use.
26 | int argc;
27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);
28 | if (argv == nullptr) {
29 | return std::vector();
30 | }
31 |
32 | std::vector command_line_arguments;
33 |
34 | // Skip the first argument as it's the binary name.
35 | for (int i = 1; i < argc; i++) {
36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i]));
37 | }
38 |
39 | ::LocalFree(argv);
40 |
41 | return command_line_arguments;
42 | }
43 |
44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) {
45 | if (utf16_string == nullptr) {
46 | return std::string();
47 | }
48 | int target_length = ::WideCharToMultiByte(
49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
50 | -1, nullptr, 0, nullptr, nullptr)
51 | -1; // remove the trailing null character
52 | int input_length = (int)wcslen(utf16_string);
53 | std::string utf8_string;
54 | if (target_length <= 0 || target_length > utf8_string.max_size()) {
55 | return utf8_string;
56 | }
57 | utf8_string.resize(target_length);
58 | int converted_length = ::WideCharToMultiByte(
59 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
60 | input_length, utf8_string.data(), target_length, nullptr, nullptr);
61 | if (converted_length == 0) {
62 | return std::string();
63 | }
64 | return utf8_string;
65 | }
66 |
--------------------------------------------------------------------------------
/example/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 |
--------------------------------------------------------------------------------
/img.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Kxmrg/flutter_getx_scaffold/dad91e1439b16ea779d9ec9217ff9861a501aaa3/img.png
--------------------------------------------------------------------------------
/lib/common/base/base_controller_mixin.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:getx_scaffold/getx_scaffold.dart';
4 |
5 | /**
6 | * @author: Kxmrg
7 | * @github: https://github.com/Kxmrg
8 | * @version: 1.0.0
9 | * @copyright: Copyright © 2023-2024 Kxmrg
10 | * @license: MIT License
11 | * @date: 2024-06-29
12 | * @description:
13 | */
14 |
15 | /// BaseControllerMixin
16 | mixin BaseControllerMixin on GetxController {
17 | @protected
18 | String get builderId;
19 |
20 | /// 是否监听生命周期
21 | bool get listenLifecycleEvent => false;
22 |
23 | late StreamSubscription refreshUiSubscription;
24 |
25 | StreamSubscription? lifecycleSubscription;
26 |
27 | @override
28 | void onInit() {
29 | super.onInit();
30 | refreshUiSubscription = eventListen((event) {
31 | // 延时刷新UI
32 | delayed(300, () {
33 | GlobalService.to.updateNavigationBar();
34 | updateUi();
35 | });
36 | });
37 | if (listenLifecycleEvent) {
38 | lifecycleSubscription = eventListen((event) {
39 | switch (event.state) {
40 | case AppLifecycleState.resumed:
41 | onResumed();
42 | break;
43 | case AppLifecycleState.inactive:
44 | onInactive();
45 | break;
46 | case AppLifecycleState.detached:
47 | onDetached();
48 | break;
49 | case AppLifecycleState.paused:
50 | onPaused();
51 | break;
52 | case AppLifecycleState.hidden:
53 | onHidden();
54 | break;
55 | }
56 | });
57 | }
58 | }
59 |
60 | void onResumed() {}
61 |
62 | void onInactive() {}
63 |
64 | void onDetached() {}
65 |
66 | void onPaused() {}
67 |
68 | void onHidden() {}
69 |
70 | @override
71 | void onClose() {
72 | refreshUiSubscription.cancel();
73 | lifecycleSubscription?.cancel();
74 | super.onClose();
75 | }
76 |
77 | /// 返回
78 | void back() {
79 | Get.back();
80 | }
81 |
82 | /// 延时退出
83 | void delayedBack({int seconds = 2, result}) {
84 | Future.delayed(Duration(seconds: seconds), () {
85 | if (result != null) {
86 | Get.back(result: result);
87 | } else {
88 | Get.back();
89 | }
90 | });
91 | }
92 |
93 | /// 刷新UI
94 | void updateUi() {
95 | update([builderId]);
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/lib/common/base/index.dart:
--------------------------------------------------------------------------------
1 | library base;
2 |
3 | /**
4 | * @author: Kxmrg
5 | * @github: https://github.com/Kxmrg
6 | * @version: 1.0.0
7 | * @copyright: Copyright © 2023-2024 Kxmrg
8 | * @license: MIT License
9 | * @date: 2024-06-29
10 | * @description:
11 | */
12 |
13 | export 'base_controller_mixin.dart';
14 |
--------------------------------------------------------------------------------
/lib/common/components/index.dart:
--------------------------------------------------------------------------------
1 | library components;
2 |
3 | /**
4 | * @author: Kxmrg
5 | * @github: https://github.com/Kxmrg
6 | * @version: 1.0.0
7 | * @copyright: Copyright © 2023-2024 Kxmrg
8 | * @license: MIT License
9 | * @date: 2024-06-28
10 | * @description:
11 | */
12 |
13 | export './brn_toast.dart';
14 | export './loading.dart';
15 | export './getx_app.dart';
16 | export './dialog_x.dart';
17 |
--------------------------------------------------------------------------------
/lib/common/components/loading.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_easyloading/flutter_easyloading.dart';
3 | import 'package:flutter_screenutil/flutter_screenutil.dart';
4 |
5 | /**
6 | * @author: Kxmrg
7 | * @github: https://github.com/Kxmrg
8 | * @version: 1.0.0
9 | * @copyright: Copyright © 2023-2024 Kxmrg
10 | * @license: MIT License
11 | * @date: 2024-06-28
12 | * @description: Loading
13 | */
14 |
15 | /// 用于全局显示隐藏Loading Widget
16 | class Loading {
17 | // 初始化Loading样式
18 | static void init() {
19 | EasyLoading.instance
20 | ..indicatorType = EasyLoadingIndicatorType.ring // 指示器类型
21 | ..loadingStyle = EasyLoadingStyle.custom // loading样式 自定义
22 | ..indicatorSize = 45.w // 指示器大小
23 | ..lineWidth = 2.w // 进度条宽度
24 | ..radius = 10.0.r // 圆角
25 | ..progressColor = Colors.white // 进度条颜色
26 | ..backgroundColor = Colors.black.withOpacity(0.7) // 背景颜色
27 | ..indicatorColor = Colors.white // 指示器颜色
28 | ..textColor = Colors.white // 文字颜色
29 | ..textStyle = TextStyle(fontSize: 16.sp, color: Colors.white)
30 | ..maskColor = Colors.black.withOpacity(0.6) // 遮罩颜色
31 | ..userInteractions = true // 用户交互
32 | ..dismissOnTap = false; // 点击关闭
33 | }
34 |
35 | static void setDisplayDuration(milliseconds) {
36 | EasyLoading.instance.displayDuration = Duration(milliseconds: milliseconds);
37 | }
38 |
39 | // 显示
40 | static void show([String? text]) {
41 | EasyLoading.instance.userInteractions = false; // 屏蔽交互操作
42 | EasyLoading.show(status: text ?? '加载中...');
43 | }
44 |
45 | // 信息
46 | static void showInfo(String text) {
47 | EasyLoading.showInfo(text);
48 | }
49 |
50 | // 进度
51 | static void showProgress(double progress, [String? text]) {
52 | EasyLoading.instance.userInteractions = false; // 屏蔽交互操作
53 | EasyLoading.showProgress(progress, status: text);
54 | }
55 |
56 | // 错误
57 | static void error([String? text]) {
58 | EasyLoading.showError(text ?? '操作失败');
59 | }
60 |
61 | // 成功
62 | static void success([String? text]) {
63 | EasyLoading.showSuccess(text ?? '操作成功');
64 | }
65 |
66 | // 关闭
67 | static void dismiss() {
68 | EasyLoading.instance.userInteractions = true; // 恢复交互操作
69 | EasyLoading.dismiss();
70 | }
71 |
72 | // Toast
73 | static void toast(String text) {
74 | EasyLoading.showToast(text);
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/lib/common/event/index.dart:
--------------------------------------------------------------------------------
1 | library event;
2 |
3 | /**
4 | * @author: Kxmrg
5 | * @github: https://github.com/Kxmrg
6 | * @version: 1.0.0
7 | * @copyright: Copyright © 2023-2024 Kxmrg
8 | * @license: MIT License
9 | * @date: 2024-06-29
10 | * @description:
11 | */
12 |
13 | export './refresh_ui.dart';
14 | export './lifecycle.dart';
15 |
--------------------------------------------------------------------------------
/lib/common/event/lifecycle.dart:
--------------------------------------------------------------------------------
1 | import 'package:getx_scaffold/getx_scaffold.dart';
2 |
3 | /**
4 | * @author: Kxmrg
5 | * @github: https://github.com/Kxmrg
6 | * @version: 1.0.0
7 | * @copyright: Copyright © 2023-2024 Kxmrg
8 | * @license: MIT License
9 | * @date: 2024-07-03
10 | * @description:
11 | */
12 |
13 | /// 生命周期事件
14 | class LifecycleEvent {
15 | final AppLifecycleState state;
16 |
17 | LifecycleEvent(this.state);
18 | }
19 |
--------------------------------------------------------------------------------
/lib/common/event/refresh_ui.dart:
--------------------------------------------------------------------------------
1 | /**
2 | * @author: Kxmrg
3 | * @github: https://github.com/Kxmrg
4 | * @version: 1.0.0
5 | * @copyright: Copyright © 2023-2024 Kxmrg
6 | * @license: MIT License
7 | * @date: 2024-06-29
8 | * @description:
9 | */
10 |
11 | /// 刷新UI事件
12 | class RefreshUiEvent {
13 | const RefreshUiEvent();
14 | }
15 |
--------------------------------------------------------------------------------
/lib/common/extensions/ex_color.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | // Color Extensions
4 | extension ExColor on Color {
5 | /// return hex String
6 | String toHex({bool leadingHashSign = true, bool includeAlpha = false}) =>
7 | '${leadingHashSign ? '#' : ''}'
8 | '${includeAlpha ? alpha.toRadixString(16).padLeft(2, '0') : ''}'
9 | '${red.toRadixString(16).padLeft(2, '0')}'
10 | '${green.toRadixString(16).padLeft(2, '0')}'
11 | '${blue.toRadixString(16).padLeft(2, '0')}';
12 |
13 | /// Return true if given Color is dark
14 | bool isDark() => getBrightness() < 128.0;
15 |
16 | /// Return true if given Color is light
17 | bool isLight() => !isDark();
18 |
19 | /// Returns Brightness of give Color
20 | double getBrightness() => (red * 299 + green * 587 + blue * 114) / 1000;
21 |
22 | /// Returns Luminance of give Color
23 | double getLuminance() => computeLuminance();
24 | }
25 |
--------------------------------------------------------------------------------
/lib/common/extensions/ex_date_time.dart:
--------------------------------------------------------------------------------
1 | import 'package:getx_scaffold/getx_scaffold.dart';
2 |
3 | /**
4 | * @author: Kxmrg
5 | * @github: https://github.com/Kxmrg
6 | * @version: 1.0.0
7 | * @copyright: Copyright © 2023-2024 Kxmrg
8 | * @license: MIT License
9 | * @date: 2024-06-28
10 | * @description:
11 | */
12 |
13 | /// 扩展DateTime
14 | extension ExDateTime on DateTime {
15 | // 格式化DateTime
16 | String dateFormat(String pattern) {
17 | return DateFormat(pattern).format(this);
18 | }
19 |
20 | // 获取日期字符串
21 | String toDateString() {
22 | return dateFormat(DateFormats.y_mo_d);
23 | }
24 |
25 | // 获取日期时间字符串
26 | String toDateTimeString() {
27 | return dateFormat(DateFormats.full);
28 | }
29 |
30 | // 获取时间字符串
31 | String toTimeString() {
32 | return dateFormat(DateFormats.h_m_s);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/lib/common/extensions/ex_scroll.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | // ScrollController Extensions
4 | extension ScrollExtension on ScrollController {
5 | /// Scroll to top with given animation duration
6 | Future animToTop({milliseconds = 300}) async {
7 | animateTo(
8 | 0,
9 | duration: Duration(milliseconds: milliseconds),
10 | curve: Curves.decelerate,
11 | );
12 | }
13 |
14 | /// Scroll to bottom with given animation duration
15 | Future animToBottom({milliseconds = 300}) async {
16 | animateTo(
17 | position.maxScrollExtent,
18 | duration: Duration(milliseconds: milliseconds),
19 | curve: Curves.linear,
20 | );
21 | }
22 |
23 | /// Scroll to given position with given animation duration
24 | Future animateToPosition(double position, {milliseconds = 300}) async {
25 | animateTo(
26 | position,
27 | duration: Duration(milliseconds: milliseconds),
28 | curve: Curves.linear,
29 | );
30 | }
31 |
32 | /// Scroll to top without animation
33 | void jumpToTop() => jumpTo(0);
34 |
35 | /// Scroll to bottom without animation
36 | void jumpToBottom() => jumpTo(position.maxScrollExtent);
37 | }
38 |
--------------------------------------------------------------------------------
/lib/common/extensions/index.dart:
--------------------------------------------------------------------------------
1 | library extensions;
2 |
3 | /**
4 | * @author: Kxmrg
5 | * @github: https://github.com/Kxmrg
6 | * @version: 1.0.0
7 | * @copyright: Copyright © 2023-2024 Kxmrg
8 | * @license: MIT License
9 | * @date: 2024-06-28
10 | * @description:
11 | */
12 |
13 | export './ex_string.dart';
14 | export './ex_num.dart';
15 | export './ex_date_time.dart';
16 | export './ex_list.dart';
17 | export './ex_widget.dart';
18 | export './ex_color.dart';
19 | export './ex_scroll.dart';
20 |
--------------------------------------------------------------------------------
/lib/common/index.dart:
--------------------------------------------------------------------------------
1 | library common;
2 |
3 | /**
4 | * @author: Kxmrg
5 | * @github: https://github.com/Kxmrg
6 | * @version: 1.0.0
7 | * @copyright: Copyright © 2023-2024 Kxmrg
8 | * @license: MIT License
9 | * @date: 2024-06-28
10 | * @description:
11 | */
12 | export 'package:intl/intl.dart' hide TextDirection;
13 | export 'package:get/get.dart' hide Response, FormData, MultipartFile;
14 | export 'package:event_bus/event_bus.dart';
15 | export 'package:flutter_screenutil/flutter_screenutil.dart';
16 | export 'package:device_info_plus/device_info_plus.dart';
17 | export 'package:url_launcher/url_launcher.dart';
18 | export 'package:flutter/widgets.dart';
19 | export 'package:lottie/lottie.dart';
20 | export 'package:flutter_spinkit/flutter_spinkit.dart';
21 | export 'package:dio/dio.dart';
22 | export 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
23 | export 'package:extended_image/extended_image.dart'
24 | hide MultipartFile, DoubleExtension;
25 | export 'package:permission_handler/permission_handler.dart';
26 | export 'package:slider_captcha/slider_captcha.dart';
27 | export 'package:flutter_easyloading/flutter_easyloading.dart';
28 |
29 | export './extensions/index.dart';
30 | export './widgets/index.dart';
31 | export './utils/index.dart';
32 | export './components/index.dart';
33 | export './services/index.dart';
34 | export './event/index.dart';
35 | export './base/index.dart';
36 | export './common.dart';
37 | export './resources/index.dart';
38 |
--------------------------------------------------------------------------------
/lib/common/resources/index.dart:
--------------------------------------------------------------------------------
1 | library resources;
2 |
3 | export './antd_icon.dart';
4 | export './theme_color.dart';
5 |
--------------------------------------------------------------------------------
/lib/common/resources/theme_color.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:getx_scaffold/getx_scaffold.dart';
3 |
4 | class ThemeColor {
5 | static get primary => Theme.of(Get.context!).colorScheme.primary;
6 | static get onPrimary => Theme.of(Get.context!).colorScheme.onPrimary;
7 | static get primaryContainer =>
8 | Theme.of(Get.context!).colorScheme.primaryContainer;
9 | static get onPrimaryContainer =>
10 | Theme.of(Get.context!).colorScheme.onPrimaryContainer;
11 | static get secondary => Theme.of(Get.context!).colorScheme.secondary;
12 | static get onSecondary => Theme.of(Get.context!).colorScheme.onSecondary;
13 | static get secondaryContainer =>
14 | Theme.of(Get.context!).colorScheme.secondaryContainer;
15 | static get onSecondaryContainer =>
16 | Theme.of(Get.context!).colorScheme.onSecondaryContainer;
17 | static get tertiary => Theme.of(Get.context!).colorScheme.tertiary;
18 | static get onTertiary => Theme.of(Get.context!).colorScheme.onTertiary;
19 | static get tertiaryContainer =>
20 | Theme.of(Get.context!).colorScheme.tertiaryContainer;
21 | static get onTertiaryContainer =>
22 | Theme.of(Get.context!).colorScheme.onTertiaryContainer;
23 | static get error => Theme.of(Get.context!).colorScheme.error;
24 | static get onError => Theme.of(Get.context!).colorScheme.onError;
25 | static get errorContainer =>
26 | Theme.of(Get.context!).colorScheme.errorContainer;
27 | static get onErrorContainer =>
28 | Theme.of(Get.context!).colorScheme.onErrorContainer;
29 | static get surface => Theme.of(Get.context!).colorScheme.surface;
30 | static get onSurface => Theme.of(Get.context!).colorScheme.onSurface;
31 | static get onSurfaceVariant =>
32 | Theme.of(Get.context!).colorScheme.onSurfaceVariant;
33 | static get outline => Theme.of(Get.context!).colorScheme.outline;
34 | static get outlineVariant =>
35 | Theme.of(Get.context!).colorScheme.outlineVariant;
36 | static get shadow => Theme.of(Get.context!).colorScheme.shadow;
37 | static get scrim => Theme.of(Get.context!).colorScheme.scrim;
38 | static get inverseSurface =>
39 | Theme.of(Get.context!).colorScheme.inverseSurface;
40 | static get onInverseSurface =>
41 | Theme.of(Get.context!).colorScheme.onInverseSurface;
42 | static get inversePrimary =>
43 | Theme.of(Get.context!).colorScheme.inversePrimary;
44 | static get surfaceTint => Theme.of(Get.context!).colorScheme.surfaceTint;
45 | }
46 |
--------------------------------------------------------------------------------
/lib/common/services/index.dart:
--------------------------------------------------------------------------------
1 | library services;
2 |
3 | /**
4 | * @author: Kxmrg
5 | * @github: https://github.com/Kxmrg
6 | * @version: 1.0.0
7 | * @copyright: Copyright © 2023-2024 Kxmrg
8 | * @license: MIT License
9 | * @date: 2024-06-28
10 | * @description:
11 | */
12 |
13 | export './http.dart';
14 | export './global.dart';
15 |
--------------------------------------------------------------------------------
/lib/common/utils/encrypt_util.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:crypto/crypto.dart';
4 | import 'package:convert/convert.dart';
5 |
6 | /**
7 | * @Author: Sky24n
8 | * @GitHub: https://github.com/Sky24n
9 | * @Description: Encrypt Util.
10 | * @Date: 2019/07/02
11 | */
12 |
13 | /// Encrypt Util.
14 | class EncryptUtil {
15 | /// md5 散列计算
16 | static String encodeMd5(String data) {
17 | var content = const Utf8Encoder().convert(data);
18 | var digest = md5.convert(content);
19 | return hex.encode(digest.bytes);
20 | }
21 |
22 | /// sha1 散列计算
23 | static String encodeSha1(String data) {
24 | var content = const Utf8Encoder().convert(data);
25 | var digest = sha1.convert(content);
26 | return hex.encode(digest.bytes);
27 | }
28 |
29 | /// sha256 散列计算
30 | static String encodeSha256(String data) {
31 | var content = const Utf8Encoder().convert(data);
32 | var digest = sha256.convert(content);
33 | return hex.encode(digest.bytes);
34 | }
35 |
36 | /// sha512 散列计算
37 | static String encodeSha512(String data) {
38 | var content = const Utf8Encoder().convert(data);
39 | var digest = sha512.convert(content);
40 | return hex.encode(digest.bytes);
41 | }
42 |
43 | /// 异或对称加密
44 | static String xorCode(String res, String key) {
45 | List keyList = key.split(',');
46 | List codeUnits = res.codeUnits;
47 | List codes = [];
48 | for (int i = 0, length = codeUnits.length; i < length; i++) {
49 | int code = codeUnits[i] ^ int.parse(keyList[i % keyList.length]);
50 | codes.add(code);
51 | }
52 | return String.fromCharCodes(codes);
53 | }
54 |
55 | /// 异或对称 Base64 加密
56 | static String xorBase64Encode(String res, String key) {
57 | String encode = xorCode(res, key);
58 | encode = encodeBase64(encode);
59 | return encode;
60 | }
61 |
62 | /// 异或对称 Base64 解密
63 | static String xorBase64Decode(String res, String key) {
64 | String encode = decodeBase64(res);
65 | encode = xorCode(encode, key);
66 | return encode;
67 | }
68 |
69 | /// Base64加密
70 | static String encodeBase64(String data) {
71 | var content = utf8.encode(data);
72 | var digest = base64Encode(content);
73 | return digest;
74 | }
75 |
76 | /// Base64解密
77 | static String decodeBase64(String data) {
78 | List bytes = base64Decode(data);
79 | String result = utf8.decode(bytes);
80 | return result;
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/lib/common/utils/index.dart:
--------------------------------------------------------------------------------
1 | library utils;
2 |
3 | /**
4 | * @author: Kxmrg
5 | * @github: https://github.com/Kxmrg
6 | * @version: 1.0.0
7 | * @copyright: Copyright © 2023-2024 Kxmrg
8 | * @license: MIT License
9 | * @date: 2024-06-28
10 | * @description:
11 | */
12 |
13 | export './date_util.dart';
14 | export './encrypt_util.dart';
15 | export './json_util.dart';
16 | export './money_util.dart';
17 | export './num_util.dart';
18 | export './object_util.dart';
19 | export './regex_util.dart';
20 | export './text_util.dart';
21 | export './timeline_util.dart';
22 | export './timer_util.dart';
23 | export './toast_util.dart';
24 | export './log_util.dart';
25 | export './dio_logger.dart';
26 | export './shared_pref.dart';
27 | export './jwt_decoder.dart';
28 | export './rsa_util.dart';
29 | export './permission_util.dart';
30 |
--------------------------------------------------------------------------------
/lib/common/utils/json_util.dart:
--------------------------------------------------------------------------------
1 | // ignore_for_file: avoid_print
2 |
3 | import 'dart:convert';
4 |
5 | /**
6 | * @Author: Sky24n
7 | * @GitHub: https://github.com/Sky24n
8 | * @Description: Date Util.
9 | * @Date: 2020/01/06
10 | */
11 |
12 | /// Json Util.
13 | class JsonUtil {
14 | /// Converts object [value] to a JSON string.
15 | static String? encodeObj(dynamic value) {
16 | return value == null ? null : json.encode(value);
17 | }
18 |
19 | /// Converts JSON string [source] to object.
20 | static T? getObj(String? source, T Function(Map v) f) {
21 | if (source == null || source.isEmpty) return null;
22 | try {
23 | Map map = json.decode(source);
24 | return f(map);
25 | } catch (e) {
26 | print('JsonUtil convert error, Exception:${e.toString()}');
27 | }
28 | return null;
29 | }
30 |
31 | /// Converts JSON string or JSON map [source] to object.
32 | static T? getObject(dynamic source, T Function(Map v) f) {
33 | if (source == null || source.toString().isEmpty) return null;
34 | try {
35 | Map map;
36 | if (source is String) {
37 | map = json.decode(source);
38 | } else {
39 | map = source;
40 | }
41 | return f(map);
42 | } catch (e) {
43 | print('JsonUtil convert error, Exception:${e.toString()}');
44 | }
45 | return null;
46 | }
47 |
48 | /// Converts JSON string list [source] to object list.
49 | static List? getObjList(String? source, T Function(Map v) f) {
50 | if (source == null || source.isEmpty) return null;
51 | try {
52 | List list = json.decode(source);
53 | return list.map((value) {
54 | if (value is String) {
55 | value = json.decode(value);
56 | }
57 | return f(value);
58 | }).toList();
59 | } catch (e) {
60 | print('JsonUtil convert error, Exception:${e.toString()}');
61 | }
62 | return null;
63 | }
64 |
65 | /// Converts JSON string or JSON map list [source] to object list.
66 | static List? getObjectList(dynamic source, T Function(Map v) f) {
67 | if (source == null || source.toString().isEmpty) return null;
68 | try {
69 | List list;
70 | if (source is String) {
71 | list = json.decode(source);
72 | } else {
73 | list = source;
74 | }
75 | return list.map((value) {
76 | if (value is String) {
77 | value = json.decode(value);
78 | }
79 | return f(value);
80 | }).toList();
81 | } catch (e) {
82 | print('JsonUtil convert error, Exception:${e.toString()}');
83 | }
84 | return null;
85 | }
86 |
87 | /// get List
88 | /// [1, 2, 3, 4, 5, 6];
89 | /// "[\"tom\",\"tony\",\"jacky\"]";
90 | static List? getList(dynamic source) {
91 | List? list;
92 | if (source is String) {
93 | list = json.decode(source);
94 | } else {
95 | list = source;
96 | }
97 | return list?.map((v) {
98 | return v as T;
99 | }).toList();
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/lib/common/utils/jwt_decoder.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | //Decode a string JWT token into a `Map`
4 | class JwtDecoder {
5 | //Decode a string JWT token into a `Map`
6 | static Map? decode(String token) {
7 | final splitToken = token.split(".");
8 | if (splitToken.length != 3) {
9 | throw const FormatException('Invalid token');
10 | }
11 | try {
12 | final payloadBase64 = splitToken[1];
13 | final normalizedPayload = base64.normalize(payloadBase64);
14 | final payloadString = utf8.decode(base64.decode(normalizedPayload));
15 | final decodedPayload = jsonDecode(payloadString);
16 |
17 | return decodedPayload;
18 | } catch (error) {
19 | throw const FormatException('Invalid payload');
20 | }
21 | }
22 |
23 | /// Returns null if the token is not valid
24 | static Map? tryDecode(String token) {
25 | try {
26 | return decode(token);
27 | } catch (error) {
28 | return null;
29 | }
30 | }
31 |
32 | /// Returns true if the token is valid, false if it is expired.
33 | static bool isExpired(String token) {
34 | final expirationDate = getExpirationDate(token);
35 | // If the current date is after the expiration date, the token is already expired
36 | return DateTime.now().isAfter(expirationDate);
37 | }
38 |
39 | /// Returns token expiration date
40 | static DateTime getExpirationDate(String token) {
41 | final decodedToken = decode(token)!;
42 |
43 | final expirationDate = DateTime.fromMillisecondsSinceEpoch(0)
44 | .add(Duration(seconds: decodedToken['exp'].toInt()));
45 | return expirationDate;
46 | }
47 |
48 | /// Returns token issuing date (iat)
49 | static Duration getTokenTime(String token) {
50 | final decodedToken = decode(token)!;
51 |
52 | final issuedAtDate = DateTime.fromMillisecondsSinceEpoch(0)
53 | .add(Duration(seconds: decodedToken["iat"]));
54 | return DateTime.now().difference(issuedAtDate);
55 | }
56 |
57 | /// Returns remaining time until expiry date.
58 | static Duration getRemainingTime(String token) {
59 | final expirationDate = getExpirationDate(token);
60 |
61 | return expirationDate.difference(DateTime.now());
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/lib/common/utils/log_util.dart:
--------------------------------------------------------------------------------
1 | import 'dart:developer';
2 |
3 | /**
4 | * @author: Kxmrg
5 | * @github: https://github.com/Kxmrg
6 | * @version: 1.0.0
7 | * @copyright: Copyright © 2023-2024 Kxmrg
8 | * @license: MIT License
9 | * @date: 2024-06-28
10 | * @description:
11 | */
12 |
13 | ///日志工具
14 | class Logger {
15 | static bool _debug = false;
16 | static String _tag = 'Logger';
17 | static String _networkTag = 'Dio';
18 |
19 | static void init(bool isDebug, String? tag, String? networkTag) {
20 | _debug = isDebug;
21 | _tag = tag ?? 'Logger';
22 | _networkTag = networkTag ?? 'Dio';
23 | }
24 |
25 | static void d(String message, [String? tag]) {
26 | if (_debug) {
27 | log(message, name: tag ?? _tag);
28 | }
29 | }
30 |
31 | static void network(String message, [String? tag]) {
32 | if (_debug) {
33 | log(message, name: tag ?? _networkTag);
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/lib/common/utils/object_util.dart:
--------------------------------------------------------------------------------
1 | /**
2 | * @Author: Sky24n
3 | * @GitHub: https://github.com/Sky24n
4 | * @Description: Object Util.
5 | * @Date: 2018/9/8
6 | */
7 |
8 | /// Object Util.
9 | class ObjectUtil {
10 | /// Returns true if the string is null or 0-length.
11 | static bool isEmptyString(String? str) {
12 | return str == null || str.isEmpty;
13 | }
14 |
15 | /// Returns true if the list is null or 0-length.
16 | static bool isEmptyList(Iterable? list) {
17 | return list == null || list.isEmpty;
18 | }
19 |
20 | /// Returns true if there is no key/value pair in the map.
21 | static bool isEmptyMap(Map? map) {
22 | return map == null || map.isEmpty;
23 | }
24 |
25 | /// Returns true String or List or Map is empty.
26 | static bool isEmpty(Object? object) {
27 | if (object == null) return true;
28 | if (object is String && object.isEmpty) {
29 | return true;
30 | } else if (object is Iterable && object.isEmpty) {
31 | return true;
32 | } else if (object is Map && object.isEmpty) {
33 | return true;
34 | }
35 | return false;
36 | }
37 |
38 | /// Returns true String or List or Map is not empty.
39 | static bool isNotEmpty(Object? object) {
40 | return !isEmpty(object);
41 | }
42 |
43 | /// Returns true Two List Is Equal.
44 | static bool twoListIsEqual(List? listA, List? listB) {
45 | if (listA == listB) return true;
46 | if (listA == null || listB == null) return false;
47 | int length = listA.length;
48 | if (length != listB.length) return false;
49 | for (int i = 0; i < length; i++) {
50 | if (!listA.contains(listB[i])) {
51 | return false;
52 | }
53 | }
54 | return true;
55 | }
56 |
57 | /// get length.
58 | static int getLength(Object? value) {
59 | if (value == null) return 0;
60 | if (value is String) {
61 | return value.length;
62 | } else if (value is Iterable) {
63 | return value.length;
64 | } else if (value is Map) {
65 | return value.length;
66 | } else {
67 | return 0;
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/lib/common/utils/permission_util.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'dart:io';
3 |
4 | import 'package:getx_scaffold/getx_scaffold.dart';
5 |
6 | /**
7 | * @author: Kxmrg
8 | * @github: https://github.com/Kxmrg
9 | * @version: 1.0.0
10 | * @copyright: Copyright © 2023-2024 Kxmrg
11 | * @license: MIT License
12 | * @date: 2024-07-18
13 | * @description:
14 | */
15 |
16 | /// 动态授权工具
17 | class PermissionUtil {
18 | /// 申请权限
19 | static Future request({
20 | required Permission permission,
21 | String? title,
22 | String? confirmText,
23 | required String message,
24 | required String error,
25 | double? width,
26 | }) async {
27 | if (await permission.isGranted) {
28 | return true;
29 | }
30 | Completer completer = Completer();
31 | DialogX.to.showPromptDialog(
32 | icon: DialogIcon.warn,
33 | title: title ?? '授权确认',
34 | message: message,
35 | barrierDismissible: false,
36 | confirmText: confirmText ?? '确认授权',
37 | width: width,
38 | onConfirm: () async {
39 | var status = await permission.request();
40 | if (status.isGranted) {
41 | completer.complete(true);
42 | } else {
43 | completer.complete(false);
44 | }
45 | },
46 | onCancel: () {
47 | completer.complete(false);
48 | },
49 | );
50 |
51 | if (await completer.future) {
52 | return true;
53 | } else {
54 | showError(error);
55 | return false;
56 | }
57 | }
58 |
59 | /// 相机权限
60 | static Future camera({double? width}) async {
61 | return await request(
62 | permission: Permission.camera,
63 | message: '我们申请使用您设备的相机权限,用于扫描二维码或者采集必要的身份信息',
64 | error: '请授权相机权限',
65 | width: width,
66 | );
67 | }
68 |
69 | /// 相册权限
70 | static Future photos({double? width}) async {
71 | String message = '我们申请使用您设备的相册权限,用于读写您相册中的照片';
72 | String error = '请授权相册权限';
73 | if (Platform.isAndroid) {
74 | int version = await getAndroidSdkVersion() ?? 0;
75 | if (version < 33) {
76 | return await request(
77 | permission: Permission.storage,
78 | message: message,
79 | error: error,
80 | width: width,
81 | );
82 | }
83 | }
84 | return await request(
85 | permission: Permission.photos,
86 | message: message,
87 | error: error,
88 | width: width,
89 | );
90 | }
91 |
92 | /// 蓝牙权限
93 | static Future bluetooth({double? width}) async {
94 | String message = '我们申请使用您设备的蓝牙功能,用于发现和链接蓝牙设备';
95 | String error = '请授权蓝牙权限';
96 | if (Platform.isAndroid) {
97 | int version = await getAndroidSdkVersion() ?? 0;
98 | if (version < 31) {
99 | return await request(
100 | permission: Permission.bluetooth,
101 | message: message,
102 | error: error,
103 | width: width,
104 | );
105 | }
106 | }
107 | return await request(
108 | permission: Permission.bluetoothConnect,
109 | message: message,
110 | error: error,
111 | width: width,
112 | );
113 | }
114 |
115 | /// 打开系统设置
116 | static Future openSettings() async {
117 | return await openAppSettings();
118 | }
119 | }
120 |
--------------------------------------------------------------------------------
/lib/common/utils/rsa_util.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:encrypt/encrypt.dart';
4 | import 'package:flutter/services.dart';
5 |
6 | /**
7 | * @author: Kxmrg
8 | * @github: https://github.com/Kxmrg
9 | * @version: 1.0.0
10 | * @copyright: Copyright © 2023-2024 Kxmrg
11 | * @license: MIT License
12 | * @date: 2024-07-03
13 | * @description:
14 | */
15 |
16 | /// RSA工具类
17 | class RSAUtil {
18 | static RSAUtil? _instance;
19 | dynamic k;
20 |
21 | RSAUtil._();
22 |
23 | /// 工厂方法
24 | static RSAUtil getInstance() {
25 | _instance ??= RSAUtil._();
26 | return _instance!;
27 | }
28 |
29 | /// 初始化
30 | Future init(String key) async {
31 | final keyFile = await rootBundle.loadString(key);
32 | k = RSAKeyParser().parse(keyFile);
33 | }
34 |
35 | /// 加密
36 | String encode(String content) {
37 | final encrypter = Encrypter(RSA(publicKey: k));
38 | return encrypter.encrypt(content).base64;
39 | }
40 |
41 | /// 解密
42 | String decode(String content) {
43 | final encrypter = Encrypter(RSA(privateKey: k));
44 | return encrypter.decrypt(Encrypted.fromBase64(content));
45 | }
46 |
47 | /// 签名
48 | String sign(String content) {
49 | List bytes = utf8.encode(content);
50 | Uint8List uint8List = Uint8List.fromList(bytes);
51 | return RSASigner(RSASignDigest.SHA256, privateKey: k)
52 | .sign(uint8List)
53 | .base64;
54 | }
55 |
56 | /// 验签
57 | bool verify(String content, String signature) {
58 | List bytes = utf8.encode(content);
59 | Uint8List uint8List = Uint8List.fromList(bytes);
60 | return RSASigner(RSASignDigest.SHA256, publicKey: k)
61 | .verify(uint8List, Encrypted.fromBase64(signature));
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/lib/common/utils/shared_pref.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:getx_scaffold/getx_scaffold.dart';
4 |
5 | /// Add a value in SharedPref based on their type - Must be a String, int, bool, double, Map or StringList
6 | Future setValue(String key, dynamic value, {bool print = true}) async {
7 | if (print) log('${value.runtimeType} - $key : $value', 'SharedPreferences');
8 |
9 | if (value is String) {
10 | return await sharedPreferences.setString(key, value);
11 | } else if (value is int) {
12 | return await sharedPreferences.setInt(key, value);
13 | } else if (value is bool) {
14 | return await sharedPreferences.setBool(key, value);
15 | } else if (value is double) {
16 | return await sharedPreferences.setDouble(key, value);
17 | } else if (value is Map) {
18 | return await sharedPreferences.setString(key, jsonEncode(value));
19 | } else if (value is List) {
20 | return await sharedPreferences.setStringList(key, value);
21 | } else {
22 | throw ArgumentError(
23 | 'Invalid value ${value.runtimeType} - Must be a String, int, bool, double, Map or StringList');
24 | }
25 | }
26 |
27 | /// Returns List of Keys that matches with given Key
28 | List getMatchingSharedPrefKeys(String key) {
29 | List keys = [];
30 |
31 | sharedPreferences.getKeys().forEach((element) {
32 | if (element.contains(key)) {
33 | keys.add(element);
34 | }
35 | });
36 |
37 | return keys;
38 | }
39 |
40 | /// Returns a StringList if exists in SharedPref
41 | List? getStringListAsync(String key) {
42 | return sharedPreferences.getStringList(key);
43 | }
44 |
45 | /// Returns a Bool if exists in SharedPref
46 | bool getBoolAsync(String key, {bool defaultValue = false}) {
47 | return sharedPreferences.getBool(key) ?? defaultValue;
48 | }
49 |
50 | /// Returns a Double if exists in SharedPref
51 | double getDoubleAsync(String key, {double defaultValue = 0.0}) {
52 | return sharedPreferences.getDouble(key) ?? defaultValue;
53 | }
54 |
55 | /// Returns a Int if exists in SharedPref
56 | int getIntAsync(String key, {int defaultValue = 0}) {
57 | return sharedPreferences.getInt(key) ?? defaultValue;
58 | }
59 |
60 | /// Returns a String if exists in SharedPref
61 | String getStringAsync(String key, {String defaultValue = ''}) {
62 | return sharedPreferences.getString(key) ?? defaultValue;
63 | }
64 |
65 | /// Returns a JSON if exists in SharedPref
66 | Map getJSONAsync(String key,
67 | {Map? defaultValue}) {
68 | if (sharedPreferences.containsKey(key) &&
69 | (sharedPreferences.getString(key)?.isNotEmpty ?? false)) {
70 | return jsonDecode(sharedPreferences.getString(key)!);
71 | } else {
72 | return defaultValue ?? {};
73 | }
74 | }
75 |
76 | /// remove key from SharedPref
77 | Future removeKey(String key) async {
78 | return await sharedPreferences.remove(key);
79 | }
80 |
81 | /// clear SharedPref
82 | Future clearSharedPref() async {
83 | return await sharedPreferences.clear();
84 | }
85 |
--------------------------------------------------------------------------------
/lib/common/utils/text_util.dart:
--------------------------------------------------------------------------------
1 | /**
2 | * @Author: Sky24n
3 | * @GitHub: https://github.com/Sky24n
4 | * @Description: Text Util.
5 | * @Date: 2019/7/9
6 | */
7 |
8 | /// Text Util.
9 | class TextUtil {
10 | /// isEmpty
11 | static bool isEmpty(String? text) {
12 | return text == null || text.isEmpty;
13 | }
14 |
15 | /// 每隔 x位 加 pattern
16 | static String formatDigitPattern(String text,
17 | {int digit = 4, String pattern = ' '}) {
18 | text = text.replaceAllMapped(RegExp('(.{$digit})'), (Match match) {
19 | return '${match.group(0)}$pattern';
20 | });
21 | if (text.endsWith(pattern)) {
22 | text = text.substring(0, text.length - 1);
23 | }
24 | return text;
25 | }
26 |
27 | /// 每隔 x位 加 pattern, 从末尾开始
28 | static String formatDigitPatternEnd(String text,
29 | {int digit = 4, String pattern = ' '}) {
30 | String temp = reverse(text);
31 | temp = formatDigitPattern(temp, digit: digit, pattern: pattern);
32 | temp = reverse(temp);
33 | return temp;
34 | }
35 |
36 | /// 每隔4位加空格
37 | static String formatSpace4(String text) {
38 | return formatDigitPattern(text);
39 | }
40 |
41 | /// 每隔3三位加逗号
42 | /// num 数字或数字字符串。int型。
43 | static String formatComma3(Object num) {
44 | return formatDigitPatternEnd(num.toString(), digit: 3, pattern: ',');
45 | }
46 |
47 | /// 每隔3三位加逗号
48 | /// num 数字或数字字符串。double型。
49 | static String formatDoubleComma3(Object num,
50 | {int digit = 3, String pattern = ','}) {
51 | List list = num.toString().split('.');
52 | String left =
53 | formatDigitPatternEnd(list[0], digit: digit, pattern: pattern);
54 | String right = list[1];
55 | return '$left.$right';
56 | }
57 |
58 | /// hideNumber
59 | static String hideNumber(String phoneNo,
60 | {int start = 3, int end = 7, String replacement = '****'}) {
61 | return phoneNo.replaceRange(start, end, replacement);
62 | }
63 |
64 | /// replace
65 | static String replace(String text, Pattern from, String replace) {
66 | return text.replaceAll(from, replace);
67 | }
68 |
69 | /// split
70 | static List split(String text, Pattern pattern) {
71 | return text.split(pattern);
72 | }
73 |
74 | /// reverse
75 | static String reverse(String text) {
76 | if (isEmpty(text)) return '';
77 | StringBuffer sb = StringBuffer();
78 | for (int i = text.length - 1; i >= 0; i--) {
79 | sb.writeCharCode(text.codeUnitAt(i));
80 | }
81 | return sb.toString();
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/lib/common/utils/timer_util.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | ///timer callback.(millisUntilFinished 毫秒).
4 | typedef OnTimerTickCallback = void Function(int millisUntilFinished);
5 |
6 | /**
7 | * @Author: Sky24n
8 | * @GitHub: https://github.com/Sky24n
9 | * @Description: Timer Util.
10 | * @Date: 2018/9/28
11 | */
12 |
13 | /// TimerUtil.
14 | class TimerUtil {
15 | TimerUtil(
16 | {this.mInterval = Duration.millisecondsPerSecond, this.mTotalTime = 0});
17 |
18 | /// Timer.
19 | Timer? _mTimer;
20 |
21 | /// Is Timer active.
22 | /// Timer是否启动.
23 | bool _isActive = false;
24 |
25 | /// Timer interval (unit millisecond,def: 1000 millisecond).
26 | /// Timer间隔 单位毫秒,默认1000毫秒(1秒).
27 | int mInterval;
28 |
29 | /// countdown totalTime.
30 | /// 倒计时总时间
31 | int mTotalTime; //单位毫秒
32 |
33 | OnTimerTickCallback? _onTimerTickCallback;
34 |
35 | /// set Timer interval. (unit millisecond).
36 | /// 设置Timer间隔.
37 | void setInterval(int interval) {
38 | if (interval <= 0) interval = Duration.millisecondsPerSecond;
39 | mInterval = interval;
40 | }
41 |
42 | /// set countdown totalTime. (unit millisecond).
43 | /// 设置倒计时总时间.
44 | void setTotalTime(int totalTime) {
45 | if (totalTime <= 0) return;
46 | mTotalTime = totalTime;
47 | }
48 |
49 | /// start Timer.
50 | /// 启动定时Timer.
51 | void startTimer() {
52 | if (_isActive || mInterval <= 0) return;
53 | _isActive = true;
54 | Duration duration = Duration(milliseconds: mInterval);
55 | _doCallback(0);
56 | _mTimer = Timer.periodic(duration, (Timer timer) {
57 | _doCallback(timer.tick);
58 | });
59 | }
60 |
61 | /// start countdown Timer.
62 | /// 启动倒计时Timer.
63 | void startCountDown() {
64 | if (_isActive || mInterval <= 0 || mTotalTime <= 0) return;
65 | _isActive = true;
66 | Duration duration = Duration(milliseconds: mInterval);
67 | _doCallback(mTotalTime);
68 | _mTimer = Timer.periodic(duration, (Timer timer) {
69 | int time = mTotalTime - mInterval;
70 | mTotalTime = time;
71 | if (time >= mInterval) {
72 | _doCallback(time);
73 | } else if (time == 0) {
74 | _doCallback(time);
75 | cancel();
76 | } else {
77 | timer.cancel();
78 | Future.delayed(Duration(milliseconds: time), () {
79 | mTotalTime = 0;
80 | _doCallback(0);
81 | cancel();
82 | });
83 | }
84 | });
85 | }
86 |
87 | void _doCallback(int time) {
88 | if (_onTimerTickCallback != null) {
89 | _onTimerTickCallback!(time);
90 | }
91 | }
92 |
93 | /// update countdown totalTime.
94 | /// 重设倒计时总时间.
95 | void updateTotalTime(int totalTime) {
96 | cancel();
97 | mTotalTime = totalTime;
98 | startCountDown();
99 | }
100 |
101 | /// timer is Active.
102 | /// Timer是否启动.
103 | bool isActive() {
104 | return _isActive;
105 | }
106 |
107 | /// Cancels the timer.
108 | /// 取消计时器.
109 | void cancel() {
110 | _mTimer?.cancel();
111 | _mTimer = null;
112 | _isActive = false;
113 | }
114 |
115 | /// set timer callback.
116 | void setOnTimerTickCallback(OnTimerTickCallback callback) {
117 | _onTimerTickCallback = callback;
118 | }
119 | }
120 |
--------------------------------------------------------------------------------
/lib/common/utils/toast_util.dart:
--------------------------------------------------------------------------------
1 | import 'package:getx_scaffold/getx_scaffold.dart';
2 |
3 | /**
4 | * @author: Kxmrg
5 | * @github: https://github.com/Kxmrg
6 | * @version: 1.0.0
7 | * @copyright: Copyright © 2023-2024 Kxmrg
8 | * @license: MIT License
9 | * @date: 2024-06-28
10 | * @description:
11 | */
12 |
13 | /// Toast工具
14 | class Toast {
15 | static void show(
16 | String text, {
17 | Image? preIcon,
18 | Duration? length,
19 | BrnToastGravity? gravity,
20 | }) {
21 | BrnToast.show(
22 | text,
23 | Get.context!,
24 | preIcon: preIcon,
25 | duration: length,
26 | gravity: gravity ?? BrnToastGravity.bottom,
27 | verticalOffset: 80.h,
28 | );
29 | }
30 |
31 | static void success(
32 | String text, {
33 | Duration? length,
34 | BrnToastGravity? gravity,
35 | }) {
36 | Toast.show(
37 | text,
38 | preIcon: Image.asset(
39 | 'assets/icons/ic_success.png',
40 | package: pluginPackageName,
41 | width: 20,
42 | height: 20,
43 | ),
44 | length: length,
45 | gravity: gravity,
46 | );
47 | }
48 |
49 | static void error(
50 | String text, {
51 | Duration? length,
52 | BrnToastGravity? gravity,
53 | }) {
54 | Toast.show(
55 | text,
56 | preIcon: Image.asset(
57 | 'assets/icons/ic_error.png',
58 | package: pluginPackageName,
59 | width: 20,
60 | height: 20,
61 | ),
62 | length: length,
63 | gravity: gravity,
64 | );
65 | }
66 |
67 | static void info(
68 | String text, {
69 | Duration? length,
70 | BrnToastGravity? gravity,
71 | }) {
72 | Toast.show(
73 | text,
74 | preIcon: Image.asset(
75 | 'assets/icons/ic_info.png',
76 | package: pluginPackageName,
77 | width: 20,
78 | height: 20,
79 | ),
80 | length: length,
81 | gravity: gravity,
82 | );
83 | }
84 |
85 | static void warning(
86 | String text, {
87 | Duration? length,
88 | BrnToastGravity? gravity,
89 | }) {
90 | Toast.show(
91 | text,
92 | preIcon: Image.asset(
93 | 'assets/icons/ic_warning.png',
94 | package: pluginPackageName,
95 | width: 20,
96 | height: 20,
97 | ),
98 | length: length,
99 | gravity: gravity,
100 | );
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/lib/common/widgets/divider_x.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | /**
4 | * @author: Kxmrg
5 | * @github: https://github.com/Kxmrg
6 | * @version: 1.0.0
7 | * @copyright: Copyright © 2023-2024 Kxmrg
8 | * @license: MIT License
9 | * @date: 2024-07-03
10 | * @description:
11 | */
12 |
13 | /// 分割线组件
14 | class DividerX extends StatelessWidget {
15 | const DividerX({super.key});
16 |
17 | @override
18 | Widget build(BuildContext context) {
19 | return const Divider(
20 | height: 0.6,
21 | thickness: 0.6,
22 | );
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/common/widgets/double_press_back.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/services.dart';
2 | import 'package:getx_scaffold/getx_scaffold.dart';
3 |
4 | /**
5 | * @author: Kxmrg
6 | * @github: https://github.com/Kxmrg
7 | * @version: 1.0.0
8 | * @copyright: Copyright © 2023-2024 Kxmrg
9 | * @license: MIT License
10 | * @date: 2024-07-04
11 | * @description:
12 | */
13 |
14 | /// 返回回调
15 | typedef DoublePressBackCallback = Future Function();
16 |
17 | /// DoublePressBackWidget
18 | // ignore: must_be_immutable
19 | class DoublePressBackWidget extends StatelessWidget {
20 | final Widget child;
21 | final String? message;
22 | final DoublePressBackCallback? backCallback;
23 |
24 | DateTime? _currentBackPressTime;
25 |
26 | DoublePressBackWidget({
27 | super.key,
28 | required this.child,
29 | this.message,
30 | this.backCallback,
31 | });
32 |
33 | // 返回键退出
34 | bool closeOnConfirm() {
35 | DateTime now = DateTime.now();
36 | if (_currentBackPressTime == null ||
37 | now.difference(_currentBackPressTime!) > const Duration(seconds: 2)) {
38 | _currentBackPressTime = now;
39 | showToast(message ?? 'Press back again to exit');
40 | return false;
41 | }
42 | _currentBackPressTime = null;
43 | return true;
44 | }
45 |
46 | @override
47 | Widget build(BuildContext context) {
48 | return PopScope(
49 | canPop: false,
50 | onPopInvokedWithResult: (bool didPop, value) async {
51 | if (didPop) {
52 | return;
53 | }
54 | if (closeOnConfirm()) {
55 | if (backCallback != null) {
56 | if (!await backCallback!()) {
57 | return;
58 | }
59 | }
60 | SystemNavigator.pop();
61 | }
62 | },
63 | child: child,
64 | );
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/lib/common/widgets/index.dart:
--------------------------------------------------------------------------------
1 | library widgets;
2 |
3 | /**
4 | * @author: Kxmrg
5 | * @github: https://github.com/Kxmrg
6 | * @version: 1.0.0
7 | * @copyright: Copyright © 2023-2024 Kxmrg
8 | * @license: MIT License
9 | * @date: 2024-06-28
10 | * @description:
11 | */
12 |
13 | export './keep_alive_wrapper.dart';
14 | export './divider_x.dart';
15 | export './double_press_back.dart';
16 | export './text_x.dart';
17 | export './text_tag.dart';
18 | export './rotation_transition_widget.dart';
19 | export './rich_text_x.dart';
20 | export './icon_x.dart';
21 | export './image_x.dart';
22 | export './button_x.dart';
23 | export './navigation_x.dart';
24 | export './load_container.dart';
25 | export './read_more_text.dart';
26 | export './list_tile_x.dart';
27 |
--------------------------------------------------------------------------------
/lib/common/widgets/keep_alive_wrapper.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/widgets.dart';
2 |
3 | /**
4 | * @author: Kxmrg
5 | * @github: https://github.com/Kxmrg
6 | * @version: 1.0.0
7 | * @copyright: Copyright © 2023-2024 Kxmrg
8 | * @license: MIT License
9 | * @date: 2024-06-28
10 | * @description:
11 | */
12 |
13 | /// 保持状态
14 | class KeepAliveWrapper extends StatefulWidget {
15 | final bool keepAlive;
16 | final Widget child;
17 |
18 | const KeepAliveWrapper({
19 | super.key,
20 | this.keepAlive = true,
21 | required this.child,
22 | });
23 |
24 | @override
25 | KeepAliveWrapperState createState() => KeepAliveWrapperState();
26 | }
27 |
28 | class KeepAliveWrapperState extends State
29 | with AutomaticKeepAliveClientMixin {
30 | @override
31 | Widget build(BuildContext context) {
32 | super.build(context);
33 | return widget.child;
34 | }
35 |
36 | @override
37 | void didUpdateWidget(covariant KeepAliveWrapper oldWidget) {
38 | if (oldWidget.keepAlive != widget.keepAlive) {
39 | // keepAlive 状态需要更新,实现在 AutomaticKeepAliveClientMixin 中
40 | updateKeepAlive();
41 | }
42 | super.didUpdateWidget(oldWidget);
43 | }
44 |
45 | @override
46 | bool get wantKeepAlive => widget.keepAlive;
47 | }
48 |
--------------------------------------------------------------------------------
/lib/common/widgets/list_tile_x.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:getx_scaffold/getx_scaffold.dart';
3 |
4 | class ListTileX extends StatelessWidget {
5 | final String? icon;
6 |
7 | final String? title;
8 |
9 | final Color? titleColor;
10 |
11 | final FontWeight? titleWeight;
12 |
13 | final Widget? titleWidget;
14 |
15 | final String? subTitle;
16 |
17 | final Widget? trailing;
18 |
19 | final bool showTrailing;
20 |
21 | final Function()? onTap;
22 |
23 | final Function()? onLongPress;
24 |
25 | final Color? backgroundColor;
26 |
27 | const ListTileX({
28 | super.key,
29 | this.icon,
30 | this.title,
31 | this.titleColor,
32 | this.titleWeight,
33 | this.titleWidget,
34 | this.subTitle,
35 | this.trailing,
36 | this.onTap,
37 | this.onLongPress,
38 | this.showTrailing = true,
39 | this.backgroundColor,
40 | });
41 |
42 | Widget _buildTitle() {
43 | if (titleWidget != null) {
44 | return titleWidget!;
45 | }
46 | return [
47 | TextX.labelLarge(
48 | title ?? '',
49 | maxLines: 1,
50 | softWrap: false,
51 | overflow: TextOverflow.fade,
52 | color: titleColor,
53 | weight: titleWeight,
54 | ).constrained(maxWidth: 0.65.sw),
55 | ].toRow(
56 | crossAxisAlignment: CrossAxisAlignment.center,
57 | mainAxisSize: MainAxisSize.max,
58 | );
59 | }
60 |
61 | Widget _buildSubTitle() {
62 | return TextX.bodySmall(subTitle ?? '');
63 | }
64 |
65 | @override
66 | Widget build(BuildContext context) {
67 | Widget? iconWidget;
68 | if (icon != null) {
69 | iconWidget = IconX.svg(
70 | icon,
71 | size: 22.sp,
72 | ).padding(right: 12.w);
73 | }
74 | return [
75 | if (iconWidget != null) iconWidget,
76 | [
77 | _buildTitle(),
78 | if (subTitle != null) _buildSubTitle().padding(top: 3.h),
79 | ]
80 | .toColumn(
81 | mainAxisSize: MainAxisSize.min,
82 | crossAxisAlignment: CrossAxisAlignment.start,
83 | )
84 | .padding(vertical: 18.h, right: 10.w)
85 | .expand(),
86 | trailing ??
87 | (showTrailing
88 | ? IconX.icon(
89 | Icons.keyboard_arrow_right,
90 | color: ThemeColor.onSurfaceVariant,
91 | size: 18.sp,
92 | )
93 | : Container())
94 | .alignCenterRight(),
95 | ]
96 | .toRow()
97 | .padding(
98 | left: 15.h,
99 | right: 5.h,
100 | )
101 | .inkWell(
102 | onTap: () {
103 | if (onTap != null) {
104 | onTap!();
105 | }
106 | },
107 | onLongPress: () {
108 | if (onLongPress != null) {
109 | onLongPress!();
110 | }
111 | },
112 | ).backgroundColor(backgroundColor ?? ThemeColor.surface);
113 | }
114 | }
115 |
--------------------------------------------------------------------------------
/lib/common/widgets/navigation_x.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:getx_scaffold/getx_scaffold.dart';
3 |
4 | /**
5 | * @author: Kxmrg
6 | * @github: https://github.com/Kxmrg
7 | * @version: 1.0.0
8 | * @copyright: Copyright © 2023-2024 Kxmrg
9 | * @license: MIT License
10 | * @date: 2024-07-06
11 | * @description:
12 | */
13 |
14 | /// 导航栏数据模型
15 | class NavigationItemModel {
16 | final String label;
17 | final IconData icon;
18 | final IconData? selectedIcon;
19 | final bool? dot;
20 | final String? badge;
21 |
22 | NavigationItemModel({
23 | required this.label,
24 | required this.icon,
25 | this.selectedIcon,
26 | this.dot,
27 | this.badge,
28 | });
29 | }
30 |
31 | /// 导航栏
32 | class NavigationX extends StatelessWidget {
33 | final int currentIndex;
34 | final List items;
35 | final Function(int) onTap;
36 |
37 | const NavigationX({
38 | super.key,
39 | required this.currentIndex,
40 | required this.items,
41 | required this.onTap,
42 | });
43 |
44 | @override
45 | Widget build(BuildContext context) {
46 | var widgets = [];
47 | for (var i = 0; i < items.length; i++) {
48 | Color color =
49 | (i == currentIndex) ? ThemeColor.primary : ThemeColor.onSurface;
50 | var weight = (i == currentIndex) ? FontWeight.bold : FontWeight.normal;
51 | var item = items[i];
52 | widgets.add(
53 | ElevatedButton(
54 | style: ButtonStyle(
55 | elevation: WidgetStateProperty.all(0),
56 | backgroundColor: WidgetStateProperty.all(Colors.transparent),
57 | overlayColor: WidgetStateProperty.all(
58 | ThemeColor.primary.withOpacity(0.05),
59 | ),
60 | shape: WidgetStateProperty.all(
61 | RoundedRectangleBorder(
62 | borderRadius: BorderRadius.all(Radius.circular(14.r)),
63 | ),
64 | )),
65 | child: [
66 | IconX.icon(
67 | i == currentIndex ? item.selectedIcon ?? item.icon : item.icon,
68 | size: 22.sp,
69 | color: color,
70 | dot: item.dot,
71 | badge: item.badge,
72 | ),
73 | TextX.labelSmall(
74 | item.label,
75 | color: color,
76 | weight: weight,
77 | ).padding(top: 1.h),
78 | ].toColumn(
79 | mainAxisAlignment: MainAxisAlignment.center,
80 | mainAxisSize: MainAxisSize.max,
81 | ),
82 | onPressed: () {
83 | onTap(i);
84 | },
85 | ).expand(),
86 | );
87 | }
88 | return BottomAppBar(
89 | height: 68.h,
90 | padding: EdgeInsets.symmetric(vertical: 5.h, horizontal: 10.w),
91 | child: widgets.toRow(
92 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
93 | crossAxisAlignment: CrossAxisAlignment.center,
94 | ),
95 | );
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/lib/common/widgets/rich_text_x.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/gestures.dart';
2 | import 'package:getx_scaffold/getx_scaffold.dart';
3 |
4 | class TextSpanItem {
5 | final String text;
6 | final double? textSize;
7 | final Color? textColor;
8 | final Function()? onTap;
9 |
10 | TextSpanItem(
11 | this.text, {
12 | this.onTap,
13 | this.textSize,
14 | this.textColor,
15 | });
16 | }
17 |
18 | /**
19 | * @author: Kxmrg
20 | * @github: https://github.com/Kxmrg
21 | * @version: 1.0.0
22 | * @copyright: Copyright © 2023-2024 Kxmrg
23 | * @license: MIT License
24 | * @date: 2024-07-04
25 | * @description:
26 | */
27 |
28 | /// 简易的可点击文本
29 | class RichTextX extends StatelessWidget {
30 | final List children;
31 |
32 | const RichTextX({super.key, required this.children});
33 |
34 | @override
35 | Widget build(BuildContext context) {
36 | if (children.isEmpty) {
37 | return const SizedBox();
38 | }
39 | List ws = [];
40 | for (int i = 0; i < children.length; i++) {
41 | ws.add(
42 | TextSpan(
43 | text: children[i].text,
44 | style: TextStyle(
45 | fontSize: children[i].textSize ?? 14.sp,
46 | color: children[i].onTap == null
47 | ? children[i].textColor ?? ThemeColor.onSurface
48 | : children[i].textColor ?? ThemeColor.primary,
49 | ),
50 | recognizer: TapGestureRecognizer()
51 | ..onTap = () {
52 | if (children[i].onTap != null) {
53 | children[i].onTap!();
54 | }
55 | },
56 | ),
57 | );
58 | }
59 | return RichText(
60 | text: TextSpan(children: ws),
61 | );
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/lib/common/widgets/rotation_transition_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | /**
4 | * @author: Kxmrg
5 | * @github: https://github.com/Kxmrg
6 | * @version: 1.0.0
7 | * @copyright: Copyright © 2023-2024 Kxmrg
8 | * @license: MIT License
9 | * @date: 2024-07-04
10 | * @description:
11 | */
12 |
13 | /// 旋转动画
14 | class RotationTransitionWidget extends StatefulWidget {
15 | final Widget child;
16 | final RotationTransitionController controller;
17 | final bool autoplay;
18 | final int milliseconds;
19 |
20 | const RotationTransitionWidget(
21 | this.child,
22 | this.controller, {
23 | super.key,
24 | this.autoplay = false,
25 | this.milliseconds = 1000,
26 | });
27 |
28 | @override
29 | State createState() =>
30 | _RotationTransitionWidgetState();
31 | }
32 |
33 | class _RotationTransitionWidgetState extends State
34 | with TickerProviderStateMixin {
35 | late AnimationController animationController;
36 |
37 | @override
38 | void initState() {
39 | super.initState();
40 | animationController = AnimationController(
41 | duration: Duration(milliseconds: widget.milliseconds), vsync: this);
42 | animationController.addStatusListener((status) {
43 | if (status == AnimationStatus.completed && widget.controller.isPlaying) {
44 | animationController.reset();
45 | animationController.forward();
46 | }
47 | });
48 | widget.controller.addListener(() {
49 | if (widget.controller.isPlaying) {
50 | animationController.reset();
51 | animationController.forward();
52 | }
53 | });
54 | if (widget.autoplay) {
55 | widget.controller.start();
56 | }
57 | }
58 |
59 | @override
60 | void dispose() {
61 | animationController.dispose();
62 | super.dispose();
63 | }
64 |
65 | @override
66 | Widget build(BuildContext context) {
67 | return RotationTransition(
68 | //设置动画的旋转中心
69 | alignment: Alignment.center,
70 | //动画控制器
71 | turns: animationController,
72 | //将要执行动画的子view
73 | child: widget.child,
74 | );
75 | }
76 | }
77 |
78 | class RotationTransitionController extends ChangeNotifier {
79 | bool _isPlaying = false;
80 |
81 | void start() {
82 | _isPlaying = true;
83 | notifyListeners();
84 | }
85 |
86 | void stop() {
87 | _isPlaying = false;
88 | notifyListeners();
89 | }
90 |
91 | bool get isPlaying => _isPlaying;
92 | }
93 |
--------------------------------------------------------------------------------
/lib/common/widgets/text_tag.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:getx_scaffold/getx_scaffold.dart';
3 |
4 | /**
5 | * @author: Kxmrg
6 | * @github: https://github.com/Kxmrg
7 | * @version: 1.0.0
8 | * @copyright: Copyright © 2023-2024 Kxmrg
9 | * @license: MIT License
10 | * @date: 2024-07-04
11 | * @description:
12 | */
13 |
14 | /// 文本标签
15 | class TextTag extends StatelessWidget {
16 | final String text;
17 | final Color? color;
18 | final bool outline;
19 |
20 | const TextTag(
21 | this.text, {
22 | super.key,
23 | this.color,
24 | this.outline = false,
25 | });
26 |
27 | @override
28 | Widget build(BuildContext context) {
29 | if (outline) {
30 | return TextX.labelSmall(
31 | text,
32 | color: color ?? ThemeColor.primary,
33 | weight: FontWeight.w500,
34 | )
35 | .padding(
36 | horizontal: 10.w,
37 | vertical: 4.h,
38 | )
39 | .border(
40 | radius: 5.r,
41 | color: color ?? ThemeColor.primary,
42 | all: 1.4,
43 | );
44 | } else {
45 | return TextX.labelSmall(
46 | text,
47 | color: Colors.white,
48 | weight: FontWeight.bold,
49 | )
50 | .padding(
51 | horizontal: 10.w,
52 | vertical: 4.h,
53 | )
54 | .border(
55 | radius: 5.r,
56 | backgroundColor: color ?? ThemeColor.primary,
57 | );
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/lib/getx_scaffold.dart:
--------------------------------------------------------------------------------
1 | library getx_scaffold;
2 |
3 | /**
4 | * @author: Kxmrg
5 | * @github: https://github.com/Kxmrg
6 | * @version: 1.0.0
7 | * @copyright: Copyright © 2023-2024 Kxmrg
8 | * @license: MIT License
9 | * @date: 2024-06-28
10 | * @description: GetXScaffold
11 | */
12 |
13 | export './common/index.dart';
14 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: getx_scaffold
2 | description: "GetX Scaffold is a comprehensive rapid development template built on the GetX framework and several commonly used plugins"
3 | version: 0.2.2
4 | homepage: https://github.com/Kxmrg
5 | repository: https://github.com/Kxmrg/flutter_getx_scaffold
6 | issue_tracker: https://github.com/Kxmrg/flutter_getx_scaffold/issues
7 |
8 | environment:
9 | sdk: ">=3.3.3 <4.0.0"
10 | flutter: ">=3.3.0"
11 |
12 | dependencies:
13 | flutter:
14 | sdk: flutter
15 | intl: ^0.19.0
16 | crypto: ^3.0.3
17 | convert: ^3.1.1
18 | decimal: ^3.0.2
19 | rational: ^2.2.3
20 | get: ^4.6.6
21 | dio: ^5.7.0
22 | flutter_screenutil: ^5.9.3
23 | flutter_easyloading: ^3.0.5
24 | connectivity_plus: ^6.0.3
25 | event_bus: ^2.0.0
26 | shared_preferences: ^2.2.3
27 | encrypt: ^5.0.3
28 | package_info_plus: ^8.0.0
29 | device_info_plus: ^10.1.0
30 | url_launcher: ^6.3.0
31 | flutter_svg: ^2.0.10+1
32 | badges: ^3.1.2
33 | extended_image: ^8.2.1
34 | flutter_spinkit: ^5.2.1
35 | lottie: ^3.1.2
36 | modal_bottom_sheet: ^3.0.0
37 | permission_handler: ^11.3.1
38 | slider_captcha: ^1.0.0
39 |
40 | dev_dependencies:
41 | flutter_lints: ^4.0.0
42 |
43 | flutter:
44 | assets:
45 | - assets/icons/
46 | - assets/lottie/
47 | - assets/svgs/
48 |
49 | fonts:
50 | - family: antdIcon
51 | fonts:
52 | - asset: assets/fonts/icon-antd.ttf
53 |
--------------------------------------------------------------------------------