├── .github
└── FUNDING.yml
├── .gitignore
├── LICENSE
├── README.md
├── base_library
├── .gitignore
├── CHANGELOG.md
├── LICENSE
├── README.md
├── base_library.iml
├── example
│ ├── .flutter-plugins-dependencies
│ ├── .gitignore
│ ├── .metadata
│ ├── README.md
│ ├── android
│ │ ├── app
│ │ │ ├── build.gradle
│ │ │ └── src
│ │ │ │ ├── debug
│ │ │ │ └── AndroidManifest.xml
│ │ │ │ ├── main
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ ├── java
│ │ │ │ │ └── com
│ │ │ │ │ │ └── library
│ │ │ │ │ │ └── base_library_example
│ │ │ │ │ │ └── MainActivity.java
│ │ │ │ └── res
│ │ │ │ │ ├── drawable
│ │ │ │ │ └── launch_background.xml
│ │ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ └── values
│ │ │ │ │ └── styles.xml
│ │ │ │ └── profile
│ │ │ │ └── AndroidManifest.xml
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ ├── gradle
│ │ │ └── wrapper
│ │ │ │ └── gradle-wrapper.properties
│ │ └── settings.gradle
│ ├── ios
│ │ ├── Flutter
│ │ │ ├── AppFrameworkInfo.plist
│ │ │ ├── Debug.xcconfig
│ │ │ ├── Release.xcconfig
│ │ │ └── flutter_export_environment.sh
│ │ ├── Podfile
│ │ ├── Runner.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ ├── project.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ └── xcschemes
│ │ │ │ └── Runner.xcscheme
│ │ ├── Runner.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ └── Runner
│ │ │ ├── AppDelegate.h
│ │ │ ├── AppDelegate.m
│ │ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ │ ├── Icon-App-20x20@1x.png
│ │ │ │ ├── Icon-App-20x20@2x.png
│ │ │ │ ├── Icon-App-20x20@3x.png
│ │ │ │ ├── Icon-App-29x29@1x.png
│ │ │ │ ├── Icon-App-29x29@2x.png
│ │ │ │ ├── Icon-App-29x29@3x.png
│ │ │ │ ├── Icon-App-40x40@1x.png
│ │ │ │ ├── Icon-App-40x40@2x.png
│ │ │ │ ├── Icon-App-40x40@3x.png
│ │ │ │ ├── Icon-App-60x60@2x.png
│ │ │ │ ├── Icon-App-60x60@3x.png
│ │ │ │ ├── Icon-App-76x76@1x.png
│ │ │ │ ├── Icon-App-76x76@2x.png
│ │ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ │ └── LaunchImage.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchImage.png
│ │ │ │ ├── LaunchImage@2x.png
│ │ │ │ ├── LaunchImage@3x.png
│ │ │ │ └── README.md
│ │ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ │ ├── Info.plist
│ │ │ └── main.m
│ ├── lib
│ │ └── main.dart
│ ├── pubspec.yaml
│ └── test
│ │ └── widget_test.dart
├── lib
│ ├── assets
│ │ └── images
│ │ │ ├── ic_data_empty.png
│ │ │ ├── ic_login_bg.png
│ │ │ └── ic_network_error.png
│ ├── base_library.dart
│ └── src
│ │ ├── common
│ │ ├── common.dart
│ │ └── index.dart
│ │ ├── data
│ │ ├── index.dart
│ │ ├── net
│ │ │ └── dio_util.dart
│ │ └── protocol
│ │ │ └── base_resp.dart
│ │ ├── models
│ │ └── model.dart
│ │ ├── res
│ │ ├── colors.dart
│ │ ├── dimens.dart
│ │ ├── index.dart
│ │ ├── strings.dart
│ │ └── styles.dart
│ │ ├── ui
│ │ ├── dialog
│ │ │ ├── index.dart
│ │ │ └── upgrade_dialog.dart
│ │ ├── index.dart
│ │ └── wigets.dart
│ │ └── util
│ │ ├── index.dart
│ │ ├── route_util.dart
│ │ ├── util.dart
│ │ └── version_util.dart
├── pkgget
├── pubspec.yaml
└── uploadMaster
├── flutter_gallery
├── .flutter-plugins
├── .flutter-plugins-dependencies
├── .gitignore
├── .idea
│ ├── codeStyles
│ │ └── Project.xml
│ ├── flutter_gallery.iml
│ ├── libraries
│ │ ├── Dart_Packages.xml
│ │ ├── Dart_SDK.xml
│ │ └── Flutter_Plugins.xml
│ ├── markdown-navigator-enh.xml
│ ├── markdown-navigator.xml
│ ├── modules.xml
│ ├── vcs.xml
│ └── workspace.xml
├── BUILD.gn
├── README.md
├── analysis_options.yaml
├── android
│ ├── .gradle
│ │ ├── 5.6.2
│ │ │ ├── executionHistory
│ │ │ │ ├── executionHistory.bin
│ │ │ │ └── executionHistory.lock
│ │ │ ├── fileChanges
│ │ │ │ └── last-build.bin
│ │ │ ├── fileContent
│ │ │ │ └── fileContent.lock
│ │ │ ├── fileHashes
│ │ │ │ ├── fileHashes.bin
│ │ │ │ ├── fileHashes.lock
│ │ │ │ └── resourceHashesCache.bin
│ │ │ ├── gc.properties
│ │ │ └── javaCompile
│ │ │ │ ├── classAnalysis.bin
│ │ │ │ ├── jarAnalysis.bin
│ │ │ │ ├── javaCompile.lock
│ │ │ │ └── taskHistory.bin
│ │ ├── buildOutputCleanup
│ │ │ ├── buildOutputCleanup.lock
│ │ │ ├── cache.properties
│ │ │ └── outputFiles.bin
│ │ └── vcs-1
│ │ │ └── gc.properties
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── io
│ │ │ │ └── flutter
│ │ │ │ └── demo
│ │ │ │ └── gallery
│ │ │ │ └── FlutterGalleryInstrumentationTest.java
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ └── io
│ │ │ │ └── flutter
│ │ │ │ ├── demo
│ │ │ │ └── gallery
│ │ │ │ │ ├── FlutterGalleryInstrumentation.java
│ │ │ │ │ └── MainActivity.java
│ │ │ │ └── plugins
│ │ │ │ └── GeneratedPluginRegistrant.java
│ │ │ └── res
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_background.png
│ │ │ ├── ic_foreground.png
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_background.png
│ │ │ ├── ic_foreground.png
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_background.png
│ │ │ ├── ic_foreground.png
│ │ │ └── ic_launcher.png
│ │ │ └── mipmap-xxxhdpi
│ │ │ ├── ic_background.png
│ │ │ ├── ic_foreground.png
│ │ │ └── ic_launcher.png
│ ├── build.gradle
│ ├── fastlane
│ │ ├── Appfile
│ │ ├── Fastfile
│ │ ├── README.md
│ │ └── metadata
│ │ │ └── android
│ │ │ └── en-US
│ │ │ ├── full_description.txt
│ │ │ ├── short_description.txt
│ │ │ ├── title.txt
│ │ │ └── video.txt
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── local.properties
│ └── settings.gradle
├── fuchsia
│ └── meta
│ │ └── flutter_gallery.cmx
├── ios
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ ├── Generated.xcconfig
│ │ ├── Release.xcconfig
│ │ └── flutter_export_environment.sh
│ ├── Podfile
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── Runner
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Icon-1024.png
│ │ │ │ ├── Icon-120.png
│ │ │ │ ├── Icon-152.png
│ │ │ │ ├── Icon-167.png
│ │ │ │ ├── Icon-180.png
│ │ │ │ ├── Icon-20.png
│ │ │ │ ├── Icon-29.png
│ │ │ │ ├── Icon-40.png
│ │ │ │ ├── Icon-58.png
│ │ │ │ ├── Icon-60.png
│ │ │ │ ├── Icon-76.png
│ │ │ │ ├── Icon-80.png
│ │ │ │ └── Icon-87.png
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── GeneratedPluginRegistrant.h
│ │ ├── GeneratedPluginRegistrant.m
│ │ ├── Info.plist
│ │ └── main.m
│ └── fastlane
│ │ ├── Appfile
│ │ ├── Fastfile
│ │ └── README.md
├── lib
│ ├── demo
│ │ ├── all.dart
│ │ ├── animation
│ │ │ ├── home.dart
│ │ │ ├── sections.dart
│ │ │ └── widgets.dart
│ │ ├── animation_demo.dart
│ │ ├── calculator
│ │ │ ├── home.dart
│ │ │ └── logic.dart
│ │ ├── calculator_demo.dart
│ │ ├── colors_demo.dart
│ │ ├── contacts_demo.dart
│ │ ├── cupertino
│ │ │ ├── cupertino.dart
│ │ │ ├── cupertino_activity_indicator_demo.dart
│ │ │ ├── cupertino_alert_demo.dart
│ │ │ ├── cupertino_buttons_demo.dart
│ │ │ ├── cupertino_navigation_demo.dart
│ │ │ ├── cupertino_picker_demo.dart
│ │ │ ├── cupertino_refresh_demo.dart
│ │ │ ├── cupertino_segmented_control_demo.dart
│ │ │ ├── cupertino_slider_demo.dart
│ │ │ ├── cupertino_switch_demo.dart
│ │ │ └── cupertino_text_field_demo.dart
│ │ ├── fortnightly
│ │ │ ├── README.md
│ │ │ └── fortnightly.dart
│ │ ├── images_demo.dart
│ │ ├── material
│ │ │ ├── backdrop_demo.dart
│ │ │ ├── banner_demo.dart
│ │ │ ├── bottom_app_bar_demo.dart
│ │ │ ├── bottom_navigation_demo.dart
│ │ │ ├── buttons_demo.dart
│ │ │ ├── cards_demo.dart
│ │ │ ├── chip_demo.dart
│ │ │ ├── data_table_demo.dart
│ │ │ ├── date_and_time_picker_demo.dart
│ │ │ ├── dialog_demo.dart
│ │ │ ├── drawer_demo.dart
│ │ │ ├── elevation_demo.dart
│ │ │ ├── expansion_panels_demo.dart
│ │ │ ├── expansion_tile_list_demo.dart
│ │ │ ├── full_screen_dialog_demo.dart
│ │ │ ├── grid_list_demo.dart
│ │ │ ├── icons_demo.dart
│ │ │ ├── leave_behind_demo.dart
│ │ │ ├── list_demo.dart
│ │ │ ├── material.dart
│ │ │ ├── menu_demo.dart
│ │ │ ├── modal_bottom_sheet_demo.dart
│ │ │ ├── overscroll_demo.dart
│ │ │ ├── page_selector_demo.dart
│ │ │ ├── persistent_bottom_sheet_demo.dart
│ │ │ ├── progress_indicator_demo.dart
│ │ │ ├── reorderable_list_demo.dart
│ │ │ ├── scrollable_tabs_demo.dart
│ │ │ ├── search_demo.dart
│ │ │ ├── selection_controls_demo.dart
│ │ │ ├── slider_demo.dart
│ │ │ ├── snack_bar_demo.dart
│ │ │ ├── tabs_demo.dart
│ │ │ ├── tabs_fab_demo.dart
│ │ │ ├── text_form_field_demo.dart
│ │ │ └── tooltip_demo.dart
│ │ ├── pesto_demo.dart
│ │ ├── shrine
│ │ │ ├── app.dart
│ │ │ ├── backdrop.dart
│ │ │ ├── category_menu_page.dart
│ │ │ ├── colors.dart
│ │ │ ├── expanding_bottom_sheet.dart
│ │ │ ├── home.dart
│ │ │ ├── login.dart
│ │ │ ├── model
│ │ │ │ ├── app_state_model.dart
│ │ │ │ ├── product.dart
│ │ │ │ └── products_repository.dart
│ │ │ ├── shopping_cart.dart
│ │ │ └── supplemental
│ │ │ │ ├── asymmetric_view.dart
│ │ │ │ ├── cut_corners_border.dart
│ │ │ │ ├── product_card.dart
│ │ │ │ └── product_columns.dart
│ │ ├── shrine_demo.dart
│ │ ├── transformations
│ │ │ ├── transformations_demo.dart
│ │ │ ├── transformations_demo_board.dart
│ │ │ ├── transformations_demo_color_picker.dart
│ │ │ ├── transformations_demo_edit_board_point.dart
│ │ │ ├── transformations_demo_gesture_transformable.dart
│ │ │ └── transformations_demo_inertial_motion.dart
│ │ ├── typography_demo.dart
│ │ └── video_demo.dart
│ ├── gallery
│ │ ├── about.dart
│ │ ├── app.dart
│ │ ├── backdrop.dart
│ │ ├── demo.dart
│ │ ├── demos.dart
│ │ ├── example_code.dart
│ │ ├── example_code_parser.dart
│ │ ├── home.dart
│ │ ├── icons.dart
│ │ ├── options.dart
│ │ ├── scales.dart
│ │ ├── syntax_highlighter.dart
│ │ ├── themes.dart
│ │ └── updater.dart
│ ├── main.dart
│ └── main_publish.dart
├── macos
│ ├── .gitignore
│ ├── Flutter
│ │ ├── Flutter-Debug.xcconfig
│ │ └── Flutter-Release.xcconfig
│ ├── Podfile
│ ├── 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
├── meta
│ └── flutter_gallery.cmx
├── pkgget
├── pubspec.yaml
├── test
│ ├── accessibility_test.dart
│ ├── calculator
│ │ ├── logic.dart
│ │ └── smoke_test.dart
│ ├── demo
│ │ └── material
│ │ │ ├── chip_demo_test.dart
│ │ │ ├── drawer_demo_test.dart
│ │ │ ├── expansion_panels_demo_test.dart
│ │ │ ├── menu_demo_test.dart
│ │ │ └── text_form_field_demo_test.dart
│ ├── drawer_test.dart
│ ├── example_code_display_test.dart
│ ├── example_code_parser_test.dart
│ ├── flutter_test_config.dart
│ ├── live_smoketest.dart
│ ├── pesto_test.dart
│ ├── simple_smoke_test.dart
│ ├── smoke_test.dart
│ └── update_test.dart
├── test_driver
│ ├── scroll_perf.dart
│ ├── scroll_perf_test.dart
│ ├── scroll_perf_web.dart
│ ├── scroll_perf_web_test.dart
│ ├── transitions_perf.dart
│ ├── transitions_perf_test.dart
│ ├── transitions_perf_with_semantics.dart
│ └── transitions_perf_with_semantics_test.dart
├── test_memory
│ ├── back_button.dart
│ ├── image_cache_memory.dart
│ └── memory_nav.dart
├── tool
│ └── run_instrumentation_test.sh
├── uploadMaster
└── web
│ ├── favicon.png
│ ├── icons
│ ├── Icon-192.png
│ └── Icon-512.png
│ ├── index.html
│ └── manifest.json
├── login_demo
├── .gitignore
├── .metadata
├── README.md
├── android
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── thl
│ │ │ │ │ └── tt
│ │ │ │ │ └── login_demo
│ │ │ │ │ └── MainActivity.java
│ │ │ └── res
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── ios
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Podfile
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── Runner
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── main.m
├── lib
│ ├── login_demo1.dart
│ ├── login_demo2.dart
│ ├── login_page.dart
│ ├── main.dart
│ └── main_page.dart
├── pubspec.yaml
├── test
│ └── widget_test.dart
└── uploadMaster
└── uploadMaster
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | custom: ['https://sky24n.github.io/Sky24n/image/ali_pay.jpg','https://sky24n.github.io/Sky24n/image/wechat_pay.jpg']
13 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://www.dartlang.org/guides/libraries/private-files
2 |
3 | # Files and directories created by pub
4 | .dart_tool/
5 | .packages
6 | .pub/
7 | build/
8 | # If you're building an application, you may want to check-in your pubspec.lock
9 | pubspec.lock
10 |
11 | # Directory created by dartdoc
12 | # If you don't generate documentation locally you can remove this line.
13 | doc/api/
14 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 3-Clause License
2 |
3 | Copyright (c) 2019, Sky24n
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | 1. Redistributions of source code must retain the above copyright notice, this
10 | list of conditions and the following disclaimer.
11 |
12 | 2. Redistributions in binary form must reproduce the above copyright notice,
13 | this list of conditions and the following disclaimer in the documentation
14 | and/or other materials provided with the distribution.
15 |
16 | 3. Neither the name of the copyright holder nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 |
--------------------------------------------------------------------------------
/base_library/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://www.dartlang.org/guides/libraries/private-files
2 |
3 | # Files and directories created by pub
4 | .DS_Store
5 | .dart_tool/
6 | .packages
7 | .pub/
8 | build/
9 | # If you're building an application, you may want to check-in your pubspec.lock
10 | pubspec.lock
11 |
12 | # Directory created by dartdoc
13 | # If you don't generate documentation locally you can remove this line.
14 | doc/api/
15 |
16 | */.idea/
17 | .idea/
18 | /.idea/workspace.xml
19 | /.idea/libraries
--------------------------------------------------------------------------------
/base_library/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 0.0.1
2 |
3 | * TODO: Describe initial release.
4 |
--------------------------------------------------------------------------------
/base_library/LICENSE:
--------------------------------------------------------------------------------
1 | TODO: Add your license here.
2 |
--------------------------------------------------------------------------------
/base_library/README.md:
--------------------------------------------------------------------------------
1 | # base_library
2 |
3 | A new Flutter plugin.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter
8 | [plug-in package](https://flutter.dev/developing-packages/),
9 | a specialized package that includes platform-specific implementation code for
10 | Android and/or iOS.
11 |
12 | For help getting started with Flutter, view our
13 | [online documentation](https://flutter.dev/docs), which offers tutorials,
14 | samples, guidance on mobile development, and a full API reference.
15 |
--------------------------------------------------------------------------------
/base_library/base_library.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/base_library/example/.flutter-plugins-dependencies:
--------------------------------------------------------------------------------
1 | {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"install_apk_plugin","path":"/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/install_apk_plugin-1.0.1/","dependencies":[]},{"name":"path_provider","path":"/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.7/","dependencies":[]},{"name":"shared_preferences","path":"/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.7+1/","dependencies":[]}],"android":[{"name":"install_apk_plugin","path":"/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/install_apk_plugin-1.0.1/","dependencies":[]},{"name":"path_provider","path":"/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.7/","dependencies":[]},{"name":"shared_preferences","path":"/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.7+1/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/path_provider_macos-0.0.4+2/","dependencies":[]},{"name":"shared_preferences_macos","path":"/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_macos-0.0.1+8/","dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"shared_preferences_web","path":"/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_web-0.1.2+5/","dependencies":[]}]},"dependencyGraph":[{"name":"install_apk_plugin","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos"]},{"name":"path_provider_macos","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]}],"date_created":"2020-06-22 21:51:58.605144","version":"1.17.3"}
--------------------------------------------------------------------------------
/base_library/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | .dart_tool/
26 | .flutter-plugins
27 | .packages
28 | .pub-cache/
29 | .pub/
30 | /build/
31 |
32 | # Android related
33 | **/android/**/gradle-wrapper.jar
34 | **/android/.gradle
35 | **/android/captures/
36 | **/android/gradlew
37 | **/android/gradlew.bat
38 | **/android/local.properties
39 | **/android/**/GeneratedPluginRegistrant.java
40 |
41 | # iOS/XCode related
42 | **/ios/**/*.mode1v3
43 | **/ios/**/*.mode2v3
44 | **/ios/**/*.moved-aside
45 | **/ios/**/*.pbxuser
46 | **/ios/**/*.perspectivev3
47 | **/ios/**/*sync/
48 | **/ios/**/.sconsign.dblite
49 | **/ios/**/.tags*
50 | **/ios/**/.vagrant/
51 | **/ios/**/DerivedData/
52 | **/ios/**/Icon?
53 | **/ios/**/Pods/
54 | **/ios/**/.symlinks/
55 | **/ios/**/profile
56 | **/ios/**/xcuserdata
57 | **/ios/.generated/
58 | **/ios/Flutter/App.framework
59 | **/ios/Flutter/Flutter.framework
60 | **/ios/Flutter/Generated.xcconfig
61 | **/ios/Flutter/app.flx
62 | **/ios/Flutter/app.zip
63 | **/ios/Flutter/flutter_assets/
64 | **/ios/ServiceDefinitions.json
65 | **/ios/Runner/GeneratedPluginRegistrant.*
66 |
67 | # Exceptions to above rules.
68 | !**/ios/**/default.mode1v3
69 | !**/ios/**/default.mode2v3
70 | !**/ios/**/default.pbxuser
71 | !**/ios/**/default.perspectivev3
72 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
73 |
--------------------------------------------------------------------------------
/base_library/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: bc7bc940836f1f834699625426795fd6f07c18ec
8 | channel: beta
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/base_library/example/README.md:
--------------------------------------------------------------------------------
1 | # base_library_example
2 |
3 | Demonstrates how to use the base_library plugin.
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://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/base_library/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26 |
27 | android {
28 | compileSdkVersion 28
29 |
30 | lintOptions {
31 | disable 'InvalidPackage'
32 | }
33 |
34 | defaultConfig {
35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
36 | applicationId "com.library.base_library_example"
37 | minSdkVersion 16
38 | targetSdkVersion 28
39 | versionCode flutterVersionCode.toInteger()
40 | versionName flutterVersionName
41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
42 | }
43 |
44 | buildTypes {
45 | release {
46 | // TODO: Add your own signing config for the release build.
47 | // Signing with the debug keys for now, so `flutter run --release` works.
48 | signingConfig signingConfigs.debug
49 | }
50 | }
51 | }
52 |
53 | flutter {
54 | source '../..'
55 | }
56 |
57 | dependencies {
58 | testImplementation 'junit:junit:4.12'
59 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
61 | }
62 |
--------------------------------------------------------------------------------
/base_library/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/base_library/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
13 |
20 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/base_library/example/android/app/src/main/java/com/library/base_library_example/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.library.base_library_example;
2 |
3 | import android.os.Bundle;
4 | import io.flutter.app.FlutterActivity;
5 | import io.flutter.plugins.GeneratedPluginRegistrant;
6 |
7 | public class MainActivity extends FlutterActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | GeneratedPluginRegistrant.registerWith(this);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/base_library/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/base_library/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/base_library/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/base_library/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/base_library/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/base_library/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/base_library/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/base_library/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/base_library/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | jcenter()
5 | }
6 |
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.2.1'
9 | }
10 | }
11 |
12 | allprojects {
13 | repositories {
14 | google()
15 | jcenter()
16 | }
17 | }
18 |
19 | rootProject.buildDir = '../build'
20 | subprojects {
21 | project.buildDir = "${rootProject.buildDir}/${project.name}"
22 | }
23 | subprojects {
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/base_library/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 |
--------------------------------------------------------------------------------
/base_library/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
7 |
--------------------------------------------------------------------------------
/base_library/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/base_library/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 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/base_library/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/base_library/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/base_library/example/ios/Flutter/flutter_export_environment.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # This is a generated file; do not edit or check into version control.
3 | export "FLUTTER_ROOT=/Users/thl/Library/Android/flutter"
4 | export "FLUTTER_APPLICATION_PATH=/Users/thl/AndroidStudioProjects/test workspace/FlutterRepos/base_library/example"
5 | export "FLUTTER_TARGET=lib/main.dart"
6 | export "FLUTTER_BUILD_DIR=build"
7 | export "SYMROOT=${SOURCE_ROOT}/../build/ios"
8 | export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
9 | export "FLUTTER_FRAMEWORK_DIR=/Users/thl/Library/Android/flutter/bin/cache/artifacts/engine/ios"
10 | export "FLUTTER_BUILD_NAME=1.0.0"
11 | export "FLUTTER_BUILD_NUMBER=1"
12 |
--------------------------------------------------------------------------------
/base_library/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/base_library/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : FlutterAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #include "AppDelegate.h"
2 | #include "GeneratedPluginRegistrant.h"
3 |
4 | @implementation AppDelegate
5 |
6 | - (BOOL)application:(UIApplication *)application
7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
8 | [GeneratedPluginRegistrant registerWithRegistry:self];
9 | // Override point for customization after application launch.
10 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
11 | }
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/base_library/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.
--------------------------------------------------------------------------------
/base_library/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 |
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | base_library_example
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/base_library/example/ios/Runner/main.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char* argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/base_library/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:base_library/base_library.dart';
3 | import 'package:install_apk_plugin/install_apk_plugin.dart';
4 |
5 | void main() => runApp(MyApp());
6 |
7 | class MyApp extends StatefulWidget {
8 | @override
9 | _MyAppState createState() => _MyAppState();
10 | }
11 |
12 | class _MyAppState extends State {
13 | @override
14 | void initState() {
15 | super.initState();
16 | setInitDir(initStorageDir: true);
17 | }
18 |
19 | @override
20 | Widget build(BuildContext context) {
21 | return MaterialApp(
22 | home: HomePage(),
23 | );
24 | }
25 | }
26 |
27 | class HomePage extends StatefulWidget {
28 | @override
29 | _HomePageState createState() => _HomePageState();
30 | }
31 |
32 | class _HomePageState extends State {
33 | @override
34 | Widget build(BuildContext context) {
35 | return Scaffold(
36 | appBar: AppBar(
37 | title: const Text('Plugin example app'),
38 | ),
39 | body: Center(
40 | child: FlatButton(
41 | onPressed: () {
42 | // 该地址可能无法下载,请自行更换可测试地址。
43 | String urlPath =
44 | 'https://raw.githubusercontent.com/Sky24n/Doc/master/apks/flutter_wanandroid.apk';
45 | VersionModel model = VersionModel(
46 | title: '有新版本v0.2.6,快去更新吧!',
47 | content: '1.基础库升级 | 2.修复OPPO R15详情页问题 | 3.一些优化~',
48 | url: urlPath,
49 | version: '0.2.6',
50 | );
51 | showDialog(
52 | context: context,
53 | barrierDismissible: false,
54 | builder: (BuildContext context) => UpgradeDialog(
55 | versionModel: model,
56 | valueChanged: (value) {
57 | /// iOS shield / iOS屏蔽
58 | InstallPlugin.installApk(
59 | value, 'com.library.base_library_example')
60 | .then((result) {
61 | LogUtil.e('install apk $result');
62 | }).catchError((error) {
63 | LogUtil.e('install apk error: $error');
64 | });
65 | },
66 | ),
67 | );
68 | },
69 | child: Text('Version upgrade'),
70 | ),
71 | ),
72 | );
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/base_library/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: base_library_example
2 | description: Demonstrates how to use the base_library plugin.
3 | publish_to: 'none'
4 |
5 | environment:
6 | sdk: ">=2.1.0 <3.0.0"
7 |
8 | dependencies:
9 | flutter:
10 | sdk: flutter
11 |
12 | # The following adds the Cupertino Icons font to your application.
13 | # Use with the CupertinoIcons class for iOS style icons.
14 | cupertino_icons: ^0.1.2
15 | # iOS shield / iOS屏蔽
16 | install_apk_plugin: ^1.0.1
17 |
18 | dev_dependencies:
19 | flutter_test:
20 | sdk: flutter
21 |
22 | base_library:
23 | path: ../
24 |
25 | # For information on the generic Dart part of this file, see the
26 | # following page: https://dart.dev/tools/pub/pubspec
27 |
28 | # The following section is specific to Flutter.
29 | flutter:
30 |
31 | # The following line ensures that the Material Icons font is
32 | # included with your application, so that you can use the icons in
33 | # the material Icons class.
34 | uses-material-design: true
35 |
36 | assets:
37 | - packages/base_library/assets/ic_login_bg.png
38 |
39 |
40 | # To add assets to your application, add an assets section, like this:
41 | # assets:
42 | # - images/a_dot_burr.jpeg
43 | # - images/a_dot_ham.jpeg
44 |
45 | # An image asset can refer to one or more resolution-specific "variants", see
46 | # https://flutter.dev/assets-and-images/#resolution-aware.
47 |
48 | # For details regarding adding assets from package dependencies, see
49 | # https://flutter.dev/assets-and-images/#from-packages
50 |
51 | # To add custom fonts to your application, add a fonts section here,
52 | # in this "flutter" section. Each entry in this list should have a
53 | # "family" key with the font family name, and a "fonts" key with a
54 | # list giving the asset and other descriptors for the font. For
55 | # example:
56 | # fonts:
57 | # - family: Schyler
58 | # fonts:
59 | # - asset: fonts/Schyler-Regular.ttf
60 | # - asset: fonts/Schyler-Italic.ttf
61 | # style: italic
62 | # - family: Trajan Pro
63 | # fonts:
64 | # - asset: fonts/TrajanPro.ttf
65 | # - asset: fonts/TrajanPro_Bold.ttf
66 | # weight: 700
67 | #
68 | # For details regarding fonts from package dependencies,
69 | # see https://flutter.dev/custom-fonts/#from-packages
70 |
--------------------------------------------------------------------------------
/base_library/example/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:base_library_example/main.dart';
12 |
13 | void main() {
14 | testWidgets('Verify Platform version', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(MyApp());
17 |
18 | // Verify that platform version is retrieved.
19 | expect(
20 | find.byWidgetPredicate(
21 | (Widget widget) => widget is Text &&
22 | widget.data.startsWith('Running on:'),
23 | ),
24 | findsOneWidget,
25 | );
26 | });
27 | }
28 |
--------------------------------------------------------------------------------
/base_library/lib/assets/images/ic_data_empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/lib/assets/images/ic_data_empty.png
--------------------------------------------------------------------------------
/base_library/lib/assets/images/ic_login_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/lib/assets/images/ic_login_bg.png
--------------------------------------------------------------------------------
/base_library/lib/assets/images/ic_network_error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/base_library/lib/assets/images/ic_network_error.png
--------------------------------------------------------------------------------
/base_library/lib/base_library.dart:
--------------------------------------------------------------------------------
1 | library base_library;
2 |
3 | export 'src/common/index.dart';
4 | export 'src/data/index.dart';
5 | export 'src/res/index.dart';
6 | export 'src/ui/index.dart';
7 | export 'src/util/index.dart';
8 |
9 | export 'src/models/model.dart';
10 |
--------------------------------------------------------------------------------
/base_library/lib/src/common/common.dart:
--------------------------------------------------------------------------------
1 | class BaseConstant {
2 | static const String packageBase = 'base_library';
3 |
4 | static const String keyShowGuide = 'show_guide';
5 | static const String keyUserName = 'user_name';
6 | static const String keyUserModel = 'user_model';
7 | static const String keyAppToken = 'app_token';
8 |
9 | static const String routeMain = 'route_main';
10 | static const String routeLogin = 'route_login';
11 | }
12 |
--------------------------------------------------------------------------------
/base_library/lib/src/common/index.dart:
--------------------------------------------------------------------------------
1 | export 'common.dart';
2 |
--------------------------------------------------------------------------------
/base_library/lib/src/data/index.dart:
--------------------------------------------------------------------------------
1 | export 'net/dio_util.dart';
2 | export 'protocol/base_resp.dart';
3 |
--------------------------------------------------------------------------------
/base_library/lib/src/data/protocol/base_resp.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/dio.dart';
2 |
3 | /// 返回 status code msg data.
4 | class BaseResp {
5 | String status;
6 | int code;
7 | String msg;
8 | T data;
9 |
10 | BaseResp(this.status, this.code, this.msg, this.data);
11 |
12 | @override
13 | String toString() {
14 | StringBuffer sb = new StringBuffer('{');
15 | sb.write("\"status\":\"$status\"");
16 | sb.write(",\"code\":$code");
17 | sb.write(",\"msg\":\"$msg\"");
18 | sb.write(",\"data\":\"$data\"");
19 | sb.write('}');
20 | return sb.toString();
21 | }
22 | }
23 |
24 | /// 返回 status code msg data Response.
25 | class BaseRespR {
26 | String status;
27 | int code;
28 | String msg;
29 | T data;
30 | Response response;
31 |
32 | BaseRespR(this.status, this.code, this.msg, this.data, this.response);
33 |
34 | @override
35 | String toString() {
36 | StringBuffer sb = new StringBuffer('{');
37 | sb.write("\"status\":\"$status\"");
38 | sb.write(",\"code\":$code");
39 | sb.write(",\"msg\":\"$msg\"");
40 | sb.write(",\"data\":\"$data\"");
41 | sb.write('}');
42 | return sb.toString();
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/base_library/lib/src/models/model.dart:
--------------------------------------------------------------------------------
1 | class VersionModel {
2 | String title;
3 | String content;
4 | String url;
5 | String version;
6 |
7 | VersionModel({this.title, this.content, this.url, this.version});
8 |
9 | VersionModel.fromJson(Map json)
10 | : title = json['title'],
11 | content = json['content'],
12 | url = json['url'],
13 | version = json['version'];
14 |
15 | Map toJson() => {
16 | 'title': title,
17 | 'content': content,
18 | 'url': url,
19 | 'version': version,
20 | };
21 |
22 | @override
23 | String toString() {
24 | StringBuffer sb = new StringBuffer('{');
25 | sb.write("\"title\":\"$title\"");
26 | sb.write(",\"content\":\"$content\"");
27 | sb.write(",\"url\":\"$url\"");
28 | sb.write(",\"version\":\"$version\"");
29 | sb.write('}');
30 | return sb.toString();
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/base_library/lib/src/res/colors.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class Colours {
4 | static const Color app_main = Color(0xFF666666);
5 | static const Color app_bg = Color(0xfff5f5f5);
6 |
7 | static const Color transparent_80 = Color(0x80000000); //
8 | static const Color white_19 = Color(0X19FFFFFF);
9 |
10 | static const Color text_dark = Color(0xFF333333);
11 | static const Color text_normal = Color(0xFF666666);
12 | static const Color text_gray = Color(0xFF999999);
13 |
14 | static const Color divider = Color(0xffe5e5e5);
15 |
16 | static const Color gray_33 = Color(0xFF333333); //51
17 | static const Color gray_66 = Color(0xFF666666); //102
18 | static const Color gray_99 = Color(0xFF999999); //153
19 | static const Color common_orange = Color(0XFFFC9153); //252 145 83
20 | static const Color gray_ef = Color(0XFFEFEFEF); //153
21 |
22 | static const Color gray_f0 = Color(0xfff0f0f0); //
23 | static const Color gray_f5 = Color(0xfff5f5f5); //
24 | static const Color gray_cc = Color(0xffcccccc); //
25 | static const Color gray_ce = Color(0xffcecece); //
26 | static const Color green_1 = Color(0xff009688); //
27 | static const Color green_62 = Color(0xff626262); //
28 | static const Color green_e5 = Color(0xffe5e5e5); //
29 |
30 | static const Color green_de = Color(0xffdedede);
31 | }
32 |
--------------------------------------------------------------------------------
/base_library/lib/src/res/dimens.dart:
--------------------------------------------------------------------------------
1 | class Dimens {
2 | static const double font_sp10 = 10;
3 | static const double font_sp12 = 12;
4 | static const double font_sp14 = 14;
5 | static const double font_sp16 = 16;
6 | static const double font_sp18 = 18;
7 | static const double font_sp20 = 20;
8 |
9 | static const double gap_dp3 = 3;
10 | static const double gap_dp5 = 5;
11 | static const double gap_dp10 = 10;
12 | static const double gap_dp12 = 12;
13 | static const double gap_dp15 = 15;
14 | static const double gap_dp16 = 16;
15 | static const double gap_dp20 = 20;
16 | static const double gap_dp25 = 25;
17 | static const double gap_dp30 = 30;
18 |
19 | static const double btn_h_48 = 48;
20 | static const double item_h_42 = 42;
21 |
22 | static const double border_width = 0.33;
23 | }
24 |
--------------------------------------------------------------------------------
/base_library/lib/src/res/index.dart:
--------------------------------------------------------------------------------
1 | export 'colors.dart';
2 | export 'dimens.dart';
3 |
4 | //export 'strings.dart';
5 | export 'styles.dart';
6 |
--------------------------------------------------------------------------------
/base_library/lib/src/res/styles.dart:
--------------------------------------------------------------------------------
1 | import 'package:base_library/src/res/index.dart';
2 | import 'package:flutter/widgets.dart';
3 |
4 | class TextStyles {
5 | static TextStyle listTitle = TextStyle(
6 | fontSize: Dimens.font_sp16,
7 | color: Colours.text_dark,
8 | fontWeight: FontWeight.bold,
9 | );
10 | static TextStyle listTitle2 = TextStyle(
11 | fontSize: Dimens.font_sp16,
12 | color: Colours.text_dark,
13 | );
14 | static TextStyle listContent = TextStyle(
15 | fontSize: Dimens.font_sp14,
16 | color: Colours.text_normal,
17 | );
18 | static TextStyle listContent2 = TextStyle(
19 | fontSize: Dimens.font_sp14,
20 | color: Colours.text_gray,
21 | );
22 | static TextStyle listExtra = TextStyle(
23 | fontSize: Dimens.font_sp12,
24 | color: Colours.text_gray,
25 | );
26 | static TextStyle listExtra2 = TextStyle(
27 | fontSize: Dimens.font_sp12,
28 | color: Colours.text_normal,
29 | );
30 | static const TextStyle appTitle = TextStyle(
31 | fontSize: Dimens.font_sp18,
32 | color: Colours.text_dark,
33 | );
34 | }
35 |
36 | class Decorations {
37 | static Decoration bottom = BoxDecoration(
38 | border: Border(bottom: BorderSide(width: 0.33, color: Colours.divider)));
39 | }
40 |
41 | /// 间隔
42 | class Gaps {
43 | /// 水平间隔
44 | static Widget hGap5 = new SizedBox(width: Dimens.gap_dp5);
45 | static Widget hGap10 = new SizedBox(width: Dimens.gap_dp10);
46 | static Widget hGap12 = new SizedBox(width: Dimens.gap_dp12);
47 | static Widget hGap15 = new SizedBox(width: Dimens.gap_dp15);
48 | static Widget hGap30 = new SizedBox(width: Dimens.gap_dp30);
49 |
50 | /// 垂直间隔
51 | static Widget vGap5 = new SizedBox(height: Dimens.gap_dp5);
52 | static Widget vGap10 = new SizedBox(height: Dimens.gap_dp10);
53 | static Widget vGap15 = new SizedBox(height: Dimens.gap_dp15);
54 | static Widget vGap20 = new SizedBox(height: Dimens.gap_dp20);
55 | static Widget vGap25 = new SizedBox(height: Dimens.gap_dp25);
56 |
57 | static Widget getHGap(double w) {
58 | return SizedBox(width: w);
59 | }
60 |
61 | static Widget getVGap(double h) {
62 | return SizedBox(height: h);
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/base_library/lib/src/ui/dialog/index.dart:
--------------------------------------------------------------------------------
1 | export 'upgrade_dialog.dart';
2 |
--------------------------------------------------------------------------------
/base_library/lib/src/ui/index.dart:
--------------------------------------------------------------------------------
1 | export 'wigets.dart';
2 | export 'dialog/index.dart';
3 |
--------------------------------------------------------------------------------
/base_library/lib/src/util/index.dart:
--------------------------------------------------------------------------------
1 | //export 'package:common_utils/common_utils.dart';
2 | export 'package:flustars/flustars.dart';
3 |
4 | export 'route_util.dart';
5 | export 'util.dart';
6 |
--------------------------------------------------------------------------------
/base_library/lib/src/util/route_util.dart:
--------------------------------------------------------------------------------
1 | import 'package:base_library/src/common/common.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class RouteUtil {
5 | static void goMain(BuildContext context) {
6 | pushReplacementNamed(context, BaseConstant.routeMain);
7 | }
8 |
9 | static void goLogin(BuildContext context) {
10 | pushNamed(context, BaseConstant.routeLogin);
11 | }
12 |
13 | static void pushNamed(BuildContext context, String pageName) {
14 | Navigator.of(context).pushNamed(pageName);
15 | }
16 |
17 | static void pushReplacementNamed(BuildContext context, String pageName) {
18 | Navigator.of(context).pushReplacementNamed(pageName);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/base_library/lib/src/util/util.dart:
--------------------------------------------------------------------------------
1 | import 'package:base_library/src/common/common.dart';
2 | import 'package:common_utils/common_utils.dart';
3 | import 'package:flustars/flustars.dart';
4 | import 'package:flutter/material.dart';
5 |
6 | class Util {
7 | static String getImgPath(String name, {String format: 'png'}) {
8 | return 'assets/images/$name.$format';
9 | }
10 |
11 | static String getFileName(String urlPath) {
12 | if (ObjectUtil.isEmpty(urlPath)) return '';
13 | List listStr = urlPath.split("/");
14 | String name = listStr[listStr.length - 1];
15 | return name;
16 | }
17 |
18 | static void showSnackBar(BuildContext context, String msg) {
19 | Scaffold.of(context).showSnackBar(
20 | SnackBar(content: Text("$msg")),
21 | );
22 | }
23 |
24 | static bool isLogin() {
25 | return ObjectUtil.isNotEmpty(SpUtil.getString(BaseConstant.keyAppToken));
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/base_library/pkgget:
--------------------------------------------------------------------------------
1 | export PUB_HOSTED_URL=https://pub.flutter-io.cn
2 | export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
3 | flutter packages get
--------------------------------------------------------------------------------
/base_library/uploadMaster:
--------------------------------------------------------------------------------
1 | git push origin master
2 |
--------------------------------------------------------------------------------
/flutter_gallery/.flutter-plugins:
--------------------------------------------------------------------------------
1 | # This is a generated file; do not edit or check into version control.
2 | connectivity=/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/connectivity-0.4.8+2/
3 | connectivity_macos=/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/connectivity_macos-0.1.0+2/
4 | device_info=/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/device_info-0.4.2+1/
5 | url_launcher=/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.4.2/
6 | url_launcher_macos=/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_macos-0.0.1+4/
7 | url_launcher_web=/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_web-0.1.1+1/
8 | video_player=/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/video_player-0.10.6/
9 | video_player_web=/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/video_player_web-0.1.2+1/
10 |
--------------------------------------------------------------------------------
/flutter_gallery/.flutter-plugins-dependencies:
--------------------------------------------------------------------------------
1 | {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"connectivity","path":"/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/connectivity-0.4.8+2/","dependencies":[]},{"name":"device_info","path":"/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/device_info-0.4.2+1/","dependencies":[]},{"name":"url_launcher","path":"/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.4.2/","dependencies":[]},{"name":"video_player","path":"/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/video_player-0.10.6/","dependencies":[]}],"android":[{"name":"connectivity","path":"/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/connectivity-0.4.8+2/","dependencies":[]},{"name":"device_info","path":"/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/device_info-0.4.2+1/","dependencies":[]},{"name":"url_launcher","path":"/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.4.2/","dependencies":[]},{"name":"video_player","path":"/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/video_player-0.10.6/","dependencies":[]}],"macos":[{"name":"connectivity_macos","path":"/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/connectivity_macos-0.1.0+2/","dependencies":[]},{"name":"url_launcher_macos","path":"/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_macos-0.0.1+4/","dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"url_launcher_web","path":"/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_web-0.1.1+1/","dependencies":[]},{"name":"video_player_web","path":"/Users/thl/.pub-cache/hosted/pub.flutter-io.cn/video_player_web-0.1.2+1/","dependencies":[]}]},"dependencyGraph":[{"name":"connectivity","dependencies":["connectivity_macos"]},{"name":"connectivity_macos","dependencies":[]},{"name":"device_info","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_macos"]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"video_player","dependencies":["video_player_web"]},{"name":"video_player_web","dependencies":[]}],"date_created":"2020-06-22 21:48:25.456711","version":"1.17.3"}
--------------------------------------------------------------------------------
/flutter_gallery/.gitignore:
--------------------------------------------------------------------------------
1 | lib/generated_plugin_registrant.dart
2 |
--------------------------------------------------------------------------------
/flutter_gallery/.idea/flutter_gallery.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/flutter_gallery/.idea/libraries/Dart_SDK.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/flutter_gallery/.idea/libraries/Flutter_Plugins.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/flutter_gallery/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/flutter_gallery/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/flutter_gallery/BUILD.gn:
--------------------------------------------------------------------------------
1 | # Copyright 2014 The Flutter Authors. All rights reserved.
2 | # Use of this source code is governed by a BSD-style license that can be
3 | # found in the LICENSE file.
4 |
5 | assert(is_fuchsia)
6 |
7 | import("//topaz/runtime/flutter_runner/flutter_app.gni")
8 |
9 | flutter_app("flutter_gallery") {
10 | package_name = "flutter_gallery"
11 | main_dart = "lib/main.dart"
12 |
13 | manifest = "pubspec.yaml"
14 |
15 | disable_analysis = true
16 |
17 | meta = [
18 | {
19 | path = rebase_path("meta/flutter_gallery.cmx")
20 | dest = "flutter_gallery.cmx"
21 | },
22 | ]
23 |
24 | deps = [
25 | "../../packages/flutter",
26 | "//third_party/dart-pkg/pub/charcode",
27 | "//third_party/dart-pkg/pub/collection",
28 | "//third_party/dart-pkg/pub/connectivity",
29 | "//third_party/dart-pkg/pub/cupertino_icons",
30 | "//third_party/dart-pkg/pub/device_info",
31 | "//third_party/dart-pkg/pub/flutter_gallery_assets",
32 | "//third_party/dart-pkg/pub/meta",
33 | "//third_party/dart-pkg/pub/path",
34 | "//third_party/dart-pkg/pub/scoped_model",
35 | "//third_party/dart-pkg/pub/shrine_images",
36 | "//third_party/dart-pkg/pub/source_span",
37 | "//third_party/dart-pkg/pub/string_scanner",
38 | "//third_party/dart-pkg/pub/typed_data",
39 | "//third_party/dart-pkg/pub/url_launcher",
40 | "//third_party/dart-pkg/pub/vector_math",
41 | "//third_party/dart-pkg/pub/video_player",
42 | "//third_party/dart/third_party/pkg/intl",
43 | ]
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/flutter_gallery/README.md:
--------------------------------------------------------------------------------
1 | # Flutter gallery
2 |
3 | A demo app for Flutter's material design and cupertino widgets, as
4 | well as many other features of the Flutter SDK.
5 |
6 | ## Building
7 |
8 | You can follow these instructions to build the gallery app
9 | and install it onto your device.
10 |
11 | ### Prerequisites
12 |
13 | If you are new to Flutter, please first follow
14 | the [Flutter Setup](https://flutter.dev/setup/) guide.
15 |
16 | ### Building and installing the Flutter app
17 |
18 | * `cd $FLUTTER_ROOT/examples/flutter_gallery`
19 | * `flutter pub get`
20 | * `flutter run --release`
21 |
22 | The `flutter run --release` command both builds and installs the Flutter app.
23 |
24 | ## Prerelease checklist
25 |
26 | * Verify that the About box's license page scrolls and reveals its long
27 | long stream of license texts.
28 |
29 | ## Icon
30 |
31 | Android launcher icons were generated using Android Asset Studio:
32 | https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html#foreground.type=image&foreground.space.trim=1&foreground.space.pad=0.1&foreColor=607d8b%2C0&crop=0&backgroundShape=square&backColor=fafafa%2C100&effects=none
33 |
--------------------------------------------------------------------------------
/flutter_gallery/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # Take our settings from the repo's main analysis_options.yaml file, but add
2 | # an exclude for the build directory.
3 |
4 | include: ../../analysis_options.yaml
5 |
6 | analyzer:
7 | exclude:
8 | - build/**
9 |
--------------------------------------------------------------------------------
/flutter_gallery/android/.gradle/5.6.2/executionHistory/executionHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/.gradle/5.6.2/executionHistory/executionHistory.bin
--------------------------------------------------------------------------------
/flutter_gallery/android/.gradle/5.6.2/executionHistory/executionHistory.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/.gradle/5.6.2/executionHistory/executionHistory.lock
--------------------------------------------------------------------------------
/flutter_gallery/android/.gradle/5.6.2/fileChanges/last-build.bin:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/flutter_gallery/android/.gradle/5.6.2/fileContent/fileContent.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/.gradle/5.6.2/fileContent/fileContent.lock
--------------------------------------------------------------------------------
/flutter_gallery/android/.gradle/5.6.2/fileHashes/fileHashes.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/.gradle/5.6.2/fileHashes/fileHashes.bin
--------------------------------------------------------------------------------
/flutter_gallery/android/.gradle/5.6.2/fileHashes/fileHashes.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/.gradle/5.6.2/fileHashes/fileHashes.lock
--------------------------------------------------------------------------------
/flutter_gallery/android/.gradle/5.6.2/fileHashes/resourceHashesCache.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/.gradle/5.6.2/fileHashes/resourceHashesCache.bin
--------------------------------------------------------------------------------
/flutter_gallery/android/.gradle/5.6.2/gc.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/.gradle/5.6.2/gc.properties
--------------------------------------------------------------------------------
/flutter_gallery/android/.gradle/5.6.2/javaCompile/classAnalysis.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/.gradle/5.6.2/javaCompile/classAnalysis.bin
--------------------------------------------------------------------------------
/flutter_gallery/android/.gradle/5.6.2/javaCompile/jarAnalysis.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/.gradle/5.6.2/javaCompile/jarAnalysis.bin
--------------------------------------------------------------------------------
/flutter_gallery/android/.gradle/5.6.2/javaCompile/javaCompile.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/.gradle/5.6.2/javaCompile/javaCompile.lock
--------------------------------------------------------------------------------
/flutter_gallery/android/.gradle/5.6.2/javaCompile/taskHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/.gradle/5.6.2/javaCompile/taskHistory.bin
--------------------------------------------------------------------------------
/flutter_gallery/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock
--------------------------------------------------------------------------------
/flutter_gallery/android/.gradle/buildOutputCleanup/cache.properties:
--------------------------------------------------------------------------------
1 | #Sun Jun 21 00:41:24 CST 2020
2 | gradle.version=5.6.2
3 |
--------------------------------------------------------------------------------
/flutter_gallery/android/.gradle/buildOutputCleanup/outputFiles.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/.gradle/buildOutputCleanup/outputFiles.bin
--------------------------------------------------------------------------------
/flutter_gallery/android/.gradle/vcs-1/gc.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/.gradle/vcs-1/gc.properties
--------------------------------------------------------------------------------
/flutter_gallery/android/app/src/androidTest/java/io/flutter/demo/gallery/FlutterGalleryInstrumentationTest.java:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | package io.flutter.demo.gallery;
6 |
7 | import android.support.test.filters.LargeTest;
8 | import android.support.test.rule.ActivityTestRule;
9 | import android.support.test.runner.AndroidJUnit4;
10 | import org.junit.Before;
11 | import org.junit.Rule;
12 | import org.junit.Test;
13 | import org.junit.runner.RunWith;
14 |
15 | import static org.hamcrest.Matchers.is;
16 | import static org.junit.Assert.assertThat;
17 |
18 | @RunWith(AndroidJUnit4.class)
19 | @LargeTest
20 | public class FlutterGalleryInstrumentationTest {
21 | @Rule
22 | public ActivityTestRule mActivityRule =
23 | new ActivityTestRule<>(MainActivity.class);
24 |
25 | private MainActivity activity;
26 |
27 | @Before
28 | public void setUp() {
29 | activity = mActivityRule.getActivity();
30 | }
31 |
32 | @Test
33 | public void activityLoaded() throws Exception {
34 | FlutterGalleryInstrumentation instrumentation = activity.getInstrumentation();
35 | instrumentation.waitForTestToFinish();
36 | assertThat(instrumentation.isTestSuccessful(), is(true));
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/flutter_gallery/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
7 |
8 |
12 |
13 |
14 |
15 |
20 |
21 |
22 |
23 |
24 |
25 |
27 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/flutter_gallery/android/app/src/main/java/io/flutter/demo/gallery/FlutterGalleryInstrumentation.java:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | package io.flutter.demo.gallery;
6 |
7 | import android.os.ConditionVariable;
8 | import androidx.annotation.NonNull;
9 |
10 | import io.flutter.plugin.common.BinaryMessenger;
11 | import io.flutter.plugin.common.MethodCall;
12 | import io.flutter.plugin.common.MethodChannel;
13 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
14 | import io.flutter.plugin.common.MethodChannel.Result;
15 |
16 | /** Instrumentation for testing using Android Espresso framework. */
17 | public class FlutterGalleryInstrumentation implements MethodCallHandler {
18 | private final ConditionVariable testFinished = new ConditionVariable();
19 | private volatile boolean testSuccessful;
20 |
21 | FlutterGalleryInstrumentation(@NonNull BinaryMessenger messenger) {
22 | new MethodChannel(messenger, "io.flutter.demo.gallery/TestLifecycleListener")
23 | .setMethodCallHandler(this);
24 | }
25 |
26 | @Override
27 | public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
28 | testSuccessful = call.method.equals("success");
29 | testFinished.open();
30 | result.success(null);
31 | }
32 |
33 | public boolean isTestSuccessful() {
34 | return testSuccessful;
35 | }
36 |
37 | public void waitForTestToFinish() throws Exception {
38 | testFinished.block();
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/flutter_gallery/android/app/src/main/java/io/flutter/demo/gallery/MainActivity.java:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | package io.flutter.demo.gallery;
6 |
7 | import androidx.annotation.NonNull;
8 | import io.flutter.embedding.android.FlutterActivity;
9 | import io.flutter.embedding.engine.FlutterEngine;
10 |
11 | public class MainActivity extends FlutterActivity {
12 | private FlutterGalleryInstrumentation instrumentation;
13 |
14 | /** Instrumentation for testing. */
15 | public FlutterGalleryInstrumentation getInstrumentation() {
16 | return instrumentation;
17 | }
18 |
19 | @Override
20 | public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {
21 | super.configureFlutterEngine(flutterEngine);
22 | instrumentation = new FlutterGalleryInstrumentation(flutterEngine.getDartExecutor());
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/flutter_gallery/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:
--------------------------------------------------------------------------------
1 | package io.flutter.plugins;
2 |
3 | import androidx.annotation.Keep;
4 | import androidx.annotation.NonNull;
5 |
6 | import io.flutter.embedding.engine.FlutterEngine;
7 |
8 | /**
9 | * Generated file. Do not edit.
10 | * This file is generated by the Flutter tool based on the
11 | * plugins that support the Android platform.
12 | */
13 | @Keep
14 | public final class GeneratedPluginRegistrant {
15 | public static void registerWith(@NonNull FlutterEngine flutterEngine) {
16 | flutterEngine.getPlugins().add(new io.flutter.plugins.connectivity.ConnectivityPlugin());
17 | flutterEngine.getPlugins().add(new io.flutter.plugins.deviceinfo.DeviceInfoPlugin());
18 | flutterEngine.getPlugins().add(new io.flutter.plugins.urllauncher.UrlLauncherPlugin());
19 | flutterEngine.getPlugins().add(new io.flutter.plugins.videoplayer.VideoPlayerPlugin());
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/flutter_gallery/android/app/src/main/res/mipmap-hdpi/ic_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/app/src/main/res/mipmap-hdpi/ic_background.png
--------------------------------------------------------------------------------
/flutter_gallery/android/app/src/main/res/mipmap-hdpi/ic_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/app/src/main/res/mipmap-hdpi/ic_foreground.png
--------------------------------------------------------------------------------
/flutter_gallery/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/flutter_gallery/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/flutter_gallery/android/app/src/main/res/mipmap-xhdpi/ic_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/app/src/main/res/mipmap-xhdpi/ic_background.png
--------------------------------------------------------------------------------
/flutter_gallery/android/app/src/main/res/mipmap-xhdpi/ic_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/app/src/main/res/mipmap-xhdpi/ic_foreground.png
--------------------------------------------------------------------------------
/flutter_gallery/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/flutter_gallery/android/app/src/main/res/mipmap-xxhdpi/ic_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/app/src/main/res/mipmap-xxhdpi/ic_background.png
--------------------------------------------------------------------------------
/flutter_gallery/android/app/src/main/res/mipmap-xxhdpi/ic_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/app/src/main/res/mipmap-xxhdpi/ic_foreground.png
--------------------------------------------------------------------------------
/flutter_gallery/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/flutter_gallery/android/app/src/main/res/mipmap-xxxhdpi/ic_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/app/src/main/res/mipmap-xxxhdpi/ic_background.png
--------------------------------------------------------------------------------
/flutter_gallery/android/app/src/main/res/mipmap-xxxhdpi/ic_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/app/src/main/res/mipmap-xxxhdpi/ic_foreground.png
--------------------------------------------------------------------------------
/flutter_gallery/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/flutter_gallery/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | buildscript {
6 | repositories {
7 | google()
8 | jcenter()
9 | }
10 |
11 | dependencies {
12 | classpath 'com.android.tools.build:gradle:3.5.0'
13 | }
14 | }
15 |
16 | allprojects {
17 | repositories {
18 | google()
19 | jcenter()
20 | maven {
21 | url 'https://google.bintray.com/exoplayer/'
22 | }
23 | }
24 | }
25 |
26 | rootProject.buildDir = '../build'
27 | subprojects {
28 | project.buildDir = "${rootProject.buildDir}/${project.name}"
29 | }
30 | subprojects {
31 | project.evaluationDependsOn(':app')
32 | }
33 |
34 | task clean(type: Delete) {
35 | delete rootProject.buildDir
36 | }
37 |
--------------------------------------------------------------------------------
/flutter_gallery/android/fastlane/Appfile:
--------------------------------------------------------------------------------
1 | package_name "io.flutter.demo.gallery"
2 |
--------------------------------------------------------------------------------
/flutter_gallery/android/fastlane/Fastfile:
--------------------------------------------------------------------------------
1 | # Prevent Fastlane from overwriting README.md
2 | skip_docs
3 |
4 | default_platform(:android)
5 |
6 | # This should be run after running
7 | # flutter build apk --release
8 | # to build the app using the Flutter toolchain.
9 | platform :android do
10 | desc 'Push the built release APK to alpha or beta depending on current branch'
11 | lane :deploy_play_store do
12 | begin
13 | upload_to_play_store(
14 | track: 'alpha',
15 | apk: '../build/app/outputs/apk/release/app-release.apk',
16 | json_key_data: ENV['GOOGLE_DEVELOPER_SERVICE_ACCOUNT_ACTOR_FASTLANE'],
17 | skip_upload_screenshots: true,
18 | skip_upload_images: true
19 | )
20 | rescue => exception
21 | raise exception unless exception.message.include?('apkUpgradeVersionConflict')
22 | puts 'Current version already present on the Play Store. Omitting this upload.'
23 | end
24 | end
25 | end
26 |
--------------------------------------------------------------------------------
/flutter_gallery/android/fastlane/README.md:
--------------------------------------------------------------------------------
1 | FastLane documentation
2 | ================
3 | This folder contains hermetic scripts to deploy a built APK to the play store.
4 |
5 | This is done using the [FastLane](https://fastlane.tools) tool suite.
6 |
7 | Deployment can be done manually by Googlers by following
8 | go/flutter-gallery-publish (internal doc).
9 |
10 | Deployment is automatically done by Cirrus on tagged branch commits.
11 |
--------------------------------------------------------------------------------
/flutter_gallery/android/fastlane/metadata/android/en-US/full_description.txt:
--------------------------------------------------------------------------------
1 | (Flutter is beta technology)
2 |
3 | A gallery of widgets and behaviors, plus demos and vignettes, all built with Flutter.
4 |
5 | Flutter is Google’s multi-platform mobile app SDK for crafting beautiful native experiences on iOS and Android in record time.
6 |
7 | This app is open source. Check out the code to see how this app is built: https://github.com/flutter/flutter/tree/master/examples/flutter_gallery
8 |
9 | Visit https://flutter.dev to learn more.
--------------------------------------------------------------------------------
/flutter_gallery/android/fastlane/metadata/android/en-US/short_description.txt:
--------------------------------------------------------------------------------
1 | A gallery showcasing apps and widgets build using the Flutter framework
--------------------------------------------------------------------------------
/flutter_gallery/android/fastlane/metadata/android/en-US/title.txt:
--------------------------------------------------------------------------------
1 | Flutter Gallery
--------------------------------------------------------------------------------
/flutter_gallery/android/fastlane/metadata/android/en-US/video.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/fastlane/metadata/android/en-US/video.txt
--------------------------------------------------------------------------------
/flutter_gallery/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 | android.enableR8=true
5 |
--------------------------------------------------------------------------------
/flutter_gallery/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/flutter_gallery/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
7 |
--------------------------------------------------------------------------------
/flutter_gallery/android/local.properties:
--------------------------------------------------------------------------------
1 | sdk.dir=/Users/thl/Library/Android/sdk
2 | flutter.sdk=/Users/thl/Library/Android/flutter
3 | flutter.buildMode=release
--------------------------------------------------------------------------------
/flutter_gallery/android/settings.gradle:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | include ':app'
6 |
7 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
8 |
9 | def plugins = new Properties()
10 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
11 | if (pluginsFile.exists()) {
12 | pluginsFile.withInputStream { stream -> plugins.load(stream) }
13 | }
14 |
15 | plugins.each { name, path ->
16 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
17 | include ":$name"
18 | project(":$name").projectDir = pluginDirectory
19 | }
20 |
--------------------------------------------------------------------------------
/flutter_gallery/fuchsia/meta/flutter_gallery.cmx:
--------------------------------------------------------------------------------
1 | {
2 | "program": {
3 | "data": "data/flutter_gallery"
4 | },
5 | "sandbox": {
6 | "services": [
7 | "fuchsia.cobalt.LoggerFactory",
8 | "fuchsia.fonts.Provider",
9 | "fuchsia.logger.LogSink",
10 | "fuchsia.modular.Clipboard",
11 | "fuchsia.sys.Environment",
12 | "fuchsia.sys.Launcher",
13 | "fuchsia.ui.input.ImeService",
14 | "fuchsia.ui.policy.Presenter",
15 | "fuchsia.ui.scenic.Scenic"
16 | ]
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/flutter_gallery/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/flutter_gallery/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
3 |
--------------------------------------------------------------------------------
/flutter_gallery/ios/Flutter/Generated.xcconfig:
--------------------------------------------------------------------------------
1 | // This is a generated file; do not edit or check into version control.
2 | FLUTTER_ROOT=/Users/thl/Library/Android/flutter
3 | FLUTTER_APPLICATION_PATH=/Users/thl/AndroidStudioProjects/test workspace/FlutterRepos/flutter_gallery
4 | FLUTTER_TARGET=lib/main.dart
5 | FLUTTER_BUILD_DIR=build
6 | SYMROOT=${SOURCE_ROOT}/../build/ios
7 | OTHER_LDFLAGS=$(inherited) -framework Flutter
8 | FLUTTER_FRAMEWORK_DIR=/Users/thl/Library/Android/flutter/bin/cache/artifacts/engine/ios
9 | FLUTTER_BUILD_NAME=1.0.0
10 | FLUTTER_BUILD_NUMBER=1
11 |
--------------------------------------------------------------------------------
/flutter_gallery/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
3 |
--------------------------------------------------------------------------------
/flutter_gallery/ios/Flutter/flutter_export_environment.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # This is a generated file; do not edit or check into version control.
3 | export "FLUTTER_ROOT=/Users/thl/Library/Android/flutter"
4 | export "FLUTTER_APPLICATION_PATH=/Users/thl/AndroidStudioProjects/test workspace/FlutterRepos/flutter_gallery"
5 | export "FLUTTER_TARGET=lib/main.dart"
6 | export "FLUTTER_BUILD_DIR=build"
7 | export "SYMROOT=${SOURCE_ROOT}/../build/ios"
8 | export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
9 | export "FLUTTER_FRAMEWORK_DIR=/Users/thl/Library/Android/flutter/bin/cache/artifacts/engine/ios"
10 | export "FLUTTER_BUILD_NAME=1.0.0"
11 | export "FLUTTER_BUILD_NUMBER=1"
12 |
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner/AppDelegate.h:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | #import
6 | #import
7 |
8 | @interface AppDelegate : FlutterAppDelegate
9 |
10 | @end
11 |
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner/AppDelegate.m:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | #import "AppDelegate.h"
6 | #import "GeneratedPluginRegistrant.h"
7 |
8 | @implementation AppDelegate
9 |
10 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
11 | [GeneratedPluginRegistrant registerWithRegistry:self];
12 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
13 | }
14 | @end
15 |
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-1024.png
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-120.png
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-152.png
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-167.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-167.png
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-180.png
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-20.png
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-29.png
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-40.png
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-58.png
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-60.png
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-76.png
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-80.png
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-87.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-87.png
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/flutter_gallery/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 |
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner/GeneratedPluginRegistrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | #ifndef GeneratedPluginRegistrant_h
6 | #define GeneratedPluginRegistrant_h
7 |
8 | #import
9 |
10 | NS_ASSUME_NONNULL_BEGIN
11 |
12 | @interface GeneratedPluginRegistrant : NSObject
13 | + (void)registerWithRegistry:(NSObject*)registry;
14 | @end
15 |
16 | NS_ASSUME_NONNULL_END
17 | #endif /* GeneratedPluginRegistrant_h */
18 |
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner/GeneratedPluginRegistrant.m:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | #import "GeneratedPluginRegistrant.h"
6 |
7 | #if __has_include()
8 | #import
9 | #else
10 | @import connectivity;
11 | #endif
12 |
13 | #if __has_include()
14 | #import
15 | #else
16 | @import device_info;
17 | #endif
18 |
19 | #if __has_include()
20 | #import
21 | #else
22 | @import url_launcher;
23 | #endif
24 |
25 | #if __has_include()
26 | #import
27 | #else
28 | @import video_player;
29 | #endif
30 |
31 | @implementation GeneratedPluginRegistrant
32 |
33 | + (void)registerWithRegistry:(NSObject*)registry {
34 | [FLTConnectivityPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTConnectivityPlugin"]];
35 | [FLTDeviceInfoPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTDeviceInfoPlugin"]];
36 | [FLTURLLauncherPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTURLLauncherPlugin"]];
37 | [FLTVideoPlayerPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTVideoPlayerPlugin"]];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | Flutter Gallery
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | ITSAppUsesNonExemptEncryption
43 |
44 | UIViewControllerBasedStatusBarAppearance
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/flutter_gallery/ios/Runner/main.m:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | #import
6 | #import
7 | #import "AppDelegate.h"
8 |
9 | int main(int argc, char * argv[]) {
10 | @autoreleasepool {
11 | return UIApplicationMain(argc, argv, nil,
12 | NSStringFromClass([AppDelegate class]));
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/flutter_gallery/ios/fastlane/Appfile:
--------------------------------------------------------------------------------
1 | app_identifier "io.flutter.demo.gallery" # The bundle identifier of your app
2 | apple_id "deploybot@flutter.io" # Your Apple email address
3 |
4 | itc_team_id "118089806" # iTunes Connect Team ID
5 | team_id "S8QB4VV633" # Developer Portal Team ID
6 |
7 | # For more information about the Appfile, see:
8 | # https://docs.fastlane.tools/advanced/#appfile
9 |
--------------------------------------------------------------------------------
/flutter_gallery/ios/fastlane/README.md:
--------------------------------------------------------------------------------
1 | FastLane documentation
2 | ================
3 | This folder contains hermetic scripts to re-build the app using a distribution
4 | profile and then deploy to TestFlight.
5 |
6 | This is done using the [FastLane](https://fastlane.tools) tool suite.
7 |
8 | Deployment can be done manually by Googlers by following
9 | go/flutter-gallery-publish (internal doc).
10 |
11 | Deployment is automatically done by Cirrus on tagged branch commits.
--------------------------------------------------------------------------------
/flutter_gallery/lib/demo/all.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | export 'animation_demo.dart';
6 | export 'calculator_demo.dart';
7 | export 'colors_demo.dart';
8 | export 'contacts_demo.dart';
9 | export 'cupertino/cupertino.dart';
10 | export 'fortnightly/fortnightly.dart';
11 | export 'images_demo.dart';
12 | export 'material/material.dart';
13 | export 'pesto_demo.dart';
14 | export 'shrine_demo.dart';
15 | export 'transformations/transformations_demo.dart';
16 | export 'typography_demo.dart';
17 | export 'video_demo.dart';
18 |
--------------------------------------------------------------------------------
/flutter_gallery/lib/demo/animation_demo.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | import 'animation/home.dart';
8 |
9 | class AnimationDemo extends StatelessWidget {
10 | const AnimationDemo({Key key}) : super(key: key);
11 |
12 | static const String routeName = '/animation';
13 |
14 | @override
15 | Widget build(BuildContext context) => const AnimationDemoHome();
16 | }
17 |
--------------------------------------------------------------------------------
/flutter_gallery/lib/demo/calculator_demo.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | import 'calculator/home.dart';
8 |
9 | class CalculatorDemo extends StatelessWidget {
10 | const CalculatorDemo({Key key}) : super(key: key);
11 |
12 | static const String routeName = '/calculator';
13 |
14 | @override
15 | Widget build(BuildContext context) => const Calculator();
16 | }
17 |
--------------------------------------------------------------------------------
/flutter_gallery/lib/demo/cupertino/cupertino.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | export 'cupertino_activity_indicator_demo.dart';
6 | export 'cupertino_alert_demo.dart';
7 | export 'cupertino_buttons_demo.dart';
8 | export 'cupertino_navigation_demo.dart';
9 | export 'cupertino_picker_demo.dart';
10 | export 'cupertino_refresh_demo.dart';
11 | export 'cupertino_segmented_control_demo.dart';
12 | export 'cupertino_slider_demo.dart';
13 | export 'cupertino_switch_demo.dart';
14 | export 'cupertino_text_field_demo.dart';
15 |
--------------------------------------------------------------------------------
/flutter_gallery/lib/demo/cupertino/cupertino_activity_indicator_demo.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/cupertino.dart';
6 |
7 | import '../../gallery/demo.dart';
8 |
9 | class CupertinoProgressIndicatorDemo extends StatelessWidget {
10 | static const String routeName = '/cupertino/progress_indicator';
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return CupertinoPageScaffold(
15 | navigationBar: CupertinoNavigationBar(
16 | // We're specifying a back label here because the previous page is a
17 | // Material page. CupertinoPageRoutes could auto-populate these back
18 | // labels.
19 | previousPageTitle: 'Cupertino',
20 | middle: const Text('Activity Indicator'),
21 | trailing: CupertinoDemoDocumentationButton(routeName),
22 | ),
23 | child: const Center(
24 | child: CupertinoActivityIndicator(),
25 | ),
26 | );
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/flutter_gallery/lib/demo/fortnightly/README.md:
--------------------------------------------------------------------------------
1 | # Fortnightly
2 |
3 | A Flutter sample app based on the Material study Fortnightly (a hypothetical, online newspaper.) It
4 | showcases print-quality, custom typography, Material Theming, and text-heavy UI design and layout.
5 |
6 | For info on the Fortnightly Material Study, see: https://material.io/design/material-studies/fortnightly.html
7 |
8 | ## Goals for this sample
9 |
10 | * Help you understand how to customize and layout text.
11 | * Provide you with example code for
12 | * Text
13 | * A short app bar (the menu button top left.)
14 | * Avatar images
15 |
16 | ## Widgets / APIs
17 |
18 | * BeveledRectangleBorder
19 | * BoxConstraints on Container
20 | * CircleAvatar
21 | * ExactAssetImage
22 | * Fonts
23 | * SafeArea
24 | * Stack
25 | * SingleChildScrollView
26 | * Text
27 | * TextStyle
28 | * TextTheme
29 |
30 | ## Notice
31 |
32 | * Theming is passed as a parameter in the constructor of `MaterialApp` (`theme:`).
33 | * `SafeArea` adds padding around notches and virtual home buttons on screens that have them (like
34 | iPhone X+). Here, it protects the `ShortAppBar` from overlapping with the status bar (time)
35 | and makes sure the bottom of the newspaper article has padding beneath it if necessary.
36 | * The entire newspaper article is wrapped in a `SingleChildScrollView` widget which ensures that the
37 | entire article can be viewed no matter what the screen's size or orientation is.
38 | * The `Text` widget with text ' ¬ ' has a `TextStyle` that changes one parameter of an inherited
39 | `TextStyle` using `.apply()``.
40 | * The `Text` widget with text 'Connor Eghan' has a `TextStyle` created explicitly instead of
41 | inheriting from theming.
42 | * You can break up long strings in your source files by putting them on multiple lines.
43 | * Fonts are imported with multiple files expressing their weights (Bold, Light, Medium, Regular)
44 | but are accessed with a `FontWeight` value like `FontWeight.w800` for Merriweather-Bold.ttf.
45 |
46 | ## Questions/issues
47 |
48 | If you have a general question about developing in Flutter, the best places to go are:
49 |
50 | * [The FlutterDev Google Group](https://groups.google.com/forum/#!forum/flutter-dev)
51 | * [The Flutter Gitter channel](https://gitter.im/flutter/flutter)
52 | * [StackOverflow](https://stackoverflow.com/questions/tagged/flutter)
53 |
--------------------------------------------------------------------------------
/flutter_gallery/lib/demo/images_demo.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | import '../gallery/demo.dart';
8 |
9 | class ImagesDemo extends StatelessWidget {
10 | static const String routeName = '/images';
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return TabbedComponentDemoScaffold(
15 | title: 'Animated images',
16 | demos: [
17 | ComponentDemoTabData(
18 | tabName: 'WEBP',
19 | description: '',
20 | exampleCodeTag: 'animated_image',
21 | demoWidget: Semantics(
22 | label: 'Example of animated WEBP',
23 | child: Image.asset(
24 | 'animated_images/animated_flutter_stickers.webp',
25 | package: 'flutter_gallery_assets',
26 | ),
27 | ),
28 | ),
29 | ComponentDemoTabData(
30 | tabName: 'GIF',
31 | description: '',
32 | exampleCodeTag: 'animated_image',
33 | demoWidget: Semantics(
34 | label: 'Example of animated GIF',
35 | child:Image.asset(
36 | 'animated_images/animated_flutter_lgtm.gif',
37 | package: 'flutter_gallery_assets',
38 | ),
39 | ),
40 | ),
41 | ],
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/flutter_gallery/lib/demo/material/elevation_demo.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | import '../../gallery/demo.dart';
8 |
9 | class ElevationDemo extends StatefulWidget {
10 | static const String routeName = '/material/elevation';
11 |
12 | @override
13 | State createState() => _ElevationDemoState();
14 | }
15 |
16 | class _ElevationDemoState extends State {
17 | bool _showElevation = true;
18 |
19 | List buildCards() {
20 | const List elevations = [
21 | 0.0,
22 | 1.0,
23 | 2.0,
24 | 3.0,
25 | 4.0,
26 | 5.0,
27 | 8.0,
28 | 16.0,
29 | 24.0,
30 | ];
31 |
32 | return elevations.map((double elevation) {
33 | return Center(
34 | child: Card(
35 | margin: const EdgeInsets.all(20.0),
36 | elevation: _showElevation ? elevation : 0.0,
37 | child: SizedBox(
38 | height: 100.0,
39 | width: 100.0,
40 | child: Center(
41 | child: Text('${elevation.toStringAsFixed(0)} pt'),
42 | ),
43 | ),
44 | ),
45 | );
46 | }).toList();
47 | }
48 |
49 | @override
50 | Widget build(BuildContext context) {
51 | return Scaffold(
52 | appBar: AppBar(
53 | title: const Text('Elevation'),
54 | actions: [
55 | MaterialDemoDocumentationButton(ElevationDemo.routeName),
56 | IconButton(
57 | icon: const Icon(Icons.sentiment_very_satisfied),
58 | onPressed: () {
59 | setState(() => _showElevation = !_showElevation);
60 | },
61 | ),
62 | ],
63 | ),
64 | body: Scrollbar(child: ListView(children: buildCards())),
65 | );
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/flutter_gallery/lib/demo/material/expansion_tile_list_demo.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | import '../../gallery/demo.dart';
8 |
9 | class ExpansionTileListDemo extends StatelessWidget {
10 | static const String routeName = '/material/expansion-tile-list';
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return Scaffold(
15 | appBar: AppBar(
16 | title: const Text('Expand/collapse list control'),
17 | actions: [MaterialDemoDocumentationButton(routeName)],
18 | ),
19 | body: Scrollbar(
20 | child: ListView(
21 | children: [
22 | const ListTile(title: Text('Top')),
23 | ExpansionTile(
24 | title: const Text('Sublist'),
25 | backgroundColor: Theme.of(context).accentColor.withOpacity(0.025),
26 | children: const [
27 | ListTile(title: Text('One')),
28 | ListTile(title: Text('Two')),
29 | // https://en.wikipedia.org/wiki/Free_Four
30 | ListTile(title: Text('Free')),
31 | ListTile(title: Text('Four')),
32 | ],
33 | ),
34 | const ListTile(title: Text('Bottom')),
35 | ],
36 | ),
37 | ),
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/flutter_gallery/lib/demo/material/material.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | export 'backdrop_demo.dart';
6 | export 'banner_demo.dart';
7 | export 'bottom_app_bar_demo.dart';
8 | export 'bottom_navigation_demo.dart';
9 | export 'buttons_demo.dart';
10 | export 'cards_demo.dart';
11 | export 'chip_demo.dart';
12 | export 'data_table_demo.dart';
13 | export 'date_and_time_picker_demo.dart';
14 | export 'dialog_demo.dart';
15 | export 'drawer_demo.dart';
16 | export 'elevation_demo.dart';
17 | export 'expansion_panels_demo.dart';
18 | export 'expansion_tile_list_demo.dart';
19 | export 'grid_list_demo.dart';
20 | export 'icons_demo.dart';
21 | export 'leave_behind_demo.dart';
22 | export 'list_demo.dart';
23 | export 'menu_demo.dart';
24 | export 'modal_bottom_sheet_demo.dart';
25 | export 'overscroll_demo.dart';
26 | export 'page_selector_demo.dart';
27 | export 'persistent_bottom_sheet_demo.dart';
28 | export 'progress_indicator_demo.dart';
29 | export 'reorderable_list_demo.dart';
30 | export 'scrollable_tabs_demo.dart';
31 | export 'search_demo.dart';
32 | export 'selection_controls_demo.dart';
33 | export 'slider_demo.dart';
34 | export 'snack_bar_demo.dart';
35 | export 'tabs_demo.dart';
36 | export 'tabs_fab_demo.dart';
37 | export 'text_form_field_demo.dart';
38 | export 'tooltip_demo.dart';
39 |
--------------------------------------------------------------------------------
/flutter_gallery/lib/demo/material/modal_bottom_sheet_demo.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | import '../../gallery/demo.dart';
8 |
9 | class ModalBottomSheetDemo extends StatelessWidget {
10 | static const String routeName = '/material/modal-bottom-sheet';
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return Scaffold(
15 | appBar: AppBar(
16 | title: const Text('Modal bottom sheet'),
17 | actions: [MaterialDemoDocumentationButton(routeName)],
18 | ),
19 | body: Center(
20 | child: RaisedButton(
21 | child: const Text('SHOW BOTTOM SHEET'),
22 | onPressed: () {
23 | showModalBottomSheet(context: context, builder: (BuildContext context) {
24 | return Container(
25 | child: Padding(
26 | padding: const EdgeInsets.all(32.0),
27 | child: Text('This is the modal bottom sheet. Slide down to dismiss.',
28 | textAlign: TextAlign.center,
29 | style: TextStyle(
30 | color: Theme.of(context).accentColor,
31 | fontSize: 24.0,
32 | ),
33 | ),
34 | ),
35 | );
36 | });
37 | },
38 | ),
39 | ),
40 | );
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/flutter_gallery/lib/demo/shrine/colors.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | const Color kShrinePink50 = Color(0xFFFEEAE6);
8 | const Color kShrinePink100 = Color(0xFFFEDBD0);
9 | const Color kShrinePink300 = Color(0xFFFBB8AC);
10 | const Color kShrinePink400 = Color(0xFFEAA4A4);
11 |
12 | const Color kShrineBrown900 = Color(0xFF442B2D);
13 | const Color kShrineBrown600 = Color(0xFF7D4F52);
14 |
15 | const Color kShrineErrorRed = Color(0xFFC5032B);
16 |
17 | const Color kShrineSurfaceWhite = Color(0xFFFFFBFA);
18 | const Color kShrineBackgroundWhite = Colors.white;
19 |
--------------------------------------------------------------------------------
/flutter_gallery/lib/demo/shrine/home.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 | import 'package:scoped_model/scoped_model.dart';
7 |
8 | import 'package:flutter_gallery/demo/shrine/backdrop.dart';
9 | import 'package:flutter_gallery/demo/shrine/expanding_bottom_sheet.dart';
10 | import 'package:flutter_gallery/demo/shrine/model/app_state_model.dart';
11 | import 'package:flutter_gallery/demo/shrine/model/product.dart';
12 | import 'package:flutter_gallery/demo/shrine/supplemental/asymmetric_view.dart';
13 |
14 | class ProductPage extends StatelessWidget {
15 | const ProductPage({this.category = Category.all});
16 |
17 | final Category category;
18 |
19 | @override
20 | Widget build(BuildContext context) {
21 | return ScopedModelDescendant(
22 | builder: (BuildContext context, Widget child, AppStateModel model) {
23 | return AsymmetricView(products: model.getProducts());
24 | });
25 | }
26 | }
27 |
28 | class HomePage extends StatelessWidget {
29 | const HomePage({
30 | this.expandingBottomSheet,
31 | this.backdrop,
32 | Key key,
33 | }) : super(key: key);
34 |
35 | final ExpandingBottomSheet expandingBottomSheet;
36 | final Backdrop backdrop;
37 |
38 | @override
39 | Widget build(BuildContext context) {
40 | return Stack(
41 | children: [
42 | backdrop,
43 | Align(child: expandingBottomSheet, alignment: Alignment.bottomRight),
44 | ],
45 | );
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/flutter_gallery/lib/demo/shrine/model/product.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/foundation.dart';
6 |
7 | enum Category {
8 | all,
9 | accessories,
10 | clothing,
11 | home,
12 | }
13 |
14 | class Product {
15 | const Product({
16 | @required this.category,
17 | @required this.id,
18 | @required this.isFeatured,
19 | @required this.name,
20 | @required this.price,
21 | }) : assert(category != null),
22 | assert(id != null),
23 | assert(isFeatured != null),
24 | assert(name != null),
25 | assert(price != null);
26 |
27 | final Category category;
28 | final int id;
29 | final bool isFeatured;
30 | final String name;
31 | final int price;
32 |
33 | String get assetName => '$id-0.jpg';
34 | String get assetPackage => 'shrine_images';
35 |
36 | @override
37 | String toString() => '$name (id=$id)';
38 | }
39 |
--------------------------------------------------------------------------------
/flutter_gallery/lib/demo/shrine_demo.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter_gallery/demo/shrine/app.dart';
7 |
8 | class ShrineDemo extends StatelessWidget {
9 | const ShrineDemo({ Key key }) : super(key: key);
10 |
11 | static const String routeName = '/shrine'; // Used by the Gallery app.
12 |
13 | @override
14 | Widget build(BuildContext context) => ShrineApp();
15 | }
16 |
--------------------------------------------------------------------------------
/flutter_gallery/lib/demo/transformations/transformations_demo_color_picker.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | // A generic widget for a list of selectable colors.
8 | @immutable
9 | class ColorPicker extends StatelessWidget {
10 | const ColorPicker({
11 | @required this.colors,
12 | @required this.selectedColor,
13 | this.onColorSelection,
14 | }) : assert(colors != null),
15 | assert(selectedColor != null);
16 |
17 | final Set colors;
18 | final Color selectedColor;
19 | final ValueChanged onColorSelection;
20 |
21 | @override
22 | Widget build (BuildContext context) {
23 | return Row(
24 | mainAxisAlignment: MainAxisAlignment.center,
25 | children: colors.map((Color color) {
26 | return _ColorPickerSwatch(
27 | color: color,
28 | selected: color == selectedColor,
29 | onTap: () {
30 | if (onColorSelection != null) {
31 | onColorSelection(color);
32 | }
33 | },
34 | );
35 | }).toList(),
36 | );
37 | }
38 | }
39 |
40 | // A single selectable color widget in the ColorPicker.
41 | @immutable
42 | class _ColorPickerSwatch extends StatelessWidget {
43 | const _ColorPickerSwatch({
44 | @required this.color,
45 | @required this.selected,
46 | this.onTap,
47 | }) : assert(color != null),
48 | assert(selected != null);
49 |
50 | final Color color;
51 | final bool selected;
52 | final Function onTap;
53 |
54 | @override
55 | Widget build (BuildContext context) {
56 | return Container(
57 | width: 60.0,
58 | height: 60.0,
59 | padding: const EdgeInsets.fromLTRB(2.0, 0.0, 2.0, 0.0),
60 | child: RawMaterialButton(
61 | fillColor: color,
62 | onPressed: () {
63 | if (onTap != null) {
64 | onTap();
65 | }
66 | },
67 | child: !selected ? null : const Icon(
68 | Icons.check,
69 | color: Colors.white,
70 | ),
71 | ),
72 | );
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/flutter_gallery/lib/demo/transformations/transformations_demo_edit_board_point.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 | import 'transformations_demo_board.dart';
7 | import 'transformations_demo_color_picker.dart';
8 |
9 | // The panel for editing a board point.
10 | @immutable
11 | class EditBoardPoint extends StatelessWidget {
12 | const EditBoardPoint({
13 | Key key,
14 | @required this.boardPoint,
15 | this.onColorSelection,
16 | }) : assert(boardPoint != null),
17 | super(key: key);
18 |
19 | final BoardPoint boardPoint;
20 | final ValueChanged onColorSelection;
21 |
22 | @override
23 | Widget build (BuildContext context) {
24 | return Column(
25 | crossAxisAlignment: CrossAxisAlignment.stretch,
26 | children: [
27 | Text(
28 | '${boardPoint.q}, ${boardPoint.r}',
29 | textAlign: TextAlign.right,
30 | style: const TextStyle(fontWeight: FontWeight.bold),
31 | ),
32 | ColorPicker(
33 | colors: boardPointColors,
34 | selectedColor: boardPoint.color,
35 | onColorSelection: onColorSelection,
36 | ),
37 | ],
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/flutter_gallery/lib/gallery/example_code_parser.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'dart:async';
6 |
7 | import 'package:flutter/services.dart';
8 |
9 | const String _kStartTag = '// START ';
10 | const String _kEndTag = '// END';
11 |
12 | Map _exampleCode;
13 |
14 | Future getExampleCode(String tag, AssetBundle bundle) async {
15 | if (_exampleCode == null)
16 | await _parseExampleCode(bundle);
17 | return _exampleCode[tag];
18 | }
19 |
20 | Future _parseExampleCode(AssetBundle bundle) async {
21 | final String code = await bundle.loadString('lib/gallery/example_code.dart') ??
22 | '// lib/gallery/example_code.dart not found\n';
23 | _exampleCode = {};
24 |
25 | final List lines = code.split('\n');
26 |
27 | List codeBlock;
28 | String codeTag;
29 |
30 | for (final String line in lines) {
31 | if (codeBlock == null) {
32 | // Outside a block.
33 | if (line.startsWith(_kStartTag)) {
34 | // Starting a new code block.
35 | codeBlock = [];
36 | codeTag = line.substring(_kStartTag.length).trim();
37 | } else {
38 | // Just skipping the line.
39 | }
40 | } else {
41 | // Inside a block.
42 | if (line.startsWith(_kEndTag)) {
43 | // Add the block.
44 | _exampleCode[codeTag] = codeBlock.join('\n');
45 | codeBlock = null;
46 | codeTag = null;
47 | } else {
48 | // Add to the current block
49 | // trimRight() to remove any \r on Windows
50 | // without removing any useful indentation
51 | codeBlock.add(line.trimRight());
52 | }
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/flutter_gallery/lib/gallery/scales.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 |
7 | class GalleryTextScaleValue {
8 | const GalleryTextScaleValue(this.scale, this.label);
9 |
10 | final double scale;
11 | final String label;
12 |
13 | @override
14 | bool operator ==(Object other) {
15 | if (other.runtimeType != runtimeType)
16 | return false;
17 | return other is GalleryTextScaleValue
18 | && other.scale == scale
19 | && other.label == label;
20 | }
21 |
22 | @override
23 | int get hashCode => hashValues(scale, label);
24 |
25 | @override
26 | String toString() {
27 | return '$runtimeType($label)';
28 | }
29 |
30 | }
31 |
32 | const List kAllGalleryTextScaleValues = [
33 | GalleryTextScaleValue(null, 'System Default'),
34 | GalleryTextScaleValue(0.8, 'Small'),
35 | GalleryTextScaleValue(1.0, 'Normal'),
36 | GalleryTextScaleValue(1.3, 'Large'),
37 | GalleryTextScaleValue(2.0, 'Huge'),
38 | ];
39 |
40 | class GalleryVisualDensityValue {
41 | const GalleryVisualDensityValue(this.visualDensity, this.label);
42 |
43 | final VisualDensity visualDensity;
44 | final String label;
45 |
46 | @override
47 | bool operator ==(Object other) {
48 | if (other.runtimeType != runtimeType)
49 | return false;
50 | return other is GalleryVisualDensityValue
51 | && other.visualDensity == visualDensity
52 | && other.label == label;
53 | }
54 |
55 | @override
56 | int get hashCode => hashValues(visualDensity, label);
57 |
58 | @override
59 | String toString() {
60 | return '$runtimeType($label)';
61 | }
62 |
63 | }
64 |
65 | const List kAllGalleryVisualDensityValues = [
66 | GalleryVisualDensityValue(VisualDensity(), 'System Default'),
67 | GalleryVisualDensityValue(VisualDensity.comfortable, 'Comfortable'),
68 | GalleryVisualDensityValue(VisualDensity.compact, 'Compact'),
69 | GalleryVisualDensityValue(VisualDensity(horizontal: -3, vertical: -3), 'Very Compact'),
70 | ];
71 |
--------------------------------------------------------------------------------
/flutter_gallery/lib/gallery/updater.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'dart:async';
6 |
7 | import 'package:flutter/material.dart';
8 |
9 | import 'package:url_launcher/url_launcher.dart';
10 |
11 | typedef UpdateUrlFetcher = Future Function();
12 |
13 | class Updater extends StatefulWidget {
14 | const Updater({ @required this.updateUrlFetcher, this.child, Key key })
15 | : assert(updateUrlFetcher != null),
16 | super(key: key);
17 |
18 | final UpdateUrlFetcher updateUrlFetcher;
19 | final Widget child;
20 |
21 | @override
22 | State createState() => UpdaterState();
23 | }
24 |
25 | class UpdaterState extends State {
26 | @override
27 | void initState() {
28 | super.initState();
29 | _checkForUpdates();
30 | }
31 |
32 | static DateTime _lastUpdateCheck;
33 | Future _checkForUpdates() async {
34 | // Only prompt once a day
35 | if (_lastUpdateCheck != null &&
36 | DateTime.now().difference(_lastUpdateCheck) < const Duration(days: 1)) {
37 | return; // We already checked for updates recently
38 | }
39 | _lastUpdateCheck = DateTime.now();
40 |
41 | final String updateUrl = await widget.updateUrlFetcher();
42 | if (updateUrl != null) {
43 | final bool wantsUpdate = await showDialog(context: context, builder: _buildDialog);
44 | if (wantsUpdate != null && wantsUpdate)
45 | launch(updateUrl);
46 | }
47 | }
48 |
49 | Widget _buildDialog(BuildContext context) {
50 | final ThemeData theme = Theme.of(context);
51 | final TextStyle dialogTextStyle =
52 | theme.textTheme.subtitle1.copyWith(color: theme.textTheme.caption.color);
53 | return AlertDialog(
54 | title: const Text('Update Flutter Gallery?'),
55 | content: Text('A newer version is available.', style: dialogTextStyle),
56 | actions: [
57 | FlatButton(
58 | child: const Text('NO THANKS'),
59 | onPressed: () {
60 | Navigator.pop(context, false);
61 | },
62 | ),
63 | FlatButton(
64 | child: const Text('UPDATE'),
65 | onPressed: () {
66 | Navigator.pop(context, true);
67 | },
68 | ),
69 | ],
70 | );
71 | }
72 |
73 | @override
74 | Widget build(BuildContext context) => widget.child;
75 | }
76 |
--------------------------------------------------------------------------------
/flutter_gallery/lib/main.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // Thanks for checking out Flutter!
6 | // Like what you see? Tweet us @FlutterDev
7 |
8 | import 'package:flutter/material.dart';
9 |
10 | import 'gallery/app.dart';
11 |
12 | void main() => runApp(const GalleryApp());
13 |
--------------------------------------------------------------------------------
/flutter_gallery/lib/main_publish.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'gallery/home.dart';
6 | import 'main.dart' as other_main;
7 |
8 | // This main chain-calls main.dart's main. This file is used for publishing
9 | // the gallery and removes the 'PREVIEW' banner.
10 | void main() {
11 | GalleryHome.showPreviewBanner = false;
12 | other_main.main();
13 | }
14 |
--------------------------------------------------------------------------------
/flutter_gallery/macos/.gitignore:
--------------------------------------------------------------------------------
1 | # Flutter-related
2 | **/Flutter/ephemeral/
3 | **/Pods/
4 |
5 | # Xcode-related
6 | **/xcuserdata/
7 |
--------------------------------------------------------------------------------
/flutter_gallery/macos/Flutter/Flutter-Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/flutter_gallery/macos/Flutter/Flutter-Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/flutter_gallery/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/flutter_gallery/macos/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/flutter_gallery/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/flutter_gallery/macos/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import Cocoa
6 | import FlutterMacOS
7 |
8 | @NSApplicationMain
9 | class AppDelegate: FlutterAppDelegate {
10 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
11 | return true
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/flutter_gallery/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 |
--------------------------------------------------------------------------------
/flutter_gallery/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
--------------------------------------------------------------------------------
/flutter_gallery/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
--------------------------------------------------------------------------------
/flutter_gallery/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
--------------------------------------------------------------------------------
/flutter_gallery/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
--------------------------------------------------------------------------------
/flutter_gallery/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
--------------------------------------------------------------------------------
/flutter_gallery/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
--------------------------------------------------------------------------------
/flutter_gallery/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
--------------------------------------------------------------------------------
/flutter_gallery/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 = flutter_gallery
9 |
10 | // The application's bundle identifier
11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterGallery
12 |
13 | // The copyright displayed in application information
14 | PRODUCT_COPYRIGHT = Copyright © 2019 com.example. All rights reserved.
15 |
--------------------------------------------------------------------------------
/flutter_gallery/macos/Runner/Configs/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Debug.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/flutter_gallery/macos/Runner/Configs/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Release.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/flutter_gallery/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 |
--------------------------------------------------------------------------------
/flutter_gallery/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 |
--------------------------------------------------------------------------------
/flutter_gallery/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 |
--------------------------------------------------------------------------------
/flutter_gallery/macos/Runner/MainFlutterWindow.swift:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import Cocoa
6 | import FlutterMacOS
7 |
8 | class MainFlutterWindow: NSWindow {
9 | override func awakeFromNib() {
10 | let flutterViewController = FlutterViewController.init()
11 | let windowFrame = self.frame
12 | self.contentViewController = flutterViewController
13 | self.setFrame(windowFrame, display: true)
14 |
15 | RegisterGeneratedPlugins(registry: flutterViewController)
16 |
17 | super.awakeFromNib()
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/flutter_gallery/macos/Runner/Release.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/flutter_gallery/meta/flutter_gallery.cmx:
--------------------------------------------------------------------------------
1 | {
2 | "program": {
3 | "data": "data/flutter_gallery"
4 | },
5 | "sandbox": {
6 | "services": [
7 | "fuchsia.cobalt.LoggerFactory",
8 | "fuchsia.fonts.Provider",
9 | "fuchsia.logger.LogSink",
10 | "fuchsia.modular.Clipboard",
11 | "fuchsia.modular.ContextWriter",
12 | "fuchsia.modular.DeviceMap",
13 | "fuchsia.modular.ModuleContext",
14 | "fuchsia.sys.Environment",
15 | "fuchsia.sys.Launcher",
16 | "fuchsia.testing.runner.TestRunner",
17 | "fuchsia.ui.input.ImeService",
18 | "fuchsia.ui.policy.Presenter",
19 | "fuchsia.ui.scenic.Scenic"
20 | ]
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/flutter_gallery/pkgget:
--------------------------------------------------------------------------------
1 | export PUB_HOSTED_URL=https://pub.flutter-io.cn
2 | export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
3 | flutter packages get
--------------------------------------------------------------------------------
/flutter_gallery/test/calculator/smoke_test.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter_gallery/demo/calculator_demo.dart';
7 | import 'package:flutter_test/flutter_test.dart';
8 |
9 | void main() {
10 | final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized() as TestWidgetsFlutterBinding;
11 | if (binding is LiveTestWidgetsFlutterBinding)
12 | binding.framePolicy = LiveTestWidgetsFlutterBindingFramePolicy.fullyLive;
13 |
14 | // We press the "1" and the "2" buttons and check that the display
15 | // reads "12".
16 | testWidgets('Flutter calculator app smoke test', (WidgetTester tester) async {
17 | await tester.pumpWidget(const MaterialApp(home: CalculatorDemo()));
18 |
19 | final Finder oneButton = find.widgetWithText(InkResponse, '1');
20 | expect(oneButton, findsOneWidget);
21 |
22 | final Finder twoButton = find.widgetWithText(InkResponse, '2');
23 | expect(twoButton, findsOneWidget);
24 |
25 | await tester.tap(oneButton);
26 | await tester.pump();
27 | await tester.tap(twoButton);
28 | await tester.pump();
29 | await tester.pump(const Duration(seconds: 1)); // Wait until it has finished.
30 |
31 | final Finder display = find.widgetWithText(Expanded, '12');
32 | expect(display, findsOneWidget);
33 | });
34 | }
35 |
--------------------------------------------------------------------------------
/flutter_gallery/test/demo/material/chip_demo_test.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter_gallery/demo/material/chip_demo.dart';
7 | import 'package:flutter_test/flutter_test.dart';
8 |
9 | void main() {
10 | testWidgets('Chip demo has semantic labels', (WidgetTester tester) async {
11 | final SemanticsHandle handle = tester.ensureSemantics();
12 | await tester.pumpWidget(MaterialApp(
13 | theme: ThemeData(platform: TargetPlatform.iOS),
14 | home: ChipDemo(),
15 | ));
16 |
17 | expect(tester.getSemantics(find.byIcon(Icons.vignette)), matchesSemantics(
18 | isButton: true,
19 | hasEnabledState: true,
20 | isEnabled: true,
21 | isFocusable: true,
22 | hasTapAction: true,
23 | label: 'Update border shape',
24 | ));
25 |
26 | expect(tester.getSemantics(find.byIcon(Icons.refresh)), matchesSemantics(
27 | isButton: true,
28 | hasEnabledState: true,
29 | isEnabled: true,
30 | isFocusable: true,
31 | hasTapAction: true,
32 | label: 'Reset chips',
33 | ));
34 |
35 | handle.dispose();
36 | });
37 | }
38 |
--------------------------------------------------------------------------------
/flutter_gallery/test/demo/material/drawer_demo_test.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter_gallery/demo/material/drawer_demo.dart';
7 | import 'package:flutter_test/flutter_test.dart';
8 |
9 | void main() {
10 | testWidgets('Drawer header does not scroll', (WidgetTester tester) async {
11 | await tester.pumpWidget(MaterialApp(
12 | theme: ThemeData(platform: TargetPlatform.iOS),
13 | home: DrawerDemo(),
14 | ));
15 |
16 | await tester.tap(find.text('Tap here to open the drawer'));
17 | await tester.pump();
18 | await tester.pump(const Duration(milliseconds: 500));
19 |
20 | expect(tester.getTopLeft(find.byType(UserAccountsDrawerHeader)).dy, 0.0);
21 | final double initialTopItemSaneY = tester.getTopLeft(find.text('Drawer item A')).dy;
22 | expect(initialTopItemSaneY, greaterThan(0.0));
23 |
24 | await tester.drag(find.text('Drawer item B'), const Offset(0.0, 400.0));
25 | await tester.pump();
26 |
27 | expect(tester.getTopLeft(find.byType(UserAccountsDrawerHeader)).dy, 0.0);
28 | expect(tester.getTopLeft(find.text('Drawer item A')).dy, greaterThan(initialTopItemSaneY));
29 | expect(tester.getTopLeft(find.text('Drawer item A')).dy, lessThanOrEqualTo(initialTopItemSaneY + 400.0));
30 | });
31 | }
32 |
--------------------------------------------------------------------------------
/flutter_gallery/test/demo/material/expansion_panels_demo_test.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter_gallery/demo/material/expansion_panels_demo.dart';
7 | import 'package:flutter_test/flutter_test.dart';
8 |
9 | Future main() async {
10 | testWidgets('Expansion panel demo: radio tile selection changes on tap', (WidgetTester tester) async {
11 | await tester.pumpWidget(MaterialApp(home: ExpansionPanelsDemo()));
12 |
13 | expect(_expandIcons, findsNWidgets(3));
14 |
15 | await tester.tap(find.byWidget(_radioPanelExpandIcon));
16 | await tester.pumpAndSettle();
17 |
18 | expect(_radioFinder, findsNWidgets(3));
19 |
20 | const int i = 1;
21 |
22 | expect(_isRadioSelected(0), isTrue);
23 | expect(_isRadioSelected(i), isFalse);
24 |
25 | await tester.tap(find.byWidget(_radioListTiles[i]));
26 | await tester.pumpAndSettle();
27 |
28 | expect(_isRadioSelected(0), isFalse);
29 | expect(_isRadioSelected(i), isTrue);
30 | });
31 | }
32 |
33 | Finder get _expandIcons => find.byType(ExpandIcon);
34 |
35 | Widget get _radioPanelExpandIcon => _expandIcons.evaluate().toList()[1].widget;
36 |
37 | bool _isRadioSelected(int index) =>
38 | _radios[index].value == _radios[index].groupValue;
39 |
40 | List> get _radios => List>.from(
41 | _radioFinder.evaluate().map((Element e) => e.widget));
42 |
43 | // [find.byType] and [find.widgetWithText] do not match subclasses; `Radio` is not sufficient to find a `Radio<_Location>`.
44 | // Another approach is to grab the `runtimeType` of a dummy instance; see packages/flutter/test/material/control_list_tile_test.dart.
45 | Finder get _radioFinder =>
46 | find.byWidgetPredicate((Widget w) => w is Radio);
47 |
48 | List> get _radioListTiles =>
49 | List>.from(
50 | _radioListTilesFinder.evaluate().map((Element e) => e.widget));
51 |
52 | Finder get _radioListTilesFinder =>
53 | find.byWidgetPredicate((Widget w) => w is RadioListTile);
54 |
--------------------------------------------------------------------------------
/flutter_gallery/test/demo/material/menu_demo_test.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter_gallery/demo/material/menu_demo.dart';
7 | import 'package:flutter_gallery/gallery/themes.dart';
8 | import 'package:flutter_test/flutter_test.dart';
9 |
10 | void main() {
11 | testWidgets('Menu icon satisfies accessibility contrast ratio guidelines, light mode', (WidgetTester tester) async {
12 | await tester.pumpWidget(MaterialApp(
13 | theme: kLightGalleryTheme,
14 | home: const MenuDemo(),
15 | ));
16 |
17 | await expectLater(tester, meetsGuideline(textContrastGuideline));
18 |
19 | await expectLater(tester, meetsGuideline(CustomMinimumContrastGuideline(finder: find.byWidgetPredicate((Widget widget) => widget is Icon))));
20 | });
21 |
22 | testWidgets('Menu icon satisfies accessibility contrast ratio guidelines, dark mode', (WidgetTester tester) async {
23 | await tester.pumpWidget(MaterialApp(
24 | theme: kDarkGalleryTheme,
25 | home: const MenuDemo(),
26 | ));
27 |
28 | await expectLater(tester, meetsGuideline(textContrastGuideline));
29 |
30 | await expectLater(tester, meetsGuideline(CustomMinimumContrastGuideline(finder: find.byWidgetPredicate((Widget widget) => widget is Icon))));
31 | });
32 | }
33 |
--------------------------------------------------------------------------------
/flutter_gallery/test/example_code_display_test.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter_gallery/gallery/app.dart';
7 | import 'package:flutter_test/flutter_test.dart';
8 |
9 | void main() {
10 | final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized() as TestWidgetsFlutterBinding;
11 | if (binding is LiveTestWidgetsFlutterBinding)
12 | binding.framePolicy = LiveTestWidgetsFlutterBindingFramePolicy.fullyLive;
13 |
14 | testWidgets('Flutter gallery button example code displays', (WidgetTester tester) async {
15 | // Regression test for https://github.com/flutter/flutter/issues/6147
16 |
17 | await tester.pumpWidget(const GalleryApp(testMode: true));
18 | await tester.pump(); // see https://github.com/flutter/flutter/issues/1865
19 | await tester.pump(); // triggers a frame
20 |
21 | await Scrollable.ensureVisible(tester.element(find.text('Material')), alignment: 0.5);
22 | await tester.pumpAndSettle();
23 | await tester.tap(find.text('Material'));
24 | await tester.pumpAndSettle();
25 |
26 | // Launch the buttons demo and then prove that showing the example
27 | // code dialog does not crash.
28 |
29 | await tester.tap(find.text('Buttons'));
30 | await tester.pumpAndSettle();
31 |
32 | await tester.tap(find.byTooltip('Show example code'));
33 | await tester.pump(); // start animation
34 | await tester.pump(const Duration(seconds: 1)); // end animation
35 |
36 | expect(find.text('Example code'), findsOneWidget);
37 | });
38 | }
39 |
--------------------------------------------------------------------------------
/flutter_gallery/test/example_code_parser_test.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'dart:async';
6 | import 'dart:typed_data';
7 |
8 | import 'package:flutter/services.dart';
9 | import 'package:flutter_gallery/gallery/example_code_parser.dart';
10 | import 'package:flutter_test/flutter_test.dart';
11 |
12 | void main() {
13 | test('Flutter gallery example code parser test', () async {
14 | final TestAssetBundle bundle = TestAssetBundle();
15 |
16 | final String codeSnippet0 = await getExampleCode('test_0', bundle);
17 | expect(codeSnippet0, 'test 0 0\ntest 0 1');
18 |
19 | final String codeSnippet1 = await getExampleCode('test_1', bundle);
20 | expect(codeSnippet1, 'test 1 0\ntest 1 1');
21 |
22 | final String codeSnippet3 = await getExampleCode('test_2_windows_breaks', bundle);
23 | expect(codeSnippet3, 'windows test 2 0\nwindows test 2 1');
24 | });
25 | }
26 |
27 | const String testCodeFile = '''
28 | // A fake test file
29 | // START test_0
30 | test 0 0
31 | test 0 1
32 | // END
33 |
34 | // Some comments
35 | // START test_1
36 | test 1 0
37 | test 1 1
38 | // END
39 |
40 | // START test_2_windows_breaks\r\nwindows test 2 0\r\nwindows test 2 1\r\n// END
41 | ''';
42 |
43 | class TestAssetBundle extends AssetBundle {
44 | @override
45 | Future load(String key) async => null;
46 |
47 | @override
48 | Future loadString(String key, { bool cache = true }) async {
49 | if (key == 'lib/gallery/example_code.dart')
50 | return testCodeFile;
51 | return null;
52 | }
53 |
54 | @override
55 | Future loadStructuredData(String key, Future parser(String value)) async {
56 | return parser(await loadString(key));
57 | }
58 |
59 | @override
60 | String toString() => '$runtimeType@$hashCode()';
61 | }
62 |
--------------------------------------------------------------------------------
/flutter_gallery/test/flutter_test_config.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | export 'package:flutter_goldens/flutter_goldens.dart' show main;
6 |
--------------------------------------------------------------------------------
/flutter_gallery/test/pesto_test.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter/material.dart';
6 | import 'package:flutter_test/flutter_test.dart';
7 | import 'package:flutter_gallery/gallery/app.dart';
8 |
9 | void main() {
10 | final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized() as TestWidgetsFlutterBinding;
11 | if (binding is LiveTestWidgetsFlutterBinding)
12 | binding.framePolicy = LiveTestWidgetsFlutterBindingFramePolicy.fullyLive;
13 |
14 | // Regression test for https://github.com/flutter/flutter/pull/5168
15 | testWidgets('Pesto appbar heroics', (WidgetTester tester) async {
16 | await tester.pumpWidget(
17 | // The bug only manifests itself when the screen's orientation is portrait
18 | const Center(
19 | child: SizedBox(
20 | width: 450.0,
21 | height: 800.0,
22 | child: GalleryApp(testMode: true),
23 | ),
24 | )
25 | );
26 | await tester.pump(); // see https://github.com/flutter/flutter/issues/1865
27 | await tester.pump(); // triggers a frame
28 |
29 | await tester.tap(find.text('Studies'));
30 | await tester.pumpAndSettle();
31 |
32 | await tester.tap(find.text('Pesto'));
33 | await tester.pumpAndSettle();
34 |
35 | await tester.tap(find.text('Roasted Chicken'));
36 | await tester.pumpAndSettle();
37 |
38 | await tester.drag(find.text('Roasted Chicken'), const Offset(0.0, -300.0));
39 | await tester.pumpAndSettle();
40 |
41 | Navigator.pop(find.byType(Scaffold).evaluate().single);
42 | await tester.pumpAndSettle();
43 | });
44 |
45 | testWidgets('Pesto can be scrolled all the way down', (WidgetTester tester) async {
46 | await tester.pumpWidget(const GalleryApp(testMode: true));
47 | await tester.pump(); // see https://github.com/flutter/flutter/issues/1865
48 | await tester.pump(); // triggers a frame
49 |
50 | await tester.tap(find.text('Studies'));
51 | await tester.pumpAndSettle();
52 |
53 | await tester.tap(find.text('Pesto'));
54 | await tester.pumpAndSettle();
55 |
56 | await tester.fling(find.text('Roasted Chicken'), const Offset(0.0, -200.0), 10000.0);
57 | await tester.pumpAndSettle(); // start and finish fling
58 | expect(find.text('Spanakopita'), findsOneWidget);
59 | });
60 | }
61 |
--------------------------------------------------------------------------------
/flutter_gallery/test/update_test.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter_test/flutter_test.dart';
6 | import 'package:flutter_gallery/gallery/app.dart' show GalleryApp;
7 |
8 | Future mockUpdateUrlFetcher() {
9 | // A real implementation would connect to the network to retrieve this value
10 | return Future.value('http://www.example.com/');
11 | }
12 |
13 | void main() {
14 | final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized() as TestWidgetsFlutterBinding;
15 | if (binding is LiveTestWidgetsFlutterBinding)
16 | binding.framePolicy = LiveTestWidgetsFlutterBindingFramePolicy.fullyLive;
17 |
18 | // Regression test for https://github.com/flutter/flutter/pull/5168
19 | testWidgets('update dialog', (WidgetTester tester) async {
20 | await tester.pumpWidget(
21 | const GalleryApp(
22 | testMode: true,
23 | updateUrlFetcher: mockUpdateUrlFetcher,
24 | )
25 | );
26 | await tester.pump(); // see https://github.com/flutter/flutter/issues/1865
27 | await tester.pump(); // triggers a frame
28 |
29 | expect(find.text('UPDATE'), findsOneWidget);
30 |
31 | await tester.tap(find.text('NO THANKS'));
32 | await tester.pump();
33 |
34 | await tester.tap(find.text('Studies'));
35 | await tester.pump(); // Launch
36 | await tester.pump(const Duration(seconds: 1)); // transition is complete
37 |
38 | final Finder backButton = find.byTooltip('Back');
39 | expect(backButton, findsOneWidget);
40 | await tester.tap(backButton);
41 | await tester.pump(); // Start the pop "back" operation.
42 | await tester.pump(); // Complete the willPop() Future.
43 | await tester.pump(const Duration(seconds: 1)); // transition is complete
44 | //await tester.pumpUntilNoTransientCallbacks(const Duration(seconds: 1));
45 |
46 | expect(find.text('UPDATE'), findsNothing);
47 | });
48 | }
49 |
--------------------------------------------------------------------------------
/flutter_gallery/test_driver/scroll_perf.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter_driver/driver_extension.dart';
6 | import 'package:flutter_gallery/gallery/app.dart' show GalleryApp;
7 | import 'package:flutter/material.dart';
8 |
9 | void main() {
10 | enableFlutterDriverExtension();
11 | // As in lib/main.dart: overriding https://github.com/flutter/flutter/issues/13736
12 | // for better visual effect at the cost of performance.
13 | runApp(const GalleryApp(testMode: true));
14 | }
15 |
--------------------------------------------------------------------------------
/flutter_gallery/test_driver/scroll_perf_test.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'dart:async';
6 |
7 | import 'package:flutter_driver/flutter_driver.dart';
8 | import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
9 |
10 | void main() {
11 | group('scrolling performance test', () {
12 | FlutterDriver driver;
13 |
14 | setUpAll(() async {
15 | driver = await FlutterDriver.connect();
16 |
17 | await driver.waitUntilFirstFrameRasterized();
18 | });
19 |
20 | tearDownAll(() async {
21 | if (driver != null)
22 | driver.close();
23 | });
24 |
25 | test('measure', () async {
26 | final Timeline timeline = await driver.traceAction(() async {
27 | await driver.tap(find.text('Material'));
28 |
29 | final SerializableFinder demoList = find.byValueKey('GalleryDemoList');
30 |
31 | // TODO(eseidel): These are very artificial scrolls, we should use better
32 | // https://github.com/flutter/flutter/issues/3316
33 | // Scroll down
34 | for (int i = 0; i < 5; i++) {
35 | await driver.scroll(demoList, 0.0, -300.0, const Duration(milliseconds: 300));
36 | await Future.delayed(const Duration(milliseconds: 500));
37 | }
38 |
39 | // Scroll up
40 | for (int i = 0; i < 5; i++) {
41 | await driver.scroll(demoList, 0.0, 300.0, const Duration(milliseconds: 300));
42 | await Future.delayed(const Duration(milliseconds: 500));
43 | }
44 | });
45 |
46 | TimelineSummary.summarize(timeline)
47 | ..writeSummaryToFile('home_scroll_perf', pretty: true)
48 | ..writeTimelineToFile('home_scroll_perf', pretty: true);
49 | });
50 | });
51 | }
52 |
--------------------------------------------------------------------------------
/flutter_gallery/test_driver/scroll_perf_web.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'package:flutter_driver/driver_extension.dart';
6 | import 'package:flutter_gallery/gallery/app.dart' show GalleryApp;
7 | import 'package:flutter/material.dart';
8 |
9 | void main() {
10 | enableFlutterDriverExtension();
11 | runApp(const GalleryApp(testMode: true));
12 | }
13 |
--------------------------------------------------------------------------------
/flutter_gallery/test_driver/scroll_perf_web_test.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'dart:async';
6 |
7 | import 'package:flutter_driver/flutter_driver.dart';
8 | import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
9 |
10 | void main() {
11 | group('scrolling performance test', () {
12 | FlutterDriver driver;
13 |
14 | setUpAll(() async {
15 | driver = await FlutterDriver.connect();
16 | });
17 |
18 | tearDownAll(() async {
19 | if (driver != null)
20 | driver.close();
21 | });
22 |
23 | test('measure', () async {
24 | await driver.tap(find.text('Material'));
25 |
26 | final SerializableFinder demoList = find.byValueKey('GalleryDemoList');
27 |
28 | // TODO(eseidel): These are very artificial scrolls, we should use better
29 | // https://github.com/flutter/flutter/issues/3316
30 | // Scroll down
31 | for (int i = 0; i < 5; i++) {
32 | await driver.scroll(demoList, 0.0, -300.0, const Duration(milliseconds: 300));
33 | await Future.delayed(const Duration(milliseconds: 500));
34 | }
35 |
36 | // Scroll up
37 | for (int i = 0; i < 5; i++) {
38 | await driver.scroll(demoList, 0.0, 300.0, const Duration(milliseconds: 300));
39 | await Future.delayed(const Duration(milliseconds: 500));
40 | }
41 | });
42 | });
43 | }
44 |
--------------------------------------------------------------------------------
/flutter_gallery/test_driver/transitions_perf.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'dart:async';
6 | import 'dart:convert' show JsonEncoder;
7 |
8 | import 'package:flutter_driver/driver_extension.dart';
9 | import 'package:flutter_gallery/gallery/demos.dart';
10 | import 'package:flutter_gallery/gallery/app.dart' show GalleryApp;
11 | import 'package:flutter/material.dart';
12 |
13 | Future _handleMessages(String message) async {
14 | assert(message == 'demoNames');
15 | return const JsonEncoder.withIndent(' ').convert(
16 | kAllGalleryDemos.map((GalleryDemo demo) => '${demo.title}@${demo.category.name}').toList(),
17 | );
18 | }
19 |
20 | void main() {
21 | enableFlutterDriverExtension(handler: _handleMessages);
22 | // As in lib/main.dart: overriding https://github.com/flutter/flutter/issues/13736
23 | // for better visual effect at the cost of performance.
24 | runApp(const GalleryApp(testMode: true));
25 | }
26 |
--------------------------------------------------------------------------------
/flutter_gallery/test_driver/transitions_perf_with_semantics.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'transitions_perf.dart' as transitions_perf;
6 |
7 | void main() {
8 | transitions_perf.main();
9 | }
10 |
--------------------------------------------------------------------------------
/flutter_gallery/test_driver/transitions_perf_with_semantics_test.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | import 'transitions_perf_test.dart' as transitions_perf_test;
6 |
7 | void main() {
8 | transitions_perf_test.main(['--with_semantics']);
9 | }
10 |
--------------------------------------------------------------------------------
/flutter_gallery/test_memory/back_button.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // See //dev/devicelab/bin/tasks/flutter_gallery__memory_nav.dart
6 |
7 | import 'dart:async';
8 |
9 | import 'package:flutter/material.dart';
10 | import 'package:flutter/scheduler.dart';
11 | import 'package:flutter_gallery/gallery/app.dart' show GalleryApp;
12 | import 'package:flutter_test/flutter_test.dart';
13 |
14 | Future endOfAnimation() async {
15 | do {
16 | await SchedulerBinding.instance.endOfFrame;
17 | } while (SchedulerBinding.instance.hasScheduledFrame);
18 | }
19 |
20 | int iteration = 0;
21 |
22 | class LifecycleObserver extends WidgetsBindingObserver {
23 | @override
24 | void didChangeAppLifecycleState(AppLifecycleState state) {
25 | debugPrint('==== MEMORY BENCHMARK ==== $state ====');
26 | debugPrint('This was lifecycle event number $iteration in this instance');
27 | }
28 | }
29 |
30 | Future main() async {
31 | runApp(const GalleryApp());
32 | await endOfAnimation();
33 | await Future.delayed(const Duration(milliseconds: 50));
34 | debugPrint('==== MEMORY BENCHMARK ==== READY ====');
35 | WidgetsBinding.instance.addObserver(LifecycleObserver());
36 | }
37 |
--------------------------------------------------------------------------------
/flutter_gallery/test_memory/image_cache_memory.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | // See //dev/devicelab/bin/tasks/flutter_gallery__image_cache_memory.dart
6 |
7 | import 'dart:async';
8 |
9 | import 'package:flutter/widgets.dart';
10 | import 'package:flutter/scheduler.dart';
11 | import 'package:flutter_test/flutter_test.dart';
12 |
13 | // Once we provide an option for images to be resized to
14 | // fit the container, we should see a significant drop in
15 | // the amount of memory consumed by this benchmark.
16 | Future main() async {
17 | const int numItems = 10;
18 |
19 | runApp(Directionality(
20 | textDirection: TextDirection.ltr,
21 | child: ListView.builder(
22 | key: const Key('ImageList'),
23 | itemCount: numItems,
24 | itemBuilder: (BuildContext context, int position) {
25 | return Container(
26 | width: 200,
27 | height: 200,
28 | child: Center(
29 | child: Image.asset(
30 | 'monochrome/red-square-1024x1024.png',
31 | package: 'flutter_gallery_assets',
32 | width: 100,
33 | height: 100,
34 | fit: BoxFit.contain,
35 | key: Key('image_$position'),
36 | ),
37 | ),
38 | );
39 | },
40 | ),
41 | ));
42 |
43 | await SchedulerBinding.instance.endOfFrame;
44 |
45 | // We are waiting for the GPU to rasterize a frame here. This makes this flaky,
46 | // we can rely on a more deterministic such as `Window.onReportTimings` once
47 | // https://github.com/flutter/flutter/issues/26154 is addressed.
48 | await Future.delayed(const Duration(milliseconds: 50));
49 | debugPrint('==== MEMORY BENCHMARK ==== READY ====');
50 |
51 | final WidgetController controller =
52 | LiveWidgetController(WidgetsBinding.instance);
53 |
54 | debugPrint('Scrolling...');
55 | final Finder list = find.byKey(const Key('ImageList'));
56 | final Finder lastItem = find.byKey(const Key('image_${numItems - 1}'));
57 | do {
58 | await controller.drag(list, const Offset(0.0, -30.0));
59 | await Future.delayed(const Duration(milliseconds: 20));
60 | } while (!lastItem.precache());
61 |
62 | debugPrint('==== MEMORY BENCHMARK ==== DONE ====');
63 | }
64 |
--------------------------------------------------------------------------------
/flutter_gallery/tool/run_instrumentation_test.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Copyright 2014 The Flutter Authors. All rights reserved.
3 | # Use of this source code is governed by a BSD-style license that can be
4 | # found in the LICENSE file.
5 |
6 | set -e
7 |
8 | if [ ! -f "./pubspec.yaml" ]; then
9 | echo "ERROR: current directory must be the root of flutter_gallery package"
10 | exit 1
11 | fi
12 |
13 | cd android
14 |
15 | # Currently there's no non-hacky way to pass a device ID to gradlew, but it's
16 | # OK as in the devicelab we have one device per host.
17 | #
18 | # See also: https://goo.gl/oe5aUW
19 | ./gradlew connectedAndroidTest -Ptarget=test/live_smoketest.dart
20 |
--------------------------------------------------------------------------------
/flutter_gallery/uploadMaster:
--------------------------------------------------------------------------------
1 | git push origin master
2 |
--------------------------------------------------------------------------------
/flutter_gallery/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/web/favicon.png
--------------------------------------------------------------------------------
/flutter_gallery/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/flutter_gallery/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/flutter_gallery/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/flutter_gallery/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | Flutter Gallery
19 |
20 |
21 |
22 |
25 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/flutter_gallery/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "flutter_gallery",
3 | "short_name": "flutter_gallery",
4 | "start_url": ".",
5 | "display": "minimal-ui",
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 | }
24 |
--------------------------------------------------------------------------------
/login_demo/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | .dart_tool/
26 | .flutter-plugins
27 | .packages
28 | .pub-cache/
29 | .pub/
30 | /build/
31 |
32 | # Android related
33 | **/android/**/gradle-wrapper.jar
34 | **/android/.gradle
35 | **/android/captures/
36 | **/android/gradlew
37 | **/android/gradlew.bat
38 | **/android/local.properties
39 | **/android/**/GeneratedPluginRegistrant.java
40 |
41 | # iOS/XCode related
42 | **/ios/**/*.mode1v3
43 | **/ios/**/*.mode2v3
44 | **/ios/**/*.moved-aside
45 | **/ios/**/*.pbxuser
46 | **/ios/**/*.perspectivev3
47 | **/ios/**/*sync/
48 | **/ios/**/.sconsign.dblite
49 | **/ios/**/.tags*
50 | **/ios/**/.vagrant/
51 | **/ios/**/DerivedData/
52 | **/ios/**/Icon?
53 | **/ios/**/Pods/
54 | **/ios/**/.symlinks/
55 | **/ios/**/profile
56 | **/ios/**/xcuserdata
57 | **/ios/.generated/
58 | **/ios/Flutter/App.framework
59 | **/ios/Flutter/Flutter.framework
60 | **/ios/Flutter/Generated.xcconfig
61 | **/ios/Flutter/app.flx
62 | **/ios/Flutter/app.zip
63 | **/ios/Flutter/flutter_assets/
64 | **/ios/ServiceDefinitions.json
65 | **/ios/Runner/GeneratedPluginRegistrant.*
66 |
67 | # Exceptions to above rules.
68 | !**/ios/**/default.mode1v3
69 | !**/ios/**/default.mode2v3
70 | !**/ios/**/default.pbxuser
71 | !**/ios/**/default.perspectivev3
72 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
73 |
--------------------------------------------------------------------------------
/login_demo/.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: bc7bc940836f1f834699625426795fd6f07c18ec
8 | channel: beta
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/login_demo/README.md:
--------------------------------------------------------------------------------
1 | # login_demo
2 |
3 | 一个App启动时,未登录跳登录页,已登录跳主页示例!
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/login_demo/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26 |
27 | android {
28 | compileSdkVersion 28
29 |
30 | lintOptions {
31 | disable 'InvalidPackage'
32 | }
33 |
34 | defaultConfig {
35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
36 | applicationId "com.thl.tt.login_demo"
37 | minSdkVersion 16
38 | targetSdkVersion 28
39 | versionCode flutterVersionCode.toInteger()
40 | versionName flutterVersionName
41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
42 | }
43 |
44 | buildTypes {
45 | release {
46 | // TODO: Add your own signing config for the release build.
47 | // Signing with the debug keys for now, so `flutter run --release` works.
48 | signingConfig signingConfigs.debug
49 | }
50 | }
51 | }
52 |
53 | flutter {
54 | source '../..'
55 | }
56 |
57 | dependencies {
58 | testImplementation 'junit:junit:4.12'
59 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
61 | }
62 |
--------------------------------------------------------------------------------
/login_demo/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/login_demo/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
13 |
20 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/login_demo/android/app/src/main/java/com/thl/tt/login_demo/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.thl.tt.login_demo;
2 |
3 | import android.os.Bundle;
4 | import io.flutter.app.FlutterActivity;
5 | import io.flutter.plugins.GeneratedPluginRegistrant;
6 |
7 | public class MainActivity extends FlutterActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | GeneratedPluginRegistrant.registerWith(this);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/login_demo/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/login_demo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/login_demo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/login_demo/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/login_demo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/login_demo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/login_demo/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/login_demo/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/login_demo/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | jcenter()
5 | }
6 |
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.2.1'
9 | }
10 | }
11 |
12 | allprojects {
13 | repositories {
14 | google()
15 | jcenter()
16 | }
17 | }
18 |
19 | rootProject.buildDir = '../build'
20 | subprojects {
21 | project.buildDir = "${rootProject.buildDir}/${project.name}"
22 | }
23 | subprojects {
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/login_demo/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
--------------------------------------------------------------------------------
/login_demo/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
7 |
--------------------------------------------------------------------------------
/login_demo/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/login_demo/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 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/login_demo/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/login_demo/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/login_demo/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/login_demo/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/login_demo/ios/Runner/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : FlutterAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/login_demo/ios/Runner/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #include "AppDelegate.h"
2 | #include "GeneratedPluginRegistrant.h"
3 |
4 | @implementation AppDelegate
5 |
6 | - (BOOL)application:(UIApplication *)application
7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
8 | [GeneratedPluginRegistrant registerWithRegistry:self];
9 | // Override point for customization after application launch.
10 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
11 | }
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/login_demo/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/login_demo/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/login_demo/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/login_demo/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sky24n/FlutterRepos/0b5acf0c5e9f45ef1e6f64d71977f771072241b0/login_demo/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/login_demo/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.
--------------------------------------------------------------------------------
/login_demo/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 |
--------------------------------------------------------------------------------
/login_demo/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | login_demo
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/login_demo/ios/Runner/main.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char* argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/login_demo/lib/login_demo1.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'package:base_library/base_library.dart';
4 |
5 | import 'login_page.dart';
6 | import 'main_page.dart';
7 |
8 | class MyAppDemo1 extends StatelessWidget {
9 | @override
10 | Widget build(BuildContext context) {
11 | LogUtil.e("sp is init ${SpUtil.isInitialized()}");
12 | return new MaterialApp(
13 | routes: {
14 | BaseConstant.routeMain: (ctx) => MainPage(),
15 | BaseConstant.routeLogin: (ctx) => LoginPage(),
16 | },
17 | home: Util.isLogin() ? MainPage() : LoginPage(),
18 | theme: ThemeData.light().copyWith(
19 | primaryColor: Colors.deepPurpleAccent,
20 | ),
21 | );
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/login_demo/lib/main_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:base_library/base_library.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class MainPage extends StatefulWidget {
5 | @override
6 | State createState() {
7 | return new MainPageState();
8 | }
9 | }
10 |
11 | class MainPageState extends State {
12 | @override
13 | void initState() {
14 | super.initState();
15 | }
16 |
17 | @override
18 | Widget build(BuildContext context) {
19 | String _userName =
20 | Util.isLogin() ? SpUtil.getString(BaseConstant.keyUserName) : "";
21 |
22 | return Scaffold(
23 | appBar: AppBar(
24 | title: const Text('Home'),
25 | ),
26 | body: new Column(
27 | children: [
28 | new Container(
29 | height: 50,
30 | child: new Center(
31 | child: new Text("用户名:$_userName"),
32 | ),
33 | ),
34 | new RoundButton(
35 | text: Util.isLogin() ? "退出" : "未登录",
36 | margin: EdgeInsets.all(12),
37 | onPressed: () {
38 | if (Util.isLogin()) {
39 | SpUtil.remove(BaseConstant.keyAppToken);
40 | setState(() {});
41 | } else {
42 | RouteUtil.goLogin(context);
43 | }
44 | },
45 | )
46 | ],
47 | ),
48 | );
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/login_demo/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:login_demo/main.dart';
12 |
13 | void main() {
14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(MyApp());
17 |
18 | // Verify that our counter starts at 0.
19 | expect(find.text('0'), findsOneWidget);
20 | expect(find.text('1'), findsNothing);
21 |
22 | // Tap the '+' icon and trigger a frame.
23 | await tester.tap(find.byIcon(Icons.add));
24 | await tester.pump();
25 |
26 | // Verify that our counter has incremented.
27 | expect(find.text('0'), findsNothing);
28 | expect(find.text('1'), findsOneWidget);
29 | });
30 | }
31 |
--------------------------------------------------------------------------------
/login_demo/uploadMaster:
--------------------------------------------------------------------------------
1 | git push origin master
2 |
--------------------------------------------------------------------------------
/uploadMaster:
--------------------------------------------------------------------------------
1 | git push origin master
2 |
--------------------------------------------------------------------------------