浏览代码

趣味自拍UI

dengmeiying 2 年之前
当前提交
7101537879
共有 100 个文件被更改,包括 3871 次插入0 次删除
  1. 44 0
      .gitignore
  2. 45 0
      .metadata
  3. 25 0
      .vscode/launch.json
  4. 16 0
      README.md
  5. 29 0
      analysis_options.yaml
  6. 13 0
      android/.gitignore
  7. 71 0
      android/app/build.gradle
  8. 8 0
      android/app/src/debug/AndroidManifest.xml
  9. 45 0
      android/app/src/main/AndroidManifest.xml
  10. 6 0
      android/app/src/main/kotlin/com/example/photoapp/MainActivity.kt
  11. 12 0
      android/app/src/main/res/drawable-v21/launch_background.xml
  12. 12 0
      android/app/src/main/res/drawable/launch_background.xml
  13. 二进制
      android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  14. 二进制
      android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  15. 二进制
      android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  16. 二进制
      android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  17. 二进制
      android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  18. 18 0
      android/app/src/main/res/values-night/styles.xml
  19. 18 0
      android/app/src/main/res/values/styles.xml
  20. 8 0
      android/app/src/profile/AndroidManifest.xml
  21. 31 0
      android/build.gradle
  22. 3 0
      android/gradle.properties
  23. 5 0
      android/gradle/wrapper/gradle-wrapper.properties
  24. 11 0
      android/settings.gradle
  25. 34 0
      ios/.gitignore
  26. 26 0
      ios/Flutter/AppFrameworkInfo.plist
  27. 1 0
      ios/Flutter/Debug.xcconfig
  28. 1 0
      ios/Flutter/Release.xcconfig
  29. 483 0
      ios/Runner.xcodeproj/project.pbxproj
  30. 7 0
      ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  31. 8 0
      ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  32. 8 0
      ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
  33. 87 0
      ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
  34. 7 0
      ios/Runner.xcworkspace/contents.xcworkspacedata
  35. 8 0
      ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  36. 8 0
      ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
  37. 13 0
      ios/Runner/AppDelegate.swift
  38. 122 0
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
  39. 二进制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
  40. 二进制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
  41. 二进制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
  42. 二进制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
  43. 二进制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
  44. 二进制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
  45. 二进制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
  46. 二进制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
  47. 二进制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
  48. 二进制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
  49. 二进制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
  50. 二进制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
  51. 二进制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
  52. 二进制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
  53. 二进制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
  54. 23 0
      ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
  55. 二进制
      ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
  56. 二进制
      ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
  57. 二进制
      ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
  58. 5 0
      ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
  59. 37 0
      ios/Runner/Base.lproj/LaunchScreen.storyboard
  60. 26 0
      ios/Runner/Base.lproj/Main.storyboard
  61. 51 0
      ios/Runner/Info.plist
  62. 1 0
      ios/Runner/Runner-Bridging-Header.h
  63. 1 0
      lib/application.dart
  64. 4 0
      lib/config/config.dart
  65. 72 0
      lib/dio_util/dio_interceptors.dart
  66. 80 0
      lib/dio_util/dio_util.dart
  67. 65 0
      lib/main.dart
  68. 193 0
      lib/pages/home/add_news.dart
  69. 238 0
      lib/pages/home/index.dart
  70. 109 0
      lib/pages/home/news_detail.dart
  71. 123 0
      lib/pages/home/search_bar.dart
  72. 88 0
      lib/pages/home/setting.dart
  73. 168 0
      lib/pages/login/login.dart
  74. 17 0
      lib/pages/login/not_found.dart
  75. 89 0
      lib/pages/login/register.dart
  76. 79 0
      lib/pages/photography/index.dart
  77. 172 0
      lib/pages/photography/photo_over.dart
  78. 39 0
      lib/pages/photography/take_photo.dart
  79. 23 0
      lib/utils/api.dart
  80. 28 0
      lib/utils/common_toast.dart
  81. 172 0
      lib/utils/permission_request.dart
  82. 67 0
      lib/utils/routes.dart
  83. 26 0
      lib/utils/storage.dart
  84. 47 0
      lib/widgets/common_form_item.dart
  85. 36 0
      lib/widgets/height_button.dart
  86. 25 0
      lib/widgets/home_button.dart
  87. 116 0
      lib/widgets/my_refresh_list.dart
  88. 1 0
      linux/.gitignore
  89. 138 0
      linux/CMakeLists.txt
  90. 88 0
      linux/flutter/CMakeLists.txt
  91. 15 0
      linux/flutter/generated_plugin_registrant.cc
  92. 15 0
      linux/flutter/generated_plugin_registrant.h
  93. 24 0
      linux/flutter/generated_plugins.cmake
  94. 6 0
      linux/main.cc
  95. 104 0
      linux/my_application.cc
  96. 18 0
      linux/my_application.h
  97. 7 0
      macos/.gitignore
  98. 1 0
      macos/Flutter/Flutter-Debug.xcconfig
  99. 1 0
      macos/Flutter/Flutter-Release.xcconfig
  100. 0 0
      macos/Flutter/GeneratedPluginRegistrant.swift

+ 44 - 0
.gitignore

@@ -0,0 +1,44 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+migrate_working_dir/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+**/ios/Flutter/.last_build_id
+.dart_tool/
+.flutter-plugins
+.flutter-plugins-dependencies
+.packages
+.pub-cache/
+.pub/
+/build/
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Android Studio will place build artifacts here
+/android/app/debug
+/android/app/profile
+/android/app/release

+ 45 - 0
.metadata

@@ -0,0 +1,45 @@
+# This file tracks properties of this Flutter project.
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
+#
+# This file should be version controlled.
+
+version:
+  revision: 62bd79521d8d007524e351747471ba66696fc2d4
+  channel: stable
+
+project_type: app
+
+# Tracks metadata for the flutter migrate command
+migration:
+  platforms:
+    - platform: root
+      create_revision: 62bd79521d8d007524e351747471ba66696fc2d4
+      base_revision: 62bd79521d8d007524e351747471ba66696fc2d4
+    - platform: android
+      create_revision: 62bd79521d8d007524e351747471ba66696fc2d4
+      base_revision: 62bd79521d8d007524e351747471ba66696fc2d4
+    - platform: ios
+      create_revision: 62bd79521d8d007524e351747471ba66696fc2d4
+      base_revision: 62bd79521d8d007524e351747471ba66696fc2d4
+    - platform: linux
+      create_revision: 62bd79521d8d007524e351747471ba66696fc2d4
+      base_revision: 62bd79521d8d007524e351747471ba66696fc2d4
+    - platform: macos
+      create_revision: 62bd79521d8d007524e351747471ba66696fc2d4
+      base_revision: 62bd79521d8d007524e351747471ba66696fc2d4
+    - platform: web
+      create_revision: 62bd79521d8d007524e351747471ba66696fc2d4
+      base_revision: 62bd79521d8d007524e351747471ba66696fc2d4
+    - platform: windows
+      create_revision: 62bd79521d8d007524e351747471ba66696fc2d4
+      base_revision: 62bd79521d8d007524e351747471ba66696fc2d4
+
+  # User provided section
+
+  # List of Local paths (relative to this file) that should be
+  # ignored by the migrate tool.
+  #
+  # Files that are not part of the templates will be ignored by default.
+  unmanaged_files:
+    - 'lib/main.dart'
+    - 'ios/Runner.xcodeproj/project.pbxproj'

+ 25 - 0
.vscode/launch.json

@@ -0,0 +1,25 @@
+{
+  // Use IntelliSense to learn about possible attributes.
+  // Hover to view descriptions of existing attributes.
+  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+  "version": "0.2.0",
+  "configurations": [
+    {
+      "name": "fun_selfie_app",
+      "request": "launch",
+      "type": "dart"
+    },
+    {
+      "name": "fun_selfie_app (profile mode)",
+      "request": "launch",
+      "type": "dart",
+      "flutterMode": "profile"
+    },
+    {
+      "name": "fun_selfie_app (release mode)",
+      "request": "launch",
+      "type": "dart",
+      "flutterMode": "release"
+    }
+  ]
+}

+ 16 - 0
README.md

@@ -0,0 +1,16 @@
+# fun_selfie_app
+
+A new Flutter project.
+
+## Getting Started
+
+This project is a starting point for a Flutter application.
+
+A few resources to get you started if this is your first Flutter project:
+
+- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
+- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
+
+For help getting started with Flutter development, view the
+[online documentation](https://docs.flutter.dev/), which offers tutorials,
+samples, guidance on mobile development, and a full API reference.

+ 29 - 0
analysis_options.yaml

@@ -0,0 +1,29 @@
+# This file configures the analyzer, which statically analyzes Dart code to
+# check for errors, warnings, and lints.
+#
+# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
+# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
+# invoked from the command line by running `flutter analyze`.
+
+# The following line activates a set of recommended lints for Flutter apps,
+# packages, and plugins designed to encourage good coding practices.
+include: package:flutter_lints/flutter.yaml
+
+linter:
+  # The lint rules applied to this project can be customized in the
+  # section below to disable rules from the `package:flutter_lints/flutter.yaml`
+  # included above or to enable additional rules. A list of all available lints
+  # and their documentation is published at
+  # https://dart-lang.github.io/linter/lints/index.html.
+  #
+  # Instead of disabling a lint rule for the entire project in the
+  # section below, it can also be suppressed for a single line of code
+  # or a specific dart file by using the `// ignore: name_of_lint` and
+  # `// ignore_for_file: name_of_lint` syntax on the line or in the file
+  # producing the lint.
+  rules:
+    # avoid_print: false  # Uncomment to disable the `avoid_print` rule
+    # prefer_single_quotes: true  # Uncomment to enable the `prefer_single_quotes` rule
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options

+ 13 - 0
android/.gitignore

@@ -0,0 +1,13 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/local.properties
+GeneratedPluginRegistrant.java
+
+# Remember to never publicly share your keystore.
+# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
+key.properties
+**/*.keystore
+**/*.jks

+ 71 - 0
android/app/build.gradle

@@ -0,0 +1,71 @@
+def localProperties = new Properties()
+def localPropertiesFile = rootProject.file('local.properties')
+if (localPropertiesFile.exists()) {
+    localPropertiesFile.withReader('UTF-8') { reader ->
+        localProperties.load(reader)
+    }
+}
+
+def flutterRoot = localProperties.getProperty('flutter.sdk')
+if (flutterRoot == null) {
+    throw GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
+}
+
+def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
+if (flutterVersionCode == null) {
+    flutterVersionCode = '1'
+}
+
+def flutterVersionName = localProperties.getProperty('flutter.versionName')
+if (flutterVersionName == null) {
+    flutterVersionName = '1.0'
+}
+
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
+
+android {
+    compileSdkVersion flutter.compileSdkVersion
+    ndkVersion flutter.ndkVersion
+
+    compileOptions {
+        sourceCompatibility JavaVersion.VERSION_1_8
+        targetCompatibility JavaVersion.VERSION_1_8
+    }
+
+    kotlinOptions {
+        jvmTarget = '1.8'
+    }
+
+    sourceSets {
+        main.java.srcDirs += 'src/main/kotlin'
+    }
+
+    defaultConfig {
+        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+        applicationId "com.example.fun_selfie_app"
+        // You can update the following values to match your application needs.
+        // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
+        minSdkVersion flutter.minSdkVersion
+        targetSdkVersion flutter.targetSdkVersion
+        versionCode flutterVersionCode.toInteger()
+        versionName flutterVersionName
+    }
+
+    buildTypes {
+        release {
+            // TODO: Add your own signing config for the release build.
+            // Signing with the debug keys for now, so `flutter run --release` works.
+            signingConfig signingConfigs.debug
+        }
+    }
+}
+
+flutter {
+    source '../..'
+}
+
+dependencies {
+    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+}

+ 8 - 0
android/app/src/debug/AndroidManifest.xml

@@ -0,0 +1,8 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.fun_selfie_app">
+    <!-- The INTERNET permission is required for development. Specifically,
+         the Flutter tool needs it to communicate with the running application
+         to allow setting breakpoints, to provide hot reload, etc.
+    -->
+    <uses-permission android:name="android.permission.INTERNET"/>
+</manifest>

+ 45 - 0
android/app/src/main/AndroidManifest.xml

@@ -0,0 +1,45 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+xmlns:tools="http://schemas.android.com/tools"
+    package="com.example.fun_selfie_app">
+    <!-- Permissions options for the `storage` group -->
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+    <!-- Permissions options for the `location` group -->
+    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
+    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
+    <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
+
+    <uses-permission android:name="android.permission.CAMERA"/>
+    <uses-permission android:name="android.permission.GALLERY"/>
+   <application
+        android:label="非常合拍"
+        android:name="${applicationName}"
+        android:icon="@mipmap/ic_launcher">
+        <activity
+            android:name=".MainActivity"
+            android:exported="true"
+            android:launchMode="singleTop"
+            android:theme="@style/LaunchTheme"
+            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
+            android:hardwareAccelerated="true"
+            android:windowSoftInputMode="adjustResize">
+            <!-- Specifies an Android theme to apply to this Activity as soon as
+                 the Android process has started. This theme is visible to the user
+                 while the Flutter UI initializes. After that, this theme continues
+                 to determine the Window background behind the Flutter UI. -->
+            <meta-data
+              android:name="io.flutter.embedding.android.NormalTheme"
+              android:resource="@style/NormalTheme"
+              />
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
+            </intent-filter>
+        </activity>
+        <!-- Don't delete the meta-data below.
+             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
+        <meta-data
+            android:name="flutterEmbedding"
+            android:value="2" />
+    </application>
+</manifest>

+ 6 - 0
android/app/src/main/kotlin/com/example/photoapp/MainActivity.kt

@@ -0,0 +1,6 @@
+package com.example.fun_selfie_app
+
+import io.flutter.embedding.android.FlutterActivity
+
+class MainActivity: FlutterActivity() {
+}

+ 12 - 0
android/app/src/main/res/drawable-v21/launch_background.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Modify this file to customize your launch splash screen -->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="?android:colorBackground" />
+
+    <!-- You can insert your own image assets here -->
+    <!-- <item>
+        <bitmap
+            android:gravity="center"
+            android:src="@mipmap/launch_image" />
+    </item> -->
+</layer-list>

+ 12 - 0
android/app/src/main/res/drawable/launch_background.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Modify this file to customize your launch splash screen -->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@android:color/white" />
+
+    <!-- You can insert your own image assets here -->
+    <!-- <item>
+        <bitmap
+            android:gravity="center"
+            android:src="@mipmap/launch_image" />
+    </item> -->
+</layer-list>

二进制
android/app/src/main/res/mipmap-hdpi/ic_launcher.png


二进制
android/app/src/main/res/mipmap-mdpi/ic_launcher.png


二进制
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png


二进制
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png


二进制
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png


+ 18 - 0
android/app/src/main/res/values-night/styles.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
+    <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
+        <!-- Show a splash screen on the activity. Automatically removed when
+             the Flutter engine draws its first frame -->
+        <item name="android:windowBackground">@drawable/launch_background</item>
+    </style>
+    <!-- Theme applied to the Android Window as soon as the process has started.
+         This theme determines the color of the Android Window while your
+         Flutter UI initializes, as well as behind your Flutter UI while its
+         running.
+
+         This Theme is only used starting with V2 of Flutter's Android embedding. -->
+    <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
+        <item name="android:windowBackground">?android:colorBackground</item>
+    </style>
+</resources>

+ 18 - 0
android/app/src/main/res/values/styles.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
+    <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
+        <!-- Show a splash screen on the activity. Automatically removed when
+             the Flutter engine draws its first frame -->
+        <item name="android:windowBackground">@drawable/launch_background</item>
+    </style>
+    <!-- Theme applied to the Android Window as soon as the process has started.
+         This theme determines the color of the Android Window while your
+         Flutter UI initializes, as well as behind your Flutter UI while its
+         running.
+
+         This Theme is only used starting with V2 of Flutter's Android embedding. -->
+    <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
+        <item name="android:windowBackground">?android:colorBackground</item>
+    </style>
+</resources>

+ 8 - 0
android/app/src/profile/AndroidManifest.xml

@@ -0,0 +1,8 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.fun_selfie_app">
+    <!-- The INTERNET permission is required for development. Specifically,
+         the Flutter tool needs it to communicate with the running application
+         to allow setting breakpoints, to provide hot reload, etc.
+    -->
+    <uses-permission android:name="android.permission.INTERNET"/>
+</manifest>

+ 31 - 0
android/build.gradle

@@ -0,0 +1,31 @@
+buildscript {
+    ext.kotlin_version = '1.7.10'
+    repositories {
+        google()
+        mavenCentral()
+    }
+
+    dependencies {
+        classpath 'com.android.tools.build:gradle:7.2.0'
+        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+    }
+}
+
+allprojects {
+    repositories {
+        google()
+        mavenCentral()
+    }
+}
+
+rootProject.buildDir = '../build'
+subprojects {
+    project.buildDir = "${rootProject.buildDir}/${project.name}"
+}
+subprojects {
+    project.evaluationDependsOn(':app')
+}
+
+task clean(type: Delete) {
+    delete rootProject.buildDir
+}

+ 3 - 0
android/gradle.properties

@@ -0,0 +1,3 @@
+org.gradle.jvmargs=-Xmx1536M
+android.useAndroidX=true
+android.enableJetifier=true

+ 5 - 0
android/gradle/wrapper/gradle-wrapper.properties

@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip

+ 11 - 0
android/settings.gradle

@@ -0,0 +1,11 @@
+include ':app'
+
+def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
+def properties = new Properties()
+
+assert localPropertiesFile.exists()
+localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
+
+def flutterSdkPath = properties.getProperty("flutter.sdk")
+assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
+apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"

+ 34 - 0
ios/.gitignore

@@ -0,0 +1,34 @@
+**/dgph
+*.mode1v3
+*.mode2v3
+*.moved-aside
+*.pbxuser
+*.perspectivev3
+**/*sync/
+.sconsign.dblite
+.tags*
+**/.vagrant/
+**/DerivedData/
+Icon?
+**/Pods/
+**/.symlinks/
+profile
+xcuserdata
+**/.generated/
+Flutter/App.framework
+Flutter/Flutter.framework
+Flutter/Flutter.podspec
+Flutter/Generated.xcconfig
+Flutter/ephemeral/
+Flutter/app.flx
+Flutter/app.zip
+Flutter/flutter_assets/
+Flutter/flutter_export_environment.sh
+ServiceDefinitions.json
+Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!default.mode1v3
+!default.mode2v3
+!default.pbxuser
+!default.perspectivev3

+ 26 - 0
ios/Flutter/AppFrameworkInfo.plist

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>CFBundleDevelopmentRegion</key>
+  <string>en</string>
+  <key>CFBundleExecutable</key>
+  <string>App</string>
+  <key>CFBundleIdentifier</key>
+  <string>io.flutter.flutter.app</string>
+  <key>CFBundleInfoDictionaryVersion</key>
+  <string>6.0</string>
+  <key>CFBundleName</key>
+  <string>App</string>
+  <key>CFBundlePackageType</key>
+  <string>FMWK</string>
+  <key>CFBundleShortVersionString</key>
+  <string>1.0</string>
+  <key>CFBundleSignature</key>
+  <string>????</string>
+  <key>CFBundleVersion</key>
+  <string>1.0</string>
+  <key>MinimumOSVersion</key>
+  <string>11.0</string>
+</dict>
+</plist>

+ 1 - 0
ios/Flutter/Debug.xcconfig

@@ -0,0 +1 @@
+#include "Generated.xcconfig"

+ 1 - 0
ios/Flutter/Release.xcconfig

@@ -0,0 +1 @@
+#include "Generated.xcconfig"

+ 483 - 0
ios/Runner.xcodeproj/project.pbxproj

@@ -0,0 +1,483 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 54;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+		3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+		74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
+		97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
+		97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
+		97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+		9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = "";
+			dstSubfolderSpec = 10;
+			files = (
+			);
+			name = "Embed Frameworks";
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+		1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
+		1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
+		3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
+		74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
+		74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
+		7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
+		9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
+		9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
+		97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
+		97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
+		97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
+		97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		97C146EB1CF9000F007C117D /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		9740EEB11CF90186004384FC /* Flutter */ = {
+			isa = PBXGroup;
+			children = (
+				3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+				9740EEB21CF90195004384FC /* Debug.xcconfig */,
+				7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+				9740EEB31CF90195004384FC /* Generated.xcconfig */,
+			);
+			name = Flutter;
+			sourceTree = "<group>";
+		};
+		97C146E51CF9000F007C117D = {
+			isa = PBXGroup;
+			children = (
+				9740EEB11CF90186004384FC /* Flutter */,
+				97C146F01CF9000F007C117D /* Runner */,
+				97C146EF1CF9000F007C117D /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		97C146EF1CF9000F007C117D /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				97C146EE1CF9000F007C117D /* Runner.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		97C146F01CF9000F007C117D /* Runner */ = {
+			isa = PBXGroup;
+			children = (
+				97C146FA1CF9000F007C117D /* Main.storyboard */,
+				97C146FD1CF9000F007C117D /* Assets.xcassets */,
+				97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+				97C147021CF9000F007C117D /* Info.plist */,
+				1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
+				1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+				74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
+				74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
+			);
+			path = Runner;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		97C146ED1CF9000F007C117D /* Runner */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+			buildPhases = (
+				9740EEB61CF901F6004384FC /* Run Script */,
+				97C146EA1CF9000F007C117D /* Sources */,
+				97C146EB1CF9000F007C117D /* Frameworks */,
+				97C146EC1CF9000F007C117D /* Resources */,
+				9705A1C41CF9048500538489 /* Embed Frameworks */,
+				3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = Runner;
+			productName = Runner;
+			productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		97C146E61CF9000F007C117D /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 1300;
+				ORGANIZATIONNAME = "";
+				TargetAttributes = {
+					97C146ED1CF9000F007C117D = {
+						CreatedOnToolsVersion = 7.3.1;
+						LastSwiftMigration = 1100;
+					};
+				};
+			};
+			buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+			compatibilityVersion = "Xcode 9.3";
+			developmentRegion = en;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				Base,
+			);
+			mainGroup = 97C146E51CF9000F007C117D;
+			productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				97C146ED1CF9000F007C117D /* Runner */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		97C146EC1CF9000F007C117D /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+				3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+				97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+				97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+			isa = PBXShellScriptBuildPhase;
+			alwaysOutOfDate = 1;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "Thin Binary";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
+		};
+		9740EEB61CF901F6004384FC /* Run Script */ = {
+			isa = PBXShellScriptBuildPhase;
+			alwaysOutOfDate = 1;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "Run Script";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		97C146EA1CF9000F007C117D /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
+				1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+		97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				97C146FB1CF9000F007C117D /* Base */,
+			);
+			name = Main.storyboard;
+			sourceTree = "<group>";
+		};
+		97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				97C147001CF9000F007C117D /* Base */,
+			);
+			name = LaunchScreen.storyboard;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		249021D3217E4FDB00AE95B9 /* Profile */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				SDKROOT = iphoneos;
+				SUPPORTED_PLATFORMS = iphoneos;
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Profile;
+		};
+		249021D4217E4FDB00AE95B9 /* Profile */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CLANG_ENABLE_MODULES = YES;
+				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+				ENABLE_BITCODE = NO;
+				INFOPLIST_FILE = Runner/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/Frameworks",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = com.example.fun_selfie_app;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+				SWIFT_VERSION = 5.0;
+				VERSIONING_SYSTEM = "apple-generic";
+			};
+			name = Profile;
+		};
+		97C147031CF9000F007C117D /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				ENABLE_TESTABILITY = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+				MTL_ENABLE_DEBUG_INFO = YES;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = iphoneos;
+				TARGETED_DEVICE_FAMILY = "1,2";
+			};
+			name = Debug;
+		};
+		97C147041CF9000F007C117D /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				SDKROOT = iphoneos;
+				SUPPORTED_PLATFORMS = iphoneos;
+				SWIFT_COMPILATION_MODE = wholemodule;
+				SWIFT_OPTIMIZATION_LEVEL = "-O";
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		97C147061CF9000F007C117D /* Debug */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CLANG_ENABLE_MODULES = YES;
+				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+				ENABLE_BITCODE = NO;
+				INFOPLIST_FILE = Runner/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/Frameworks",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = com.example.fun_selfie_app;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+				SWIFT_VERSION = 5.0;
+				VERSIONING_SYSTEM = "apple-generic";
+			};
+			name = Debug;
+		};
+		97C147071CF9000F007C117D /* Release */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CLANG_ENABLE_MODULES = YES;
+				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+				ENABLE_BITCODE = NO;
+				INFOPLIST_FILE = Runner/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/Frameworks",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = com.example.fun_selfie_app;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+				SWIFT_VERSION = 5.0;
+				VERSIONING_SYSTEM = "apple-generic";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				97C147031CF9000F007C117D /* Debug */,
+				97C147041CF9000F007C117D /* Release */,
+				249021D3217E4FDB00AE95B9 /* Profile */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				97C147061CF9000F007C117D /* Debug */,
+				97C147071CF9000F007C117D /* Release */,
+				249021D4217E4FDB00AE95B9 /* Profile */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}

+ 7 - 0
ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:">
+   </FileRef>
+</Workspace>

+ 8 - 0
ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IDEDidComputeMac32BitWarning</key>
+	<true/>
+</dict>
+</plist>

+ 8 - 0
ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>PreviewsEnabled</key>
+	<false/>
+</dict>
+</plist>

+ 87 - 0
ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "1300"
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+               BuildableName = "Runner.app"
+               BlueprintName = "Runner"
+               ReferencedContainer = "container:Runner.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES">
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+            BuildableName = "Runner.app"
+            BlueprintName = "Runner"
+            ReferencedContainer = "container:Runner.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+      <Testables>
+      </Testables>
+   </TestAction>
+   <LaunchAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
+      allowLocationSimulation = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+            BuildableName = "Runner.app"
+            BlueprintName = "Runner"
+            ReferencedContainer = "container:Runner.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Profile"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+            BuildableName = "Runner.app"
+            BlueprintName = "Runner"
+            ReferencedContainer = "container:Runner.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 7 - 0
ios/Runner.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "group:Runner.xcodeproj">
+   </FileRef>
+</Workspace>

+ 8 - 0
ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IDEDidComputeMac32BitWarning</key>
+	<true/>
+</dict>
+</plist>

+ 8 - 0
ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>PreviewsEnabled</key>
+	<false/>
+</dict>
+</plist>

+ 13 - 0
ios/Runner/AppDelegate.swift

@@ -0,0 +1,13 @@
+import UIKit
+import Flutter
+
+@UIApplicationMain
+@objc class AppDelegate: FlutterAppDelegate {
+  override func application(
+    _ application: UIApplication,
+    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
+  ) -> Bool {
+    GeneratedPluginRegistrant.register(with: self)
+    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
+  }
+}

+ 122 - 0
ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json

@@ -0,0 +1,122 @@
+{
+  "images" : [
+    {
+      "size" : "20x20",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-20x20@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-20x20@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-29x29@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-29x29@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-29x29@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-40x40@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-40x40@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "60x60",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-60x60@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "60x60",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-60x60@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-20x20@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-20x20@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-29x29@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-29x29@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-40x40@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-40x40@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "76x76",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-76x76@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "76x76",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-76x76@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "83.5x83.5",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-83.5x83.5@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "1024x1024",
+      "idiom" : "ios-marketing",
+      "filename" : "Icon-App-1024x1024@1x.png",
+      "scale" : "1x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

二进制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png


二进制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png


二进制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png


二进制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png


二进制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png


二进制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png


二进制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png


二进制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png


二进制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png


二进制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png


二进制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png


二进制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png


二进制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png


二进制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png


二进制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png


+ 23 - 0
ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "LaunchImage.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "LaunchImage@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "LaunchImage@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

二进制
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png


二进制
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png


二进制
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png


+ 5 - 0
ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md

@@ -0,0 +1,5 @@
+# Launch Screen Assets
+
+You can customize the launch screen with your own desired assets by replacing the image files in this directory.
+
+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.

+ 37 - 0
ios/Runner/Base.lproj/LaunchScreen.storyboard

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
+    </dependencies>
+    <scenes>
+        <!--View Controller-->
+        <scene sceneID="EHf-IW-A2E">
+            <objects>
+                <viewController id="01J-lp-oVM" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
+                        <viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
+                            </imageView>
+                        </subviews>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <constraints>
+                            <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
+                            <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
+                        </constraints>
+                    </view>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="53" y="375"/>
+        </scene>
+    </scenes>
+    <resources>
+        <image name="LaunchImage" width="168" height="185"/>
+    </resources>
+</document>

+ 26 - 0
ios/Runner/Base.lproj/Main.storyboard

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
+    </dependencies>
+    <scenes>
+        <!--Flutter View Controller-->
+        <scene sceneID="tne-QT-ifu">
+            <objects>
+                <viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
+                        <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
+                        <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+                    </view>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
+            </objects>
+        </scene>
+    </scenes>
+</document>

+ 51 - 0
ios/Runner/Info.plist

@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>$(DEVELOPMENT_LANGUAGE)</string>
+	<key>CFBundleDisplayName</key>
+	<string>fun_selfie_app</string>
+	<key>CFBundleExecutable</key>
+	<string>$(EXECUTABLE_NAME)</string>
+	<key>CFBundleIdentifier</key>
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>fun_selfie_app</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>$(FLUTTER_BUILD_NAME)</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>$(FLUTTER_BUILD_NUMBER)</string>
+	<key>LSRequiresIPhoneOS</key>
+	<true/>
+	<key>UILaunchStoryboardName</key>
+	<string>LaunchScreen</string>
+	<key>UIMainStoryboardFile</key>
+	<string>Main</string>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>UISupportedInterfaceOrientations~ipad</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>UIViewControllerBasedStatusBarAppearance</key>
+	<false/>
+	<key>CADisableMinimumFrameDurationOnPhone</key>
+	<true/>
+	<key>UIApplicationSupportsIndirectInputEvents</key>
+	<true/>
+</dict>
+</plist>

+ 1 - 0
ios/Runner/Runner-Bridging-Header.h

@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"

+ 1 - 0
lib/application.dart

@@ -0,0 +1 @@
+

+ 4 - 0
lib/config/config.dart

@@ -0,0 +1,4 @@
+import 'dart:core';
+
+const kBaseHost = "http://118.123.247.197:8080/jeecg-boot";
+const kVersion = "v2";

+ 72 - 0
lib/dio_util/dio_interceptors.dart

@@ -0,0 +1,72 @@
+import 'dart:convert';
+import 'package:dio/dio.dart';
+import 'package:fun_selfie_app/utils/storage.dart';
+import 'package:crypto/crypto.dart';
+import 'package:fun_selfie_app/utils/common_toast.dart';
+
+class DioInterceptors extends Interceptor {
+  @override
+  void onRequest(
+      RequestOptions options, RequestInterceptorHandler handler) async {
+    // 对非open的接口的请求参数全部增加userId
+    // if (!options.path.contains("open")) {
+    //   options.queryParameters["userId"] = "xxx";
+    // }
+
+    // 头部添加token
+    // options.headers["token"] = "xxx";
+    String userMsg = await StorageUtil.getString('userMsg');
+    if (userMsg.isEmpty) return;
+    Map userMsgObj = jsonDecode(userMsg);
+    String? appId = userMsgObj['configName'];
+    String? secret = userMsgObj['configPass'];
+    // String? website = 'http://118.123.247.197:8080/jeecg-boot/';
+    var ts = DateTime.now().millisecondsSinceEpoch.toString();
+    var token = md5
+        .convert(utf8.encode(appId.toString() + secret.toString() + ts))
+        .toString();
+    options.headers['X-APPID'] = appId;
+    options.headers['X-SECRET-TOKEN'] = token;
+    options.headers['ts'] = ts;
+    // options.baseUrl = website.toString();
+
+    // 更多业务需求
+
+    handler.next(options);
+
+    // super.onRequest(options, handler);
+  }
+
+  @override
+  void onResponse(Response response, ResponseInterceptorHandler handler) async {
+    // 请求成功是对数据做基本处理
+    if (response.statusCode == 200) {
+      response.data = response.data['result'];
+    } else {
+      CommonToast.errToast(
+          '出错了,'.toString() + response.statusMessage.toString());
+    }
+
+    // 对某些单独的url返回数据做特殊处理
+    if (response.requestOptions.baseUrl.contains("???????")) {
+      //....
+    }
+
+    // 重点
+    handler.next(response);
+  }
+
+  @override
+  void onError(DioException err, ErrorInterceptorHandler handler) {
+    String? data = err.response?.data;
+    if (data != null) {
+      Map dataObj = jsonDecode(data);
+      CommonToast.errToast('出错了,'.toString() + dataObj['message']);
+    } else {
+      Object? error = err.error;
+      CommonToast.errToast('网络出错了,${error.toString()}');
+    }
+
+    super.onError(err, handler);
+  }
+}

+ 80 - 0
lib/dio_util/dio_util.dart

@@ -0,0 +1,80 @@
+import 'package:dio/dio.dart';
+import 'package:flutter/material.dart';
+import 'package:fun_selfie_app/dio_util/dio_interceptors.dart';
+// import 'package:fun_selfie_app/dio_util/dio_method.dart';
+
+class DioUtil {
+  static DioUtil? _instance;
+  static Dio _dio = Dio();
+  Dio get dio => _dio;
+
+  DioUtil._internal() {
+    _instance = this;
+    _instance!._init();
+  }
+
+  factory DioUtil() => _instance ?? DioUtil._internal();
+
+  static DioUtil? getInstance() {
+    _instance ?? DioUtil._internal();
+    return _instance;
+  }
+
+  /// 取消请求token
+  final CancelToken _cancelToken = CancelToken();
+
+  ///
+
+  _init() {
+    /// 初始化基本选项
+    BaseOptions options = BaseOptions(
+        baseUrl:
+            "http://118.123.247.197:8080/jeecg-boot/", //"http://localhost:8080",
+        connectTimeout: const Duration(seconds: 6), // 连接超时时间
+        receiveTimeout: const Duration(seconds: 6)); // 响应超时时间
+
+    /// 初始化dio
+    _dio = Dio(options);
+
+    /// 添加拦截器
+    _dio.interceptors.add(DioInterceptors());
+  }
+
+  /// 开启日志打印
+  void openLog() {
+    _dio.interceptors.add(LogInterceptor(responseBody: true));
+  }
+
+  /// 请求类
+  Future<T> request<T>(
+    String path, {
+    String method = 'get',
+    Map<String, dynamic>? params,
+    data,
+    CancelToken? cancelToken,
+    Options? options,
+    ProgressCallback? onSendProgress,
+    ProgressCallback? onReceiveProgress,
+  }) async {
+    options ??= Options(method: method);
+    try {
+      Response response;
+      response = await _dio.request(path,
+          data: data,
+          queryParameters: params,
+          cancelToken: cancelToken ?? _cancelToken,
+          options: options,
+          onSendProgress: onSendProgress,
+          onReceiveProgress: onReceiveProgress);
+      return response.data;
+    } on DioException catch (e) {
+      debugPrint(e.toString());
+      rethrow;
+    }
+  }
+
+  /// 取消网络请求
+  void cancelRequests({CancelToken? token}) {
+    token ?? _cancelToken.cancel("cancelled");
+  }
+}

+ 65 - 0
lib/main.dart

@@ -0,0 +1,65 @@
+import 'dart:io';
+
+import 'package:flutter/material.dart';
+import 'package:fun_selfie_app/utils/routes.dart';
+import 'package:fun_selfie_app/utils/storage.dart';
+import 'package:flutter_localizations/flutter_localizations.dart';
+import 'package:flutter/services.dart';
+
+void main() async {
+  WidgetsFlutterBinding.ensureInitialized();
+  String initPage = '';
+  Future<dynamic> future = Future(() async {
+    return await StorageUtil.getString('userMsg');
+  });
+  await future.then((value) {
+    if (value == '') {
+      initPage = '/login';
+    } else {
+      initPage = '/';
+    }
+  });
+  runApp(MyApp(initPage: initPage));
+  if (Platform.isAndroid) {
+    //设置Android头部的导航栏透明
+    SystemUiOverlayStyle systemUiOverlayStyle =
+        const SystemUiOverlayStyle(statusBarColor: Colors.transparent);
+    SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
+  }
+}
+
+class MyApp extends StatelessWidget {
+  MyApp({super.key, required this.initPage}) {
+    RouterFluro.initRoues();
+  }
+  final String initPage;
+
+  @override
+  Widget build(BuildContext context) {
+    return MaterialApp(
+        debugShowCheckedModeBanner: false,
+        title: '趣味自拍',
+        initialRoute: initPage,
+        onGenerateRoute: RouterFluro.fluroRouter.generator,
+
+        //添加国际化
+        localizationsDelegates: const [
+          GlobalMaterialLocalizations.delegate,
+          GlobalWidgetsLocalizations.delegate,
+        ],
+        supportedLocales: const [
+          Locale('zh', 'CH'),
+          Locale('en', 'US'),
+        ],
+        locale: const Locale('zh'),
+        theme: ThemeData(
+            primarySwatch: Colors.blue,
+            textTheme: const TextTheme(
+                titleMedium: TextStyle(fontSize: 20),
+                titleSmall: TextStyle(fontSize: 14)),
+            iconTheme: const IconThemeData(size: 40),
+            appBarTheme: const AppBarTheme(
+                toolbarTextStyle: TextStyle(fontSize: 18),
+                titleTextStyle: TextStyle(fontSize: 26))));
+  }
+}

+ 193 - 0
lib/pages/home/add_news.dart

@@ -0,0 +1,193 @@
+import 'dart:io';
+import 'package:flutter/material.dart';
+import 'package:fun_selfie_app/widgets/common_form_item.dart';
+import 'package:image_picker/image_picker.dart';
+import 'package:dio/dio.dart';
+import 'package:fun_selfie_app/utils/common_toast.dart';
+import 'package:date_format/date_format.dart';
+import 'package:fun_selfie_app/utils/permission_request.dart';
+
+class AddNewsPage extends StatefulWidget {
+  const AddNewsPage({Key? key}) : super(key: key);
+
+  @override
+  State<StatefulWidget> createState() => _AddNewsPageState();
+}
+
+class _AddNewsPageState extends State<AddNewsPage> {
+  bool _switchVal = false;
+  File? imagePath;
+  GlobalKey<FormState> formKey = GlobalKey<FormState>(); //表单验证
+  final TextEditingController newsName = TextEditingController();
+  final TextEditingController newsPlace = TextEditingController();
+  final TextEditingController newsDate = TextEditingController();
+  final TextEditingController newsZs = TextEditingController();
+  final TextEditingController newsDs = TextEditingController();
+  final TextEditingController newsDsDate = TextEditingController();
+  final ImagePicker _imagePicker = ImagePicker();
+
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+        appBar: AppBar(
+          title: const Text('创建活动'),
+          centerTitle: true,
+          // titleSpacing: 40,
+          actions: [
+            Padding(
+              padding: const EdgeInsets.only(right: 40),
+              child: TextButton(
+                  child: const Text(
+                    '保存',
+                    style: TextStyle(color: Colors.white, fontSize: 20),
+                  ),
+                  onPressed: () {
+                    onSubmit();
+                  }),
+            ),
+          ],
+        ),
+        body: Form(
+            key: formKey,
+            autovalidateMode: AutovalidateMode.onUserInteraction,
+            child: SingleChildScrollView(
+                child: Column(children: <Widget>[
+              CommonFormItem(
+                label: '活动的名称',
+                hitText: '请输入',
+                controller: newsName,
+                validator: (v) => (v == '') ? "请输入" : null,
+              ),
+              CommonFormItem(
+                label: '活动的地点',
+                hitText: '请输入',
+                controller: newsPlace,
+                validator: (v) => (v == '') ? "请输入" : null,
+              ),
+              CommonFormItem(
+                readOnly: true,
+                label: '开始日期',
+                hitText: '请输入',
+                controller: newsDate,
+                validator: (v) => (v == '') ? "请输入" : null,
+                onTap: () async {
+                  final curentDate = DateTime.now();
+                  showDatePicker(
+                          context: context,
+                          initialDate: curentDate,
+                          firstDate: curentDate,
+                          lastDate: DateTime(2100),
+                          locale: const Locale('zh'))
+                      .then((value) {
+                    if (value == null) return;
+                    var dateStr = formatDate(
+                        value.toLocal(), [yyyy, '年', mm, '月', dd, '日']);
+                    newsDate.text = dateStr;
+                  });
+                },
+              ),
+              CommonFormItem(
+                label: '连拍张数',
+                hitText: '请输入',
+                controller: newsZs,
+                validator: (v) => (v == '') ? "请输入" : null,
+              ),
+              CommonFormItem(
+                label: '自拍倒数',
+                hitText: '请输入',
+                suffixText: '秒',
+                controller: newsDs,
+                validator: (v) => (v == '') ? "请输入" : null,
+              ),
+              CommonFormItem(
+                label: '首张补充倒数时间',
+                hitText: '请输入',
+                suffixText: '秒',
+                controller: newsDsDate,
+                validator: (v) => (v == '') ? "请输入" : null,
+              ),
+              Padding(
+                padding: const EdgeInsets.only(left: 20, right: 20),
+                child: Row(
+                  children: [
+                    const Text('平铺相纸', style: TextStyle(fontSize: 18)),
+                    const Expanded(child: SizedBox()),
+                    Transform.scale(
+                        scale: 1.7,
+                        child: Switch(
+                            value: _switchVal,
+                            inactiveTrackColor: Colors.grey,
+                            inactiveThumbColor: Colors.white,
+                            activeColor: const Color.fromARGB(100, 98, 0, 238),
+                            activeTrackColor:
+                                const Color.fromARGB(100, 98, 0, 238),
+                            onChanged: (value) {
+                              setState(() {
+                                _switchVal = !_switchVal;
+                              });
+                            }))
+                  ],
+                ),
+              ),
+              Center(
+                child: imagePath == null
+                    ? const Text('')
+                    : InkWell(
+                        child: Image.file(imagePath!),
+                        onTap: () {
+                          selectImage(context);
+                        }),
+              ),
+              _switchVal && imagePath == null
+                  ? FloatingActionButton.extended(
+                      label: const Text('选择边框'),
+                      onPressed: () {
+                        selectImage(context);
+                      },
+                    )
+                  : const Text('')
+            ]))));
+  }
+
+  Future selectImage(BuildContext context) async {
+    bool result = await permissionCheckAndRequest(context, "通知");
+    if (result) debugPrint("已拥有该权限");
+    XFile? image = await _imagePicker.pickImage(source: ImageSource.gallery);
+    if (image == null) return;
+    final File filePath = File(image.path);
+    // upLoadImage(filePath);
+    setState(() {
+      imagePath = filePath;
+    });
+  }
+
+  upLoadImage(File image) async {
+    String path = image.path;
+    var name = path.substring(path.lastIndexOf("/") + 1, path.length);
+    var suffix = name.substring(name.lastIndexOf(".") + 1, name.length);
+    FormData formData = FormData.fromMap({
+      "userId": "10000024",
+      "file": await MultipartFile.fromFile(
+        path,
+        filename: name,
+        //contentType: ContentType.parse("image/$suffix")
+      )
+    });
+
+    Dio dio = Dio();
+    var respone = await dio.post<String>("/upload", data: formData);
+    if (respone.statusCode == 200) {
+      CommonToast.okToast('图片上传成功');
+    }
+  }
+
+  onSubmit() {
+    final form = formKey.currentState;
+    if (form!.validate()) {
+      if (_switchVal && imagePath == null) {
+        CommonToast.okToast('请选择活动边框');
+        return;
+      }
+    }
+  }
+}

+ 238 - 0
lib/pages/home/index.dart

@@ -0,0 +1,238 @@
+import 'package:flutter/material.dart';
+import 'package:fun_selfie_app/pages/home/setting.dart';
+import 'package:fun_selfie_app/pages/home/search_bar.dart';
+import 'package:fun_selfie_app/utils/api.dart';
+import 'package:fun_selfie_app/widgets/my_refresh_list.dart';
+
+class HomePage extends StatefulWidget {
+  const HomePage({Key? key}) : super(key: key);
+
+  @override
+  State<StatefulWidget> createState() => _HomePageState();
+}
+
+class _HomePageState extends State<HomePage> {
+  bool isUp = false;
+  int currentPage = 1;
+  int totalPage = 0;
+  final ScrollController _controller = ScrollController();
+  // List listData = [];
+
+  @override
+  void initState() {
+    super.initState();
+    // 初始化的时候开启倒计时
+    getList();
+    // _controller.addListener(() {
+    //   if (_controller.position.pixels >
+    //       _controller.position.maxScrollExtent - 40) {
+    //     onRefresh();
+    //   }
+    // });
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      appBar: AppBar(title: const Text('趣味自拍'), actions: <Widget>[
+        TextButton.icon(
+          icon: Icon(
+            isUp ? Icons.vertical_align_top : Icons.vertical_align_bottom,
+            color: Colors.white,
+            size: 32,
+          ),
+          label: const Text(
+            '排序 活动时间',
+            style: TextStyle(color: Colors.white, fontSize: 20),
+          ),
+          onPressed: () {
+            setState(() {
+              isUp = !isUp;
+            });
+          },
+        ),
+        Padding(
+            padding: const EdgeInsets.only(left: 30, right: 30),
+            child: TextButton(
+                child: const Text(
+                  '创建',
+                  style: TextStyle(color: Colors.white, fontSize: 20),
+                ),
+                onPressed: () {
+                  Navigator.pushNamed(context, "/addNews");
+                })),
+        Padding(
+            padding: const EdgeInsets.only(right: 30),
+            child: IconButton(
+              icon: const Icon(Icons.search),
+              onPressed: () {
+                showSearch(context: context, delegate: SeachBarDelegate());
+              },
+            )),
+      ]),
+      body: Scrollbar(
+        // thumbVisibility: true,
+        controller: _controller,
+        child: DeerListView(
+          controller: _controller,
+          onRefresh: onRefresh,
+          hasMore: currentPage < totalPage,
+          loadMore: onRefresh,
+          itemCount: listData.length, //条目个数:获取数据的个数
+          itemBuilder: (context, index) {
+            return GestureDetector(
+              onTap: () {
+                Navigator.pushNamed(
+                    context, "/newsDetail/${listData[index]["id"]}");
+              },
+              child: Column(
+                  crossAxisAlignment: CrossAxisAlignment.start,
+                  children: [
+                    Container(
+                        padding:
+                            const EdgeInsets.only(left: 12, right: 12, top: 10),
+                        child: Text(listData[index]["createTime"],
+                            style: const TextStyle(
+                              fontSize: 16,
+                              overflow: TextOverflow.ellipsis,
+                            ))),
+                    ListTile(
+                      title: Text(listData[index]["title"]),
+                      subtitle: Column(
+                        crossAxisAlignment: CrossAxisAlignment.start,
+                        children: [
+                          const SizedBox(height: 12),
+                          Text(listData[index]["subtitle"],
+                              style: const TextStyle(
+                                  fontSize: 12, color: Colors.grey)),
+                        ],
+                      ), //小标题
+                      // trailing: Image.network(listData[index]["image"],
+                      //     fit: BoxFit.fill, width: 110, height: 90),
+                      // visualDensity:
+                      //     const VisualDensity(vertical: 4), //增加item高度,优化布局,便于图片展示
+                      minVerticalPadding: 8,
+                    )
+                  ]),
+            );
+          },
+        ),
+      ),
+      drawer: const Drawer(
+        child: DrawerModalPage(),
+      ),
+    );
+  }
+
+  List listData = [
+    {
+      'id': '0001',
+      "title": "斗门希尔顿「林俭华&魏映雪」婚礼直播",
+      "subtitle": "珠海",
+      "image":
+          "https://img-blog.csdnimg.cn/c6dfd375abf1433fa3a42951cc186a2b.jpeg",
+      'createTime': '2023年6月02日',
+    },
+    {
+      'id': '0002',
+      "title": "嘉德诺家庭日",
+      "subtitle": "上海",
+      "image":
+          "https://img-blog.csdnimg.cn/678c0686dc694b65ad6b20693dbc35f1.jpeg",
+      'createTime': '2023年5月16日',
+    },
+    {
+      'id': '0003',
+      "title": "祥琪酒店「梁培安&丘凤」婚礼直播",
+      "subtitle": "上海",
+      "image":
+          "https://img-blog.csdnimg.cn/63efe7acbac74e7ebce85e3801f948e3.jpeg",
+      'createTime': '2023年5月02日',
+    },
+    {
+      'id': '0004',
+      "title": "黄府寿宴--广州华南理工大学西湖苑宾馆",
+      "subtitle": "广州",
+      "image":
+          "https://img-blog.csdnimg.cn/c6dfd375abf1433fa3a42951cc186a2b.jpeg",
+      'createTime': '2023年4月30日',
+    },
+    {
+      'id': '0005',
+      "title": "西卡德高广州总部大厦乔迁庆典",
+      "subtitle": "广州",
+      "image":
+          "https://img-blog.csdnimg.cn/678c0686dc694b65ad6b20693dbc35f1.jpeg",
+      'createTime': '2023年4月15日',
+    },
+    {
+      'id': '0006',
+      "title": "郭鹏&欧阳思昐 新婚之喜",
+      "subtitle": "广州",
+      "image":
+          "https://img-blog.csdnimg.cn/63efe7acbac74e7ebce85e3801f948e3.jpeg",
+      'createTime': '2023年4月02日',
+    },
+    {
+      'id': '0007',
+      "title": "深圳宝安格兰云天",
+      "subtitle": "广州",
+      "image":
+          "https://img-blog.csdnimg.cn/c6dfd375abf1433fa3a42951cc186a2b.jpeg",
+      'createTime': '20201232',
+    },
+    {
+      'id': '0008',
+      "title": "祥琪酒店「梁培安&丘凤」婚礼直播",
+      "subtitle": "上海",
+      "image":
+          "https://img-blog.csdnimg.cn/c6dfd375abf1433fa3a42951cc186a2b.jpeg",
+      'createTime': '2023年5月24日',
+    },
+    {
+      'id': '0009',
+      "title": "西卡德高广州总部大厦乔迁庆典",
+      "subtitle": "上海",
+      "image":
+          "https://img-blog.csdnimg.cn/c6dfd375abf1433fa3a42951cc186a2b.jpeg",
+      'createTime': '2023年5月12日',
+    },
+  ];
+  Future<dynamic> getList() async {
+    try {
+      // var params = {
+      //   "pageNo": currentPage,
+      //   "pageSize": 20,
+      //   "status": 'DONE', //READY
+      //   "saleOrderNo": ''
+      // };
+      // var res = await UtilHelper.updateList(params);
+      var params = {
+        "pageNo": currentPage,
+        "pageSize": 30,
+        "department": 'PACKING',
+        "worklineId": 'workline-1-packing',
+        "end": false
+      };
+      var res = await UtilHelper.updatePackingList(params);
+      setState(() {
+        // if (currentPage > 1) {
+        //   listData.addAll(res['records']);
+        // } else {
+        //   listData = res['records'];
+        // }
+        // totalPage = res['pages'];
+      });
+    } catch (err) {
+      debugPrint(err.toString());
+    }
+  }
+
+  /// 处理刷新操作
+  Future onRefresh() async {
+    await Future.delayed(const Duration(seconds: 1), () {
+      ++currentPage;
+      getList();
+    });
+  }
+}

文件差异内容过多而无法显示
+ 109 - 0
lib/pages/home/news_detail.dart


+ 123 - 0
lib/pages/home/search_bar.dart

@@ -0,0 +1,123 @@
+import 'package:flutter/material.dart';
+import 'package:fun_selfie_app/utils/api.dart';
+
+class SeachBarDelegate extends SearchDelegate<String> {
+  String searchHint = '请输入搜索内容...';
+  var suggestList = ['S2023062812', 'S202306243', 'S202307012', 'S202307051'];
+  List searchList = [];
+
+  @override
+  String get searchFieldLabel => searchHint;
+  //重写搜索框右上角方法
+  @override
+  List<Widget> buildActions(BuildContext context) {
+    return [
+      IconButton(
+          icon: const Icon(Icons.clear),
+          onPressed: () {
+            if (query.isEmpty) return;
+            query = "";
+            showSuggestions(context);
+          })
+    ];
+  }
+
+  //重写左上角方法
+  @override
+  Widget buildLeading(BuildContext context) {
+    return IconButton(
+        icon: AnimatedIcon(
+            icon: AnimatedIcons.menu_arrow, progress: transitionAnimation),
+        onPressed: () {
+          close(context, '');
+        });
+  }
+
+  //重写键盘点击确认后方法
+  @override
+  Widget buildResults(BuildContext context) {
+    return FutureBuilder(
+        future: loadList(),
+        builder: (context, AsyncSnapshot snapshot) {
+          return ListView.builder(
+              physics: const AlwaysScrollableScrollPhysics(),
+              itemCount: searchList.isEmpty ? 1 : searchList.length,
+              itemBuilder: (BuildContext context, int index) {
+                if (searchList.isEmpty) return const Text('');
+                Map obj = searchList[index];
+                return ListTile(
+                    title: Text(obj['saleOrderNo']),
+                    subtitle: Text(obj['id']),
+                    onTap: () {
+                      Navigator.pushNamed(
+                          context, "/newsDetail/".toString() + obj['id']);
+                    });
+              });
+        });
+  }
+
+  //重写输入过程方法,在输入过程不断调用
+  @override
+  Widget buildSuggestions(BuildContext context) {
+    return Container(
+      margin: const EdgeInsets.only(left: 16, right: 16),
+      child: ListView(
+        primary: false,
+        shrinkWrap: true,
+        children: <Widget>[
+          const SizedBox(height: 10),
+          const Text("推荐活动:", style: TextStyle(fontSize: 20)),
+          const SizedBox(height: 10),
+          Wrap(
+            spacing: 8,
+            runSpacing: 8,
+            children: suggestList.map((childNode) {
+              return InkWell(
+                child: ClipRRect(
+                  borderRadius: BorderRadius.circular(3),
+                  child: Container(
+                    padding: const EdgeInsets.all(3),
+                    color: Colors.grey,
+                    child: Text(
+                      childNode,
+                      style: const TextStyle(
+                          fontSize: 16,
+                          color: Colors.white,
+                          shadows: [
+                            BoxShadow(
+                                color: Colors.grey, offset: Offset(0.2, 0.2))
+                          ]),
+                    ),
+                  ),
+                ),
+                onTap: () {
+                  loadList();
+                  Future.delayed(const Duration(seconds: 1), () async {
+                    searchHint = '';
+                    query = childNode;
+                    showResults(context);
+                  });
+                },
+              );
+            }).toList(),
+          )
+        ],
+      ),
+    );
+  }
+
+  loadList() async {
+    try {
+      var params = {
+        "pageNo": 1,
+        "pageSize": 20,
+        "status": 'READY',
+        "saleOrderNo": query
+      };
+      var res = await UtilHelper.updateList(params);
+      searchList = res['records'];
+    } catch (err) {
+      debugPrint(err.toString());
+    }
+  }
+}

+ 88 - 0
lib/pages/home/setting.dart

@@ -0,0 +1,88 @@
+import 'dart:convert';
+import 'package:flutter/material.dart';
+import 'package:fun_selfie_app/utils/storage.dart';
+import 'package:fun_selfie_app/utils/common_toast.dart';
+
+class DrawerModalPage extends StatefulWidget {
+  const DrawerModalPage({Key? key}) : super(key: key);
+
+  @override
+  State<StatefulWidget> createState() => _DrawerModalPageState();
+}
+
+class _DrawerModalPageState extends State<DrawerModalPage> {
+  late Map userMsgObj = {'configName': '', 'configPass': ''};
+
+  @override
+  void initState() {
+    super.initState();
+    // 初始化的时候开启倒计时
+    getUser(context);
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    final screenSize = MediaQuery.of(context).size;
+    return Drawer(
+        // elevation: 16.0,
+        child: Stack(
+      children: <Widget>[
+        Container(
+            height: screenSize.height / 2,
+            color: const Color(0xff009EBA),
+            padding: const EdgeInsetsDirectional.only(top: 80),
+            alignment: Alignment.center,
+            child: Column(
+              children: <Widget>[
+                const ClipOval(
+                  child: Image(
+                    image: AssetImage('static/images/login_bg.png'),
+                    fit: BoxFit.fill,
+                    width: 200,
+                    height: 200,
+                  ),
+                ),
+                const SizedBox(height: 30),
+                Text(
+                  '${userMsgObj['configName']}',
+                  style: const TextStyle(fontSize: 30, color: Colors.white),
+                ),
+                Text(
+                  '${userMsgObj['configPass']}',
+                  style: const TextStyle(fontSize: 16, color: Colors.white),
+                ),
+              ],
+            )),
+        Positioned(
+            bottom: 20,
+            right: 16,
+            left: 16,
+            child: SizedBox(
+                height: 50,
+                child: ElevatedButton(
+                  child: const Text(
+                    "退出",
+                    style: TextStyle(fontSize: 18),
+                  ),
+                  onPressed: () async {
+                    Navigator.pop(context);
+                    Navigator.pushNamed(context, "/login");
+                    CommonToast.okToast('已经退出登录');
+                    await StorageUtil.remove('userMsg');
+                  },
+                )))
+      ],
+    ));
+  }
+
+  void getUser(context) async {
+    String userMsg = await StorageUtil.getString('userMsg');
+    if (userMsg.isNotEmpty) {
+      setState(() {
+        userMsgObj = jsonDecode(userMsg);
+      });
+    } else {
+      Navigator.pushNamed(context, "/login");
+    }
+  }
+}

+ 168 - 0
lib/pages/login/login.dart

@@ -0,0 +1,168 @@
+import 'package:flutter/material.dart';
+import 'package:fun_selfie_app/utils/storage.dart';
+import 'dart:convert';
+
+class LoginPage extends StatefulWidget {
+  const LoginPage({Key? key}) : super(key: key);
+
+  @override
+  State<StatefulWidget> createState() => _LoginPageState();
+}
+
+class _LoginPageState extends State<LoginPage> {
+  bool showPassword = false;
+  GlobalKey<FormState> formKey = GlobalKey<FormState>(); //表单验证
+  final TextEditingController configName = TextEditingController();
+  final TextEditingController configPass = TextEditingController();
+
+  @override
+  Widget build(BuildContext context) {
+    final screenSize = MediaQuery.of(context).size;
+    return Scaffold(
+      appBar: AppBar(
+        title: const Text("登录"),
+      ),
+      body: Container(
+        width: screenSize.width,
+        height: screenSize.height,
+        decoration: const BoxDecoration(
+            image: DecorationImage(
+                fit: BoxFit.cover,
+                image: AssetImage('static/images/login_bg.png'))),
+        child: Center(
+            child: Container(
+                decoration: const BoxDecoration(
+                  color: Colors.white,
+                ),
+                width: 500,
+                height: 400,
+                child: Form(
+                    key: formKey,
+                    autovalidateMode: AutovalidateMode.onUserInteraction,
+                    child: Padding(
+                      padding: const EdgeInsets.only(
+                          left: 50, right: 50, top: 70, bottom: 0),
+                      // padding: const EdgeInsets.all(50),
+                      child: Column(
+                        children: [
+                          // const SizedBox(
+                          //   height: 24,
+                          // ),
+                          Container(
+                            padding: const EdgeInsets.symmetric(
+                                horizontal: 20, vertical: 5),
+                            decoration: const BoxDecoration(
+                                color: Color.fromARGB(8, 0, 0, 0),
+                                borderRadius:
+                                    BorderRadius.all(Radius.circular(10))),
+                            child: TextFormField(
+                              controller: configName,
+                              validator: (v) => (v == '') ? "请输入账号" : null,
+                              decoration: const InputDecoration(
+                                border: InputBorder.none,
+                                labelText: "账号",
+                                hintText: "请输入账号",
+                                prefixIcon: Icon(Icons.person),
+                              ),
+                            ),
+                          ),
+                          const SizedBox(
+                            height: 16,
+                          ),
+                          Container(
+                            padding: const EdgeInsets.symmetric(
+                                horizontal: 20, vertical: 5),
+                            decoration: const BoxDecoration(
+                                color: Color.fromARGB(8, 0, 0, 0),
+                                borderRadius:
+                                    BorderRadius.all(Radius.circular(10))),
+                            child: TextFormField(
+                              controller: configPass,
+                              validator: (v) => (v == '') ? "请输入密码" : null,
+                              obscureText: !showPassword,
+                              decoration: InputDecoration(
+                                border: InputBorder.none,
+                                labelText: "密码",
+                                hintText: "请输入密码",
+                                prefixIcon: const Icon(Icons.lock),
+                                suffixIcon: IconButton(
+                                  icon: Icon(showPassword
+                                      ? Icons.visibility_off
+                                      : Icons.visibility),
+                                  onPressed: () {
+                                    setState(() {
+                                      showPassword = !showPassword;
+                                    });
+                                  },
+                                ),
+                              ),
+                            ),
+                          ),
+                          // const SizedBox(
+                          //   height: 16,
+                          // ),
+                          // GestureDetector(
+                          //   child: const SizedBox(
+                          //     width: double.infinity,
+                          //     child: Text(
+                          //       "找回密码",
+                          //       style: TextStyle(color: Colors.blue),
+                          //       textAlign: TextAlign.right,
+                          //     ),
+                          //   ),
+                          //   onTap: () {
+                          //     debugPrint("找回密码被点击");
+                          //   },
+                          // ),
+                          const SizedBox(
+                            height: 50,
+                          ),
+                          SizedBox(
+                            width: double.infinity,
+                            height: 40,
+                            child: ElevatedButton(
+                              style: ButtonStyle(
+                                // backgroundColor:
+                                //     MaterialStateProperty.all(Colors.white),
+                                shadowColor: MaterialStateProperty.all(
+                                    Colors.transparent),
+                                // foregroundColor: MaterialStateProperty.all(
+                                //     const Color(0xffBB86FC)),
+                              ),
+                              child: const Text("登录"),
+                              onPressed: () {
+                                _onSubmit(context);
+                              },
+                            ),
+                          ),
+                          const SizedBox(
+                            height: 16,
+                          ),
+                          // SizedBox(
+                          //   width: double.infinity,
+                          //   child: ElevatedButton(
+                          //     child: const Text("注册"),
+                          //     onPressed: () {
+                          //       Navigator.pushReplacementNamed(context, 'register');
+                          //     },
+                          //   ),
+                          // ),
+                        ],
+                      ),
+                    )))),
+      ),
+    );
+  }
+
+  void _onSubmit(context) async {
+    final form = formKey.currentState;
+    if (form!.validate()) {
+      Object str = {
+        'configName': configName.text,
+        'configPass': configPass.text
+      };
+      await StorageUtil.setString('userMsg', jsonEncode(str));
+      Navigator.pushNamed(context, "/");
+    }
+  }
+}

+ 17 - 0
lib/pages/login/not_found.dart

@@ -0,0 +1,17 @@
+import 'package:flutter/material.dart';
+
+class NotFoundPage extends StatelessWidget {
+  const NotFoundPage({Key? key}) : super(key: key);
+
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      appBar: AppBar(
+        title: const Text('404'),
+      ),
+      body: const Center(
+        child: Text('您访问的页面不存在'),
+      ),
+    );
+  }
+}

+ 89 - 0
lib/pages/login/register.dart

@@ -0,0 +1,89 @@
+import 'package:flutter/material.dart';
+
+class RegisterPage extends StatefulWidget {
+  const RegisterPage({Key? key}) : super(key: key);
+
+  @override
+  State<StatefulWidget> createState() => _RegisterPageState();
+}
+
+class _RegisterPageState extends State<RegisterPage> {
+  bool showPassword = false;
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      appBar: AppBar(
+        title: const Text("注册"),
+      ),
+      // child: PageContent(name: "登录"),
+      body: SingleChildScrollView(
+        child: Padding(
+          padding: const EdgeInsets.all(20),
+          child: Column(
+            children: [
+              const TextField(
+                decoration: InputDecoration(
+                  labelText: "账号",
+                  hintText: "请输入账号",
+                  prefixIcon: Icon(Icons.person),
+                ),
+              ),
+              const SizedBox(
+                height: 16,
+              ),
+              TextField(
+                obscureText: !showPassword,
+                decoration: const InputDecoration(
+                  labelText: "密码",
+                  hintText: "请输入密码",
+                  prefixIcon: Icon(Icons.lock),
+                ),
+              ),
+              const SizedBox(
+                height: 16,
+              ),
+              TextField(
+                obscureText: !showPassword,
+                decoration: const InputDecoration(
+                  labelText: "确认密码",
+                  hintText: "请再次输入密码",
+                  prefixIcon: Icon(Icons.lock),
+                ),
+              ),
+              const SizedBox(
+                height: 24,
+              ),
+              SizedBox(
+                width: double.infinity,
+                child: ElevatedButton(
+                  child: const Text("注册"),
+                  onPressed: () {
+                    debugPrint("register");
+                  },
+                ),
+              ),
+              const SizedBox(
+                height: 16,
+              ),
+              Row(
+                mainAxisAlignment: MainAxisAlignment.center,
+                children: [
+                  const Text('已有账号,'),
+                  TextButton(
+                    child: const Text(
+                      '去登录~',
+                      style: TextStyle(color: Colors.teal),
+                    ),
+                    onPressed: () {
+                      Navigator.pushReplacementNamed(context, 'login');
+                    },
+                  )
+                ],
+              ),
+            ],
+          ),
+        ),
+      ),
+    );
+  }
+}

+ 79 - 0
lib/pages/photography/index.dart

@@ -0,0 +1,79 @@
+import 'package:flutter/material.dart';
+import 'package:fun_selfie_app/utils/common_toast.dart';
+import 'package:fun_selfie_app/widgets/home_button.dart';
+
+class PhotographyPage extends StatefulWidget {
+  const PhotographyPage({Key? key}) : super(key: key);
+
+  @override
+  State<StatefulWidget> createState() => _PhotographyPageState();
+}
+
+class _PhotographyPageState extends State<PhotographyPage> {
+  Widget renderImgBox(String imgSrc) {
+    final screenSize = MediaQuery.of(context).size;
+    return Container(
+      padding: const EdgeInsets.only(left: 20),
+      constraints: BoxConstraints(
+          maxHeight: screenSize.height * 0.3, maxWidth: screenSize.width / 4),
+      decoration: const BoxDecoration(
+        boxShadow: [
+          BoxShadow(
+              color: Colors.black38,
+              offset: Offset(0, 2),
+              blurRadius: 5,
+              spreadRadius: 3)
+        ],
+      ),
+      child: Image(
+        image: AssetImage(imgSrc),
+        fit: BoxFit.fill,
+        width: (screenSize.width - 100) / 4,
+      ),
+    );
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    final screenSize = MediaQuery.of(context).size;
+    return Scaffold(
+        body: Container(
+      width: screenSize.width,
+      height: screenSize.height,
+      decoration: const BoxDecoration(
+          image: DecorationImage(
+              fit: BoxFit.cover,
+              image: AssetImage('static/images/photography_bg.png'))),
+      child: Stack(children: <Widget>[
+        Align(
+            alignment: const Alignment(0, 0),
+            child: SizedBox(
+                width: 180,
+                height: 60,
+                child: ElevatedButton(
+                  child: const Text(
+                    '开始拍摄',
+                    style: TextStyle(fontSize: 20),
+                  ),
+                  onPressed: () {
+                    Navigator.pushNamed(context, "/takePhoto");
+                  },
+                ))),
+        const HomeButton(),
+        Positioned(
+            bottom: 0,
+            left: 0,
+            width: screenSize.width,
+            // height: 200,
+            child: Row(
+              children: [
+                renderImgBox('static/images/photo_img3.png'),
+                renderImgBox('static/images/photo_img1.png'),
+                renderImgBox('static/images/photo_img2.png'),
+                renderImgBox('static/images/photo_img3.png'),
+              ],
+            ))
+      ]),
+    ));
+  }
+}

+ 172 - 0
lib/pages/photography/photo_over.dart

@@ -0,0 +1,172 @@
+import 'package:flutter/material.dart';
+import 'package:fun_selfie_app/utils/common_toast.dart';
+import 'package:fun_selfie_app/widgets/home_button.dart';
+import 'package:fun_selfie_app/widgets/common_form_item.dart';
+
+class PhotoOverPage extends StatefulWidget {
+  const PhotoOverPage({Key? key}) : super(key: key);
+
+  @override
+  State<StatefulWidget> createState() => _PhotoOverPageState();
+}
+
+class _PhotoOverPageState extends State<PhotoOverPage> {
+  final TextEditingController printNum = TextEditingController();
+  Widget renderImgBox(String imgSrc) {
+    final screenSize = MediaQuery.of(context).size;
+    return Container(
+      padding: const EdgeInsets.only(top: 20),
+      constraints: BoxConstraints(
+          maxHeight: screenSize.height * 0.4, maxWidth: screenSize.width / 4),
+      child: Image(
+        image: AssetImage(imgSrc),
+        fit: BoxFit.fill,
+        width: (screenSize.width) / 4,
+      ),
+    );
+  }
+
+  Widget heightButton(
+      String txt, Color? backgroundColor, VoidCallback? onPressed) {
+    return SizedBox(
+      height: 60,
+      child: OutlinedButton(
+        style: ButtonStyle(
+            shadowColor: MaterialStateProperty.all(Colors.transparent),
+            backgroundColor: MaterialStateProperty.all(backgroundColor)),
+        onPressed: onPressed,
+        child: Text(
+          txt,
+          style: const TextStyle(
+              fontSize: 20, color: Color.fromRGBO(121, 72, 234, 1)),
+        ),
+      ),
+    );
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    final screenSize = MediaQuery.of(context).size;
+    return Scaffold(
+        body: Container(
+      width: screenSize.width,
+      height: screenSize.height,
+      color: const Color.fromARGB(100, 229, 229, 229),
+      child: Stack(children: <Widget>[
+        Padding(
+            padding: const EdgeInsets.all(10),
+            child: Row(
+              children: [
+                Container(
+                    width: (screenSize.width / 4) + 40,
+                    color: const Color(0xffFF5833),
+                    child: SingleChildScrollView(
+                        child: Column(children: [
+                      renderImgBox('static/images/photo_img1.png'),
+                      renderImgBox('static/images/photo_img2.png'),
+                      renderImgBox('static/images/photo_img3.png'),
+                      renderImgBox('static/images/photo_img4.png'),
+                    ]))),
+                Container(
+                    width: (screenSize.width - (screenSize.width / 3)),
+                    alignment: Alignment.center,
+                    child: SizedBox(
+                        width: (screenSize.width / 3),
+                        child: Column(
+                            mainAxisAlignment: MainAxisAlignment.center,
+                            children: <Widget>[
+                              Image(
+                                  image: const AssetImage(
+                                      'static/images/qrcode.png'),
+                                  fit: BoxFit.fill,
+                                  width: (screenSize.width) / 5,
+                                  height: (screenSize.width) / 5),
+                              const SizedBox(height: 40),
+                              const Text(
+                                '手机扫码看照片直播',
+                                style: TextStyle(
+                                    fontSize: 24,
+                                    color: Color.fromRGBO(121, 72, 234, 100)),
+                              ),
+                              const SizedBox(height: 40),
+                              Row(
+                                mainAxisAlignment:
+                                    MainAxisAlignment.spaceEvenly,
+                                children: [
+                                  heightButton('打印',
+                                      const Color.fromARGB(14, 98, 0, 238), () {
+                                    CommonToast.okToast('打印');
+                                  }),
+                                  heightButton('打印多张', Colors.transparent, () {
+                                    showAlertDialog(
+                                      context,
+                                    );
+                                  }),
+                                  heightButton('不满意重拍', Colors.transparent, () {
+                                    Navigator.pushNamed(context, "/takePhoto");
+                                  }),
+                                  heightButton('返回',
+                                      const Color.fromARGB(14, 98, 0, 238), () {
+                                    Navigator.pushNamed(
+                                        context, "/photography");
+                                  }),
+                                ],
+                              )
+                            ]))),
+              ],
+            )),
+        const HomeButton()
+      ]),
+    ));
+  }
+
+  Future<void> showAlertDialog(BuildContext context) async {
+    return showDialog<void>(
+      context: context,
+      barrierDismissible: false, // 点击对话框外部时,是否关闭对话框
+      builder: (BuildContext context) {
+        return AlertDialog(
+          title: const Text('打印多张'),
+          content: SizedBox(
+            width: 400,
+            child: CommonFormItem(
+              label: '打印数量',
+              hitText: '请输入',
+              controller: printNum,
+              validator: (v) => (v == '') ? "请输入" : null,
+            ),
+          ),
+          actions: <Widget>[
+            TextButton(
+              child: const Text('取消',
+                  style: TextStyle(
+                      color: Color.fromARGB(255, 98, 0, 238), fontSize: 20)),
+              onPressed: () {
+                printNum.text = '';
+                Navigator.of(context).pop();
+              },
+            ),
+            TextButton(
+              child: const Text('确定',
+                  style: TextStyle(
+                      color: Color.fromARGB(255, 98, 0, 238), fontSize: 20)),
+              onPressed: () {
+                if (printNum.text == '') {
+                  CommonToast.errToast('请填写打印数量');
+                  return;
+                } else {
+                  RegExp numbers = RegExp(r"\d+$");
+                  if (!numbers.hasMatch(printNum.text)) {
+                    CommonToast.errToast('请填写正整数');
+                    return;
+                  }
+                }
+                Navigator.of(context).pop();
+              },
+            ),
+          ],
+        );
+      },
+    );
+  }
+}

+ 39 - 0
lib/pages/photography/take_photo.dart

@@ -0,0 +1,39 @@
+import 'package:flutter/material.dart';
+import 'package:fun_selfie_app/widgets/home_button.dart';
+
+class TakePhotoPage extends StatefulWidget {
+  const TakePhotoPage({Key? key}) : super(key: key);
+
+  @override
+  State<StatefulWidget> createState() => _TakePhotoPageState();
+}
+
+class _TakePhotoPageState extends State<TakePhotoPage> {
+  @override
+  Widget build(BuildContext context) {
+    final screenSize = MediaQuery.of(context).size;
+    return Scaffold(
+        body: SizedBox(
+      width: screenSize.width,
+      height: screenSize.height,
+      child: Stack(children: <Widget>[
+        Container(
+            color: Colors.black38,
+            child: Align(
+                child: SizedBox(
+                    width: 180,
+                    height: 60,
+                    child: ElevatedButton(
+                      child: const Text(
+                        '下一步',
+                        style: TextStyle(fontSize: 20),
+                      ),
+                      onPressed: () {
+                        Navigator.pushNamed(context, "/photo_over");
+                      },
+                    )))),
+        const HomeButton()
+      ]),
+    ));
+  }
+}

+ 23 - 0
lib/utils/api.dart

@@ -0,0 +1,23 @@
+import 'package:fun_selfie_app/dio_util/dio_util.dart';
+
+class UtilHelper {
+  static updateList(params) async {
+    // DioUtil.getInstance()?.openLog();
+    var result = await DioUtil().request(
+      "pad/deliver/deliverOrder/list",
+      method: 'get',
+      params: params,
+    );
+    return result;
+  }
+
+  static updatePackingList(params) async {
+    // DioUtil.getInstance()?.openLog();
+    var result = await DioUtil().request(
+      "pad/produce/worklineJob/list",
+      method: 'get',
+      params: params,
+    );
+    return result;
+  }
+}

+ 28 - 0
lib/utils/common_toast.dart

@@ -0,0 +1,28 @@
+import 'package:fluttertoast/fluttertoast.dart';
+import 'package:flutter/material.dart';
+
+class CommonToast {
+  static okToast(String msg) {
+    Fluttertoast.showToast(
+        msg: msg,
+        gravity: ToastGravity.CENTER,
+        backgroundColor: Colors.green,
+        textColor: Colors.white,
+        webBgColor: '#000000',
+        timeInSecForIosWeb: 5,
+        webPosition: 'center',
+        fontSize: 16);
+  }
+
+  static errToast(String msg) {
+    Fluttertoast.showToast(
+        msg: msg,
+        gravity: ToastGravity.CENTER,
+        backgroundColor: Colors.red,
+        textColor: Colors.white,
+        webBgColor: '#e74c3c',
+        timeInSecForIosWeb: 5,
+        webPosition: 'center',
+        fontSize: 16);
+  }
+}

+ 172 - 0
lib/utils/permission_request.dart

@@ -0,0 +1,172 @@
+import 'dart:io';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/services.dart';
+import 'package:permission_handler/permission_handler.dart';
+
+/// 权限检查及请求
+/// 外部可通过此方法来进行权限的检查和请求,将自动跳转到`PermissionRequestPage`页面。
+/// 传入 `Permission` 以及对应的权限名称 `permissionTypeStr`,如果有权限则返回 `Future true`
+/// `isRequiredPermission` 如果为 `true`,则 "取消" 按钮将执行 "退出app" 的操作
+Permission permission = Permission.notification;
+Future<bool> permissionCheckAndRequest(
+    BuildContext context, String permissionTypeStr,
+    {bool isRequiredPermission = false}) async {
+  final navigator = Navigator.of(context);
+  try {
+    PermissionStatus status = await permission.status;
+    if (!status.isGranted) {
+      await navigator.push(PageRouteBuilder(
+          opaque: false,
+          pageBuilder: ((context, animation, secondaryAnimation) {
+            return PermissionRequestPage(permission, permissionTypeStr,
+                isRequiredPermission: isRequiredPermission);
+          })));
+    } else {
+      return true;
+    }
+    return false;
+  } catch (e) {
+    return true;
+  }
+}
+
+class PermissionRequestPage extends StatefulWidget {
+  const PermissionRequestPage(this.permission, this.permissionTypeStr,
+      {super.key, this.isRequiredPermission = false});
+  final Permission permission;
+  final String permissionTypeStr;
+  final bool isRequiredPermission;
+  @override
+  State<PermissionRequestPage> createState() => _PermissionRequestPageState();
+}
+
+class _PermissionRequestPageState extends State<PermissionRequestPage>
+    with WidgetsBindingObserver {
+  bool _isGoSetting = false;
+  late final List<String> msgList;
+  @override
+  void initState() {
+    super.initState();
+    WidgetsBinding.instance.addObserver(this);
+    msgList = [
+      "${widget.permissionTypeStr}功能需要获取您设备的${widget.permissionTypeStr}权限,否则可能无法正常工作。\n是否申请${widget.permissionTypeStr}权限?",
+      "${widget.permissionTypeStr}权限不全,是否重新申请权限?",
+      "没有${widget.permissionTypeStr}权限,您可以手动开启权限",
+      widget.isRequiredPermission ? "退出应用" : "取消"
+    ];
+    checkPermission(widget.permission);
+  }
+
+  @override
+  void didChangeAppLifecycleState(AppLifecycleState state) {
+    super.didChangeAppLifecycleState(state);
+    // 监听 app 从后台切回前台
+    if (state == AppLifecycleState.resumed && _isGoSetting) {
+      checkPermission(widget.permission);
+    }
+  }
+
+  /// 校验权限
+  void checkPermission(Permission permission) async {
+    final status = await permission.status;
+    if (status.isGranted) {
+      _popPage();
+      return;
+    }
+    // 还未申请权限或之前拒绝了权限(在 iOS 上为首次申请权限,拒绝后将变为 `永久拒绝权限`)
+    if (status.isDenied) {
+      showAlert(
+          permission, msgList[0], msgList[3], _isGoSetting ? "前往应用中心" : "确定");
+    }
+    // 权限已被永久拒绝
+    if (status.isPermanentlyDenied) {
+      _isGoSetting = true;
+      showAlert(
+          permission, msgList[2], msgList[3], _isGoSetting ? "前往应用中心" : "确定");
+    }
+    // 拥有部分权限
+    if (status.isLimited) {
+      if (Platform.isIOS || Platform.isMacOS) _isGoSetting = true;
+      showAlert(
+          permission, msgList[1], msgList[3], _isGoSetting ? "前往应用中心" : "确定");
+    }
+    // 拥有部分权限(仅限 iOS)
+    if (status.isRestricted) {
+      if (Platform.isIOS || Platform.isMacOS) _isGoSetting = true;
+      showAlert(
+          permission, msgList[1], msgList[3], _isGoSetting ? "前往应用中心" : "确定");
+    }
+  }
+
+  void showAlert(Permission permission, String message, String cancelMsg,
+      String confirmMsg) {
+    showCupertinoDialog(
+        context: context,
+        builder: (context) {
+          return CupertinoAlertDialog(
+            title: const Text("温馨提示"),
+            content: Text(message),
+            actions: [
+              CupertinoDialogAction(
+                  child: Text(cancelMsg),
+                  onPressed: () {
+                    widget.isRequiredPermission
+                        ? _quitApp()
+                        : _popDialogAndPage(context);
+                  }),
+              CupertinoDialogAction(
+                  child: Text(confirmMsg),
+                  onPressed: () {
+                    if (_isGoSetting) {
+                      openAppSettings();
+                      _isGoSetting = true;
+                    } else {
+                      requestPermisson(permission);
+                    }
+                    _popDialog(context);
+                  })
+            ],
+          );
+        });
+  }
+
+  /// 申请权限
+  void requestPermisson(Permission permission) async {
+    // 申请权限
+    await permission.request();
+    // 再次校验
+    checkPermission(permission);
+  }
+
+  @override
+  void dispose() {
+    WidgetsBinding.instance.removeObserver(this);
+    super.dispose();
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return Container();
+  }
+
+  /// 退出应用程序
+  void _quitApp() {
+    SystemChannels.platform.invokeMethod("SystemNavigator.pop");
+  }
+
+  /// 关闭整个权限申请页面
+  void _popDialogAndPage(BuildContext dialogContext) {
+    _popDialog(dialogContext);
+    _popPage();
+  }
+
+  /// 关闭弹窗
+  void _popDialog(BuildContext dialogContext) {
+    Navigator.of(dialogContext).pop();
+  }
+
+  /// 关闭透明页面
+  void _popPage() {
+    Navigator.of(context).pop();
+  }
+}

+ 67 - 0
lib/utils/routes.dart

@@ -0,0 +1,67 @@
+import 'package:fluro/fluro.dart';
+import 'package:flutter/material.dart';
+import 'package:fun_selfie_app/pages/home/index.dart';
+import 'package:fun_selfie_app/pages/login/login.dart';
+import 'package:fun_selfie_app/pages/login/not_found.dart';
+import 'package:fun_selfie_app/pages/home/add_news.dart';
+import 'package:fun_selfie_app/pages/home/news_detail.dart';
+import 'package:fun_selfie_app/pages/photography/index.dart';
+import 'package:fun_selfie_app/pages/photography/take_photo.dart';
+import 'package:fun_selfie_app/pages/photography/photo_over.dart';
+
+class RouterFluro {
+  static FluroRouter fluroRouter = FluroRouter();
+
+  static final Handler _homeHandler = Handler(
+      handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
+    return const HomePage();
+  });
+  static final Handler _loginHandler = Handler(
+      handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
+    return const LoginPage();
+  });
+
+  static final Handler _addNews = Handler(
+      handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
+    return const AddNewsPage();
+  });
+
+  static final Handler _newsDetail = Handler(
+      handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
+    return NewsDetailPage(ids: params['ids']![0]);
+  });
+
+  static final Handler _photography = Handler(
+      handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
+    return const PhotographyPage();
+  });
+  static final Handler _takePhoto = Handler(
+      handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
+    return const TakePhotoPage();
+  });
+  static final Handler _photoOver = Handler(
+      handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
+    return const PhotoOverPage();
+  });
+
+  static initRoues() {
+    fluroRouter.notFoundHandler = Handler(
+        handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
+      return const NotFoundPage();
+    });
+    fluroRouter.define("/",
+        handler: _homeHandler, transitionType: TransitionType.fadeIn);
+    fluroRouter.define("/login",
+        handler: _loginHandler, transitionType: TransitionType.fadeIn);
+    fluroRouter.define("/addNews",
+        handler: _addNews, transitionType: TransitionType.fadeIn);
+    fluroRouter.define("/newsDetail/:ids",
+        handler: _newsDetail, transitionType: TransitionType.fadeIn);
+    fluroRouter.define("/photography",
+        handler: _photography, transitionType: TransitionType.fadeIn);
+    fluroRouter.define("/takePhoto",
+        handler: _takePhoto, transitionType: TransitionType.fadeIn);
+    fluroRouter.define("/photo_over",
+        handler: _photoOver, transitionType: TransitionType.fadeIn);
+  }
+}

+ 26 - 0
lib/utils/storage.dart

@@ -0,0 +1,26 @@
+import 'package:flutter/foundation.dart';
+import 'package:shared_preferences/shared_preferences.dart';
+
+class StorageUtil {
+  static Future<void> setString(key, value) async {
+    SharedPreferences sp = await SharedPreferences.getInstance();
+    sp.setString(key, value);
+  }
+
+  static Future<String> getString(key) async {
+    SharedPreferences sp = await SharedPreferences.getInstance();
+    var value = sp.getString(key);
+    debugPrint(value.toString());
+    return value ?? '';
+  }
+
+  static Future<void> remove(key) async {
+    SharedPreferences sp = await SharedPreferences.getInstance();
+    sp.remove(key);
+  }
+
+  static Future<void> clear() async {
+    SharedPreferences sp = await SharedPreferences.getInstance();
+    sp.clear();
+  }
+}

+ 47 - 0
lib/widgets/common_form_item.dart

@@ -0,0 +1,47 @@
+import 'package:flutter/material.dart';
+
+class CommonFormItem extends StatelessWidget {
+  final String? label;
+  final Widget Function(BuildContext context)? contentBuilder;
+  final Widget? suffix;
+  final String? suffixText;
+  final String? hitText;
+  final bool readOnly;
+  final ValueChanged? onChanged;
+  final GestureTapCallback? onTap;
+  final String? Function(String?)? validator;
+  final TextEditingController? controller;
+
+  const CommonFormItem(
+      {Key? key,
+      this.label,
+      this.contentBuilder,
+      this.suffix,
+      this.suffixText,
+      this.hitText,
+      this.readOnly = false,
+      this.onChanged,
+      this.onTap,
+      this.validator,
+      this.controller})
+      : super(key: key);
+
+  @override
+  Widget build(BuildContext context) {
+    return Container(
+        padding: const EdgeInsets.only(left: 14.0, right: 14.0, top: 20),
+        child: contentBuilder != null
+            ? contentBuilder!(context)
+            : TextFormField(
+                readOnly: readOnly,
+                controller: controller,
+                onTap: onTap,
+                validator: validator,
+                decoration: InputDecoration(
+                    border: const OutlineInputBorder(),
+                    labelText: label,
+                    hintText: hitText,
+                    suffixText: suffixText),
+              ));
+  }
+}

+ 36 - 0
lib/widgets/height_button.dart

@@ -0,0 +1,36 @@
+import 'package:flutter/material.dart';
+
+class HeightButton extends StatelessWidget {
+  final Color? shadowColor;
+  final Color? backgroundColor;
+  final String txt;
+  final Color? txtColor;
+  final VoidCallback? onPressed;
+  const HeightButton(
+      {Key? key,
+      this.shadowColor,
+      this.backgroundColor,
+      required this.txt,
+      this.txtColor,
+      this.onPressed})
+      : super(key: key);
+
+  @override
+  Widget build(BuildContext context) {
+    return SizedBox(
+      height: 60,
+      child: OutlinedButton(
+        style: ButtonStyle(
+            shadowColor: MaterialStateProperty.all(shadowColor),
+            backgroundColor: MaterialStateProperty.all(backgroundColor)),
+        onPressed: onPressed,
+        child: Text(
+          txt,
+          style: const TextStyle(
+            fontSize: 18,
+          ),
+        ),
+      ),
+    );
+  }
+}

+ 25 - 0
lib/widgets/home_button.dart

@@ -0,0 +1,25 @@
+import 'package:flutter/material.dart';
+
+class HomeButton extends StatelessWidget {
+  const HomeButton({Key? key}) : super(key: key);
+
+  @override
+  Widget build(BuildContext context) {
+    return Positioned(
+        top: 30,
+        right: 30,
+        child: SizedBox(
+            width: 70,
+            height: 80,
+            child: FloatingActionButton(
+              shape: const CircleBorder(),
+              child: const Icon(
+                Icons.home,
+                size: 40,
+              ),
+              onPressed: () async {
+                Navigator.pushNamed(context, "/");
+              },
+            )));
+  }
+}

+ 116 - 0
lib/widgets/my_refresh_list.dart

@@ -0,0 +1,116 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+
+/// 封装下拉刷新与加载更多
+class DeerListView extends StatefulWidget {
+  const DeerListView({
+    super.key,
+    required this.itemCount,
+    required this.itemBuilder,
+    required this.onRefresh,
+    this.loadMore,
+    this.hasMore = false,
+    this.padding,
+    this.controller,
+  });
+
+  final RefreshCallback onRefresh;
+  final LoadMoreCallback? loadMore;
+  final int itemCount;
+  final bool hasMore;
+  final IndexedWidgetBuilder itemBuilder;
+  final ScrollController? controller;
+
+  /// padding属性使用时注意会破坏原有的SafeArea,需要自行计算bottom大小
+  final EdgeInsetsGeometry? padding;
+
+  @override
+  State<StatefulWidget> createState() => _DeerListViewState();
+}
+
+typedef RefreshCallback = Future<void> Function();
+typedef LoadMoreCallback = Future<void> Function();
+
+class _DeerListViewState extends State<DeerListView> {
+  /// 是否正在加载数据
+  bool _isLoading = false;
+
+  @override
+  Widget build(BuildContext context) {
+    final Widget child = RefreshIndicator(
+      onRefresh: widget.onRefresh,
+      child:
+          // widget.itemCount == 0 ?
+          // StateLayout(type: widget.stateType) :
+          ListView.separated(
+        controller: widget.controller,
+        itemCount:
+            widget.loadMore == null ? widget.itemCount : widget.itemCount + 1,
+        padding: widget.padding,
+        itemBuilder: (BuildContext context, int index) {
+          /// 不需要加载更多则不需要添加FootView
+          if (widget.loadMore == null) {
+            return widget.itemBuilder(context, index);
+          } else {
+            return index < widget.itemCount
+                ? widget.itemBuilder(context, index)
+                : MoreWidget(widget.itemCount, widget.hasMore);
+          }
+        },
+        separatorBuilder: (context, index) {
+          return const Divider();
+        },
+      ),
+    );
+    return SafeArea(
+      child: NotificationListener<ScrollNotification>(
+        onNotification: (ScrollNotification note) {
+          /// 确保是垂直方向滚动,且滑动至底部
+          if (note.metrics.pixels == note.metrics.maxScrollExtent &&
+              note.metrics.axis == Axis.vertical) {
+            _loadMore();
+          }
+          return true;
+        },
+        child: child,
+      ),
+    );
+  }
+
+  Future<void> _loadMore() async {
+    if (widget.loadMore == null) {
+      return;
+    }
+    if (_isLoading) {
+      return;
+    }
+    if (!widget.hasMore) {
+      return;
+    }
+    _isLoading = true;
+    await widget.loadMore?.call();
+    _isLoading = false;
+  }
+}
+
+class MoreWidget extends StatelessWidget {
+  const MoreWidget(this.itemCount, this.hasMore, {super.key});
+
+  final int itemCount;
+  final bool hasMore;
+
+  @override
+  Widget build(BuildContext context) {
+    TextStyle style = const TextStyle(color: Color(0x8A000000));
+    return Padding(
+      padding: const EdgeInsets.symmetric(vertical: 10.0),
+      child: Row(
+        mainAxisAlignment: MainAxisAlignment.center,
+        children: <Widget>[
+          if (hasMore) const CupertinoActivityIndicator(),
+          Text(hasMore ? '正在加载中...' : '没有了呦~', style: style),
+        ],
+      ),
+    );
+  }
+}

+ 1 - 0
linux/.gitignore

@@ -0,0 +1 @@
+flutter/ephemeral

+ 138 - 0
linux/CMakeLists.txt

@@ -0,0 +1,138 @@
+# Project-level configuration.
+cmake_minimum_required(VERSION 3.10)
+project(runner LANGUAGES CXX)
+
+# The name of the executable created for the application. Change this to change
+# the on-disk name of your application.
+set(BINARY_NAME "fun_selfie_app")
+# The unique GTK application identifier for this application. See:
+# https://wiki.gnome.org/HowDoI/ChooseApplicationID
+set(APPLICATION_ID "com.example.fun_selfie_app")
+
+# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
+# versions of CMake.
+cmake_policy(SET CMP0063 NEW)
+
+# Load bundled libraries from the lib/ directory relative to the binary.
+set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
+
+# Root filesystem for cross-building.
+if(FLUTTER_TARGET_PLATFORM_SYSROOT)
+  set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})
+  set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
+  set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+  set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
+  set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+  set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+endif()
+
+# Define build configuration options.
+if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+  set(CMAKE_BUILD_TYPE "Debug" CACHE
+    STRING "Flutter build mode" FORCE)
+  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
+    "Debug" "Profile" "Release")
+endif()
+
+# Compilation settings that should be applied to most targets.
+#
+# Be cautious about adding new options here, as plugins use this function by
+# default. In most cases, you should add new options to specific targets instead
+# of modifying this function.
+function(APPLY_STANDARD_SETTINGS TARGET)
+  target_compile_features(${TARGET} PUBLIC cxx_std_14)
+  target_compile_options(${TARGET} PRIVATE -Wall -Werror)
+  target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
+  target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
+endfunction()
+
+# Flutter library and tool build rules.
+set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
+add_subdirectory(${FLUTTER_MANAGED_DIR})
+
+# System-level dependencies.
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
+
+add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
+
+# Define the application target. To change its name, change BINARY_NAME above,
+# not the value here, or `flutter run` will no longer work.
+#
+# Any new source files that you add to the application should be added here.
+add_executable(${BINARY_NAME}
+  "main.cc"
+  "my_application.cc"
+  "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
+)
+
+# Apply the standard set of build settings. This can be removed for applications
+# that need different build settings.
+apply_standard_settings(${BINARY_NAME})
+
+# Add dependency libraries. Add any application-specific dependencies here.
+target_link_libraries(${BINARY_NAME} PRIVATE flutter)
+target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
+
+# Run the Flutter tool portions of the build. This must not be removed.
+add_dependencies(${BINARY_NAME} flutter_assemble)
+
+# Only the install-generated bundle's copy of the executable will launch
+# correctly, since the resources must in the right relative locations. To avoid
+# people trying to run the unbundled copy, put it in a subdirectory instead of
+# the default top-level location.
+set_target_properties(${BINARY_NAME}
+  PROPERTIES
+  RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
+)
+
+# Generated plugin build rules, which manage building the plugins and adding
+# them to the application.
+include(flutter/generated_plugins.cmake)
+
+
+# === Installation ===
+# By default, "installing" just makes a relocatable bundle in the build
+# directory.
+set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
+if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+  set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
+endif()
+
+# Start with a clean build bundle directory every time.
+install(CODE "
+  file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
+  " COMPONENT Runtime)
+
+set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
+set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
+
+install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
+  COMPONENT Runtime)
+
+install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
+  COMPONENT Runtime)
+
+install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
+  COMPONENT Runtime)
+
+foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
+  install(FILES "${bundled_library}"
+    DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
+    COMPONENT Runtime)
+endforeach(bundled_library)
+
+# Fully re-copy the assets directory on each build to avoid having stale files
+# from a previous install.
+set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
+install(CODE "
+  file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
+  " COMPONENT Runtime)
+install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
+  DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
+
+# Install the AOT library on non-Debug builds only.
+if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
+  install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
+    COMPONENT Runtime)
+endif()

+ 88 - 0
linux/flutter/CMakeLists.txt

@@ -0,0 +1,88 @@
+# This file controls Flutter-level build steps. It should not be edited.
+cmake_minimum_required(VERSION 3.10)
+
+set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
+
+# Configuration provided via flutter tool.
+include(${EPHEMERAL_DIR}/generated_config.cmake)
+
+# TODO: Move the rest of this into files in ephemeral. See
+# https://github.com/flutter/flutter/issues/57146.
+
+# Serves the same purpose as list(TRANSFORM ... PREPEND ...),
+# which isn't available in 3.10.
+function(list_prepend LIST_NAME PREFIX)
+    set(NEW_LIST "")
+    foreach(element ${${LIST_NAME}})
+        list(APPEND NEW_LIST "${PREFIX}${element}")
+    endforeach(element)
+    set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
+endfunction()
+
+# === Flutter Library ===
+# System-level dependencies.
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
+pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
+pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
+
+set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
+
+# Published to parent scope for install step.
+set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
+set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
+set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
+set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
+
+list(APPEND FLUTTER_LIBRARY_HEADERS
+  "fl_basic_message_channel.h"
+  "fl_binary_codec.h"
+  "fl_binary_messenger.h"
+  "fl_dart_project.h"
+  "fl_engine.h"
+  "fl_json_message_codec.h"
+  "fl_json_method_codec.h"
+  "fl_message_codec.h"
+  "fl_method_call.h"
+  "fl_method_channel.h"
+  "fl_method_codec.h"
+  "fl_method_response.h"
+  "fl_plugin_registrar.h"
+  "fl_plugin_registry.h"
+  "fl_standard_message_codec.h"
+  "fl_standard_method_codec.h"
+  "fl_string_codec.h"
+  "fl_value.h"
+  "fl_view.h"
+  "flutter_linux.h"
+)
+list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
+add_library(flutter INTERFACE)
+target_include_directories(flutter INTERFACE
+  "${EPHEMERAL_DIR}"
+)
+target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
+target_link_libraries(flutter INTERFACE
+  PkgConfig::GTK
+  PkgConfig::GLIB
+  PkgConfig::GIO
+)
+add_dependencies(flutter flutter_assemble)
+
+# === Flutter tool backend ===
+# _phony_ is a non-existent file to force this command to run every time,
+# since currently there's no way to get a full input/output list from the
+# flutter tool.
+add_custom_command(
+  OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
+    ${CMAKE_CURRENT_BINARY_DIR}/_phony_
+  COMMAND ${CMAKE_COMMAND} -E env
+    ${FLUTTER_TOOL_ENVIRONMENT}
+    "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
+      ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
+  VERBATIM
+)
+add_custom_target(flutter_assemble DEPENDS
+  "${FLUTTER_LIBRARY}"
+  ${FLUTTER_LIBRARY_HEADERS}
+)

+ 15 - 0
linux/flutter/generated_plugin_registrant.cc

@@ -0,0 +1,15 @@
+//
+//  Generated file. Do not edit.
+//
+
+// clang-format off
+
+#include "generated_plugin_registrant.h"
+
+#include <file_selector_linux/file_selector_plugin.h>
+
+void fl_register_plugins(FlPluginRegistry* registry) {
+  g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
+      fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
+  file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
+}

+ 15 - 0
linux/flutter/generated_plugin_registrant.h

@@ -0,0 +1,15 @@
+//
+//  Generated file. Do not edit.
+//
+
+// clang-format off
+
+#ifndef GENERATED_PLUGIN_REGISTRANT_
+#define GENERATED_PLUGIN_REGISTRANT_
+
+#include <flutter_linux/flutter_linux.h>
+
+// Registers Flutter plugins.
+void fl_register_plugins(FlPluginRegistry* registry);
+
+#endif  // GENERATED_PLUGIN_REGISTRANT_

+ 24 - 0
linux/flutter/generated_plugins.cmake

@@ -0,0 +1,24 @@
+#
+# Generated file, do not edit.
+#
+
+list(APPEND FLUTTER_PLUGIN_LIST
+  file_selector_linux
+)
+
+list(APPEND FLUTTER_FFI_PLUGIN_LIST
+)
+
+set(PLUGIN_BUNDLED_LIBRARIES)
+
+foreach(plugin ${FLUTTER_PLUGIN_LIST})
+  add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
+  target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
+  list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
+  list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
+endforeach(plugin)
+
+foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
+  add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
+  list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
+endforeach(ffi_plugin)

+ 6 - 0
linux/main.cc

@@ -0,0 +1,6 @@
+#include "my_application.h"
+
+int main(int argc, char** argv) {
+  g_autoptr(MyApplication) app = my_application_new();
+  return g_application_run(G_APPLICATION(app), argc, argv);
+}

+ 104 - 0
linux/my_application.cc

@@ -0,0 +1,104 @@
+#include "my_application.h"
+
+#include <flutter_linux/flutter_linux.h>
+#ifdef GDK_WINDOWING_X11
+#include <gdk/gdkx.h>
+#endif
+
+#include "flutter/generated_plugin_registrant.h"
+
+struct _MyApplication {
+  GtkApplication parent_instance;
+  char** dart_entrypoint_arguments;
+};
+
+G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
+
+// Implements GApplication::activate.
+static void my_application_activate(GApplication* application) {
+  MyApplication* self = MY_APPLICATION(application);
+  GtkWindow* window =
+      GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
+
+  // Use a header bar when running in GNOME as this is the common style used
+  // by applications and is the setup most users will be using (e.g. Ubuntu
+  // desktop).
+  // If running on X and not using GNOME then just use a traditional title bar
+  // in case the window manager does more exotic layout, e.g. tiling.
+  // If running on Wayland assume the header bar will work (may need changing
+  // if future cases occur).
+  gboolean use_header_bar = TRUE;
+#ifdef GDK_WINDOWING_X11
+  GdkScreen* screen = gtk_window_get_screen(window);
+  if (GDK_IS_X11_SCREEN(screen)) {
+    const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen);
+    if (g_strcmp0(wm_name, "GNOME Shell") != 0) {
+      use_header_bar = FALSE;
+    }
+  }
+#endif
+  if (use_header_bar) {
+    GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
+    gtk_widget_show(GTK_WIDGET(header_bar));
+    gtk_header_bar_set_title(header_bar, "fun_selfie_app");
+    gtk_header_bar_set_show_close_button(header_bar, TRUE);
+    gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
+  } else {
+    gtk_window_set_title(window, "fun_selfie_app");
+  }
+
+  gtk_window_set_default_size(window, 1280, 720);
+  gtk_widget_show(GTK_WIDGET(window));
+
+  g_autoptr(FlDartProject) project = fl_dart_project_new();
+  fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
+
+  FlView* view = fl_view_new(project);
+  gtk_widget_show(GTK_WIDGET(view));
+  gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
+
+  fl_register_plugins(FL_PLUGIN_REGISTRY(view));
+
+  gtk_widget_grab_focus(GTK_WIDGET(view));
+}
+
+// Implements GApplication::local_command_line.
+static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) {
+  MyApplication* self = MY_APPLICATION(application);
+  // Strip out the first argument as it is the binary name.
+  self->dart_entrypoint_arguments = g_strdupv(*arguments + 1);
+
+  g_autoptr(GError) error = nullptr;
+  if (!g_application_register(application, nullptr, &error)) {
+     g_warning("Failed to register: %s", error->message);
+     *exit_status = 1;
+     return TRUE;
+  }
+
+  g_application_activate(application);
+  *exit_status = 0;
+
+  return TRUE;
+}
+
+// Implements GObject::dispose.
+static void my_application_dispose(GObject* object) {
+  MyApplication* self = MY_APPLICATION(object);
+  g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev);
+  G_OBJECT_CLASS(my_application_parent_class)->dispose(object);
+}
+
+static void my_application_class_init(MyApplicationClass* klass) {
+  G_APPLICATION_CLASS(klass)->activate = my_application_activate;
+  G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line;
+  G_OBJECT_CLASS(klass)->dispose = my_application_dispose;
+}
+
+static void my_application_init(MyApplication* self) {}
+
+MyApplication* my_application_new() {
+  return MY_APPLICATION(g_object_new(my_application_get_type(),
+                                     "application-id", APPLICATION_ID,
+                                     "flags", G_APPLICATION_NON_UNIQUE,
+                                     nullptr));
+}

+ 18 - 0
linux/my_application.h

@@ -0,0 +1,18 @@
+#ifndef FLUTTER_MY_APPLICATION_H_
+#define FLUTTER_MY_APPLICATION_H_
+
+#include <gtk/gtk.h>
+
+G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,
+                     GtkApplication)
+
+/**
+ * my_application_new:
+ *
+ * Creates a new Flutter-based application.
+ *
+ * Returns: a new #MyApplication.
+ */
+MyApplication* my_application_new();
+
+#endif  // FLUTTER_MY_APPLICATION_H_

+ 7 - 0
macos/.gitignore

@@ -0,0 +1,7 @@
+# Flutter-related
+**/Flutter/ephemeral/
+**/Pods/
+
+# Xcode-related
+**/dgph
+**/xcuserdata/

+ 1 - 0
macos/Flutter/Flutter-Debug.xcconfig

@@ -0,0 +1 @@
+#include "ephemeral/Flutter-Generated.xcconfig"

+ 1 - 0
macos/Flutter/Flutter-Release.xcconfig

@@ -0,0 +1 @@
+#include "ephemeral/Flutter-Generated.xcconfig"

+ 0 - 0
macos/Flutter/GeneratedPluginRegistrant.swift


部分文件因为文件数量过多而无法显示