第一次上传

This commit is contained in:
1147192855@qq.com 2024-11-19 16:15:43 +08:00
commit 3897434359
166 changed files with 7707 additions and 0 deletions

1
wgshare/.fvm/flutter_sdk Symbolic link
View File

@ -0,0 +1 @@
E:/code/fvm/versions/3.24.5

View File

@ -0,0 +1,4 @@
{
"flutterSdkVersion": "3.24.5",
"flavors": {}
}

45
wgshare/.gitignore vendored Normal file
View File

@ -0,0 +1,45 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/
.fvm/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
*.g.dart
# 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
.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
wgshare/.metadata Normal file
View File

@ -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 and should not be manually edited.
version:
revision: "dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668"
channel: "stable"
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
- platform: android
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
- platform: ios
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
- platform: linux
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
- platform: macos
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
- platform: web
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
- platform: windows
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
# 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'

16
wgshare/README.md Normal file
View File

@ -0,0 +1,16 @@
# wgshare
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.

View File

@ -0,0 +1,28 @@
# 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.dev/lints.
#
# 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
wgshare/android/.gitignore vendored Normal file
View File

@ -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/to/reference-keystore
key.properties
**/*.keystore
**/*.jks

View File

@ -0,0 +1,71 @@
plugins {
id "com.android.application"
id "kotlin-android"
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id "dev.flutter.flutter-gradle-plugin"
}
def keystorePropertiesFile = rootProject.file("key.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android {
namespace = "com.yuanxuan.wgshare"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
debug {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.yuanxuan.wgshare"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}
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 files("libs/Tstudy_TD_v144.jar")
// implementation files("libs/fastjson-1.2.83.jar")
// implementation 'com.alibaba:fastjson:1.2.83'
}

View File

@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 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>

View File

@ -0,0 +1,81 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:label="智汇享"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"
android:enableOnBackInvokedCallback="true">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:taskAffinity=""
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>
<!-- 访问电话状态 -->
<uses-permission
android:name="android.permission.READ_PHONE_STATE"/>
<!-- 允许全部网络访问 -->
<uses-permission
android:name="android.permission.INTERNET"/>
<!-- 获取网络信息状态 -->
<uses-permission
android:name="android.permission.ACCESS_NETWORK_STATE"/>
<!-- 获取当前WiFi接入的状态以及WLAN热点的信息 -->
<uses-permission
android:name="android.permission.ACCESS_WIFI_STATE"/>
<!-- 获取当前设备存储权限 -->
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission
android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
<uses-permission
android:name="android.permission.ACTION_MANAGE_UNKNOWN_APP_SOURCES"/>
<!-- 这个权限用于app安装 -->
<uses-permission
android:name="android.permission.REQUEST_INSTALL_PACKAGES"/>
<!-- 屏幕常亮权限 -->
<uses-permission
android:name="android.permission.WAKE_LOCK"/>
<uses-permission
android:name="android.permission.CAMERA"/>
<!-- Permissions options for the `access notification policy` group -->
<uses-permission
android:name="android.permission.ACCESS_NOTIFICATION_POLICY"/>
<!-- Permissions options for the `notification` group -->
<uses-permission
android:name="android.permission.POST_NOTIFICATIONS"/>
<!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility and
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
</intent>
</queries>
</manifest>

View File

@ -0,0 +1,6 @@
package com.yuanxuan.wgshare;
import io.flutter.embedding.android.FlutterActivity;
public class MainActivity extends FlutterActivity {
}

View File

@ -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>

View File

@ -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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -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>

View File

@ -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>

View File

@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 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>

View File

@ -0,0 +1,18 @@
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = "../build"
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(":app")
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}

View File

@ -0,0 +1,3 @@
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true

View File

@ -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-8.3-all.zip

View File

@ -0,0 +1,25 @@
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.1.0" apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
}
include ":app"

34
wgshare/ios/.gitignore vendored Normal file
View File

@ -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

View File

@ -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>12.0</string>
</dict>
</plist>

View File

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

View File

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

View File

@ -0,0 +1,616 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
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 PBXContainerItemProxy section */
331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 97C146E61CF9000F007C117D /* Project object */;
proxyType = 1;
remoteGlobalIDString = 97C146ED1CF9000F007C117D;
remoteInfo = Runner;
};
/* End PBXContainerItemProxy 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>"; };
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
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 */
331C8082294A63A400263BE5 /* RunnerTests */ = {
isa = PBXGroup;
children = (
331C807B294A618700263BE5 /* RunnerTests.swift */,
);
path = RunnerTests;
sourceTree = "<group>";
};
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 */,
331C8082294A63A400263BE5 /* RunnerTests */,
);
sourceTree = "<group>";
};
97C146EF1CF9000F007C117D /* Products */ = {
isa = PBXGroup;
children = (
97C146EE1CF9000F007C117D /* Runner.app */,
331C8081294A63A400263BE5 /* RunnerTests.xctest */,
);
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 */
331C8080294A63A400263BE5 /* RunnerTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
buildPhases = (
331C807D294A63A400263BE5 /* Sources */,
331C807F294A63A400263BE5 /* Resources */,
);
buildRules = (
);
dependencies = (
331C8086294A63A400263BE5 /* PBXTargetDependency */,
);
name = RunnerTests;
productName = RunnerTests;
productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
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 = {
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
331C8080294A63A400263BE5 = {
CreatedOnToolsVersion = 14.0;
TestTargetID = 97C146ED1CF9000F007C117D;
};
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 */,
331C8080294A63A400263BE5 /* RunnerTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
331C807F294A63A400263BE5 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
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 = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
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 */
331C807D294A63A400263BE5 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
97C146EA1CF9000F007C117D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 97C146ED1CF9000F007C117D /* Runner */;
targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency 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;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
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;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
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 = 12.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.yuanxuan.wgshare;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Profile;
};
331C8088294A63A400263BE5 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.yuanxuan.wgshare.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
};
name = Debug;
};
331C8089294A63A400263BE5 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.yuanxuan.wgshare.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
};
name = Release;
};
331C808A294A63A400263BE5 /* Profile */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.yuanxuan.wgshare.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
};
name = Profile;
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
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;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
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 = 12.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;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
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;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
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 = 12.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.yuanxuan.wgshare;
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.yuanxuan.wgshare;
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 */
331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
331C8088294A63A400263BE5 /* Debug */,
331C8089294A63A400263BE5 /* Release */,
331C808A294A63A400263BE5 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
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 */;
}

View File

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

View File

@ -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>

View File

@ -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>

View File

@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1510"
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>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "331C8080294A63A400263BE5"
BuildableName = "RunnerTests.xctest"
BlueprintName = "RunnerTests"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</TestableReference>
</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>

View File

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

View File

@ -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>

View File

@ -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>

View File

@ -0,0 +1,13 @@
import Flutter
import UIKit
@main
@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)
}
}

View File

@ -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"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -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"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

View File

@ -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.

View File

@ -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>

View File

@ -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>

View File

@ -0,0 +1,49 @@
<?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>Wgshare</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>wgshare</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>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>

View File

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

View File

@ -0,0 +1,12 @@
import Flutter
import UIKit
import XCTest
class RunnerTests: XCTestCase {
func testExample() {
// If you add code to the Runner application, consider adding tests here.
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
}
}

View File

@ -0,0 +1,15 @@
import 'package:dio/dio.dart' hide Headers;
import 'package:retrofit/retrofit.dart';
import '../models/common/base_structure_result.dart';
part 'retrofit_client.g.dart';
@RestApi(parser: Parser.JsonSerializable)
@Headers(<String, dynamic>{"Content-Type": "application/json"})
abstract class RetrofitClient {
factory RetrofitClient(Dio dio, {String? baseUrl}) = _RetrofitClient;
// @POST("/api/user/users/login")
// Future<BaseStructureResult<LoginRes>> toLogin(@Body() LoginParams loginParams);
}

View File

@ -0,0 +1,24 @@
// ignore_for_file: constant_identifier_names
library values;
///
///
///
class AppConfig {
static const bool DEBUG_MODE = false;
// /// ui width
// static const UI_WIDTH = 2000.0;
// /// ui width
// static const UI_HEIGHT = 1200.0;
static const SKIP_UPDATING_USER = '18888888888';
static const APP_NAME = '18888888888';
static const paddingLeft = 20.0;
static const paddingRight = 20.0;
static const paddingbottom = 20.0;
}

View File

@ -0,0 +1,46 @@
import 'dart:ui';
import 'dart:ui';
import 'package:flutter/material.dart';
//hex改一下#223344 needs change to 0xFF223344
//#0xFF
MaterialColor createMaterialColor(Color color) {
List strengths = <double>[.05];
Map<int, Color> swatch = {};
final int r = color.red, g = color.green, b = color.blue;
for (int i = 1; i < 10; i++) {
strengths.add(0.1 * i);
}
for (var strength in strengths) {
final double ds = 0.5 - strength;
swatch[(strength * 1000).round()] = Color.fromRGBO(
r + ((ds < 0 ? r : (255 - r)) * ds).round(),
g + ((ds < 0 ? g : (255 - g)) * ds).round(),
b + ((ds < 0 ? b : (255 - b)) * ds).round(),
1,
);
}
return MaterialColor(color.value, swatch);
}
class CommonColors {
static const Color defaultColor = Color.fromRGBO(45, 56, 76, 1);
static Map<String, ColorItem> map = Map.from({
'text_black': ColorItem(
title: 'text_black', color: const Color.fromRGBO(45, 56, 76, 1)),
});
ColorItem getColorItem(String key, {Color color = defaultColor}) {
return map[key] ?? ColorItem(color: color,title: 'default_color');
}
}
class ColorItem {
String title;
Color color;
ColorItem({required this.color, required this.title});
}

View File

@ -0,0 +1,36 @@
import 'package:wgshare/common/models/common/base_page.dart';
class RequestConfig {
// static const _devBaseUrl = "https://zyapitest.23544.com:16440"; //
static const _devBaseUrl = "https://zyapitest.23544.com:16440"; //
// static const _proBaseUrl = "http://192.168.2.119:1091"; //
static const _proBaseUrl = "https://zyapi.23544.com/ipadapi"; //
static const imgUrl = 'https://dpc-job-oss.23544.com/';
static RequestConfig? _instance;
String baseUrl;
static const connectTimeout = 8000; //
static const receiveTimeout = 10 * 1000; //
static const bool requestDataPrinting = true; //
// static const successCode = [200]; // code
static const resultCode = [200]; // code
static final BasePage basePage = BasePage(1, 10); //
//
//
RequestConfig._({required this.baseUrl});
factory RequestConfig() {
if (_instance == null) {
String newBaseUrl;
if (const bool.fromEnvironment('dart.vm.product')) {
newBaseUrl = _proBaseUrl; //
} else {
newBaseUrl = _devBaseUrl; //
}
_instance = RequestConfig._(baseUrl: newBaseUrl);
}
return _instance!;
}
}

View File

@ -0,0 +1,10 @@
import 'package:dio/dio.dart';
import 'package:wgshare/common/api/retrofit_client.dart';
import 'package:wgshare/common/request/rest_dio.dart';
mixin RequestToolMixin {
// DIO
Dio getClientDio() => RequestTool.instance.getDio();
// Client
RetrofitClient getClient() => RequestTool.instance.getClient();
}

View File

@ -0,0 +1,3 @@
abstract class BaseAbstract extends Object {
Map<String, dynamic> toJson();
}

View File

@ -0,0 +1,33 @@
import 'package:json_annotation/json_annotation.dart';
part 'base_page.g.dart';
@JsonSerializable(includeIfNull: false)
class BasePage extends Object {
@JsonKey(name: 'PageNumber')
int page;
@JsonKey(name: 'PageSize')
int limit;
@JsonKey(name: 'PageIndex')
int? _pageIndex;
BasePage(this.page, this.limit) : _pageIndex = page;
// ignore: non_constant_identifier_names
int get PageIndex => page;
set PageIndex(int newValue) {
_pageIndex = newValue;
page = newValue;
}
factory BasePage.fromJson(Map<String, dynamic> srcJson) {
return _$BasePageFromJson(srcJson);
}
Map<String, dynamic> toJson() {
return _$BasePageToJson(this);
}
}

View File

@ -0,0 +1,21 @@
import 'package:json_annotation/json_annotation.dart';
part 'base_page_result.g.dart';
@JsonSerializable(genericArgumentFactories: true, fieldRename: FieldRename.snake)
class BasePageResult<T> extends Object {
@JsonKey(name: 'Data')
List<T> data;
@JsonKey(name: 'Total')
int total;
BasePageResult(
this.data,
this.total,
);
factory BasePageResult.fromJson(Map<String, dynamic> json, T Function(dynamic json) fromJsonT) => _$BasePageResultFromJson(json, fromJsonT);
Map<String, dynamic> toJson(Object Function(T value) toJsonT) => _$BasePageResultToJson(this, toJsonT);
}

View File

@ -0,0 +1,34 @@
/*
* @Author: wangyang 1147192855@qq.com
* @Date: 2022-07-13 18:30:11
* @LastEditors: wangyang 1147192855@qq.com
* @LastEditTime: 2022-07-14 10:20:21
* @FilePath: \marking_app\lib\common\model\common\base_structure_result.dart
* @Description: ,`customMade`, koroFileHeader查看配置 : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import 'package:json_annotation/json_annotation.dart';
import 'package:wgshare/common/config/request_config.dart';
part 'base_structure_result.g.dart';
@JsonSerializable(genericArgumentFactories: true, fieldRename: FieldRename.snake)
class BaseStructureResult<T> extends Object {
@JsonKey(name: 'code')
int code;
@JsonKey(name: 'message')
String? message;
@JsonKey(name: 'data')
T? data;
@JsonKey(name: 'success')
bool success;
BaseStructureResult(this.code, this.message, this.data, {this.success = false}) {
success = RequestConfig.resultCode.contains(code);
}
factory BaseStructureResult.fromJson(Map<String, dynamic> json, T Function(dynamic json) fromJsonT) =>
_$BaseStructureResultFromJson(json, fromJsonT);
Map<String, dynamic> toJson(Object Function(T value) toJsonT) => _$BaseStructureResultToJson(this, toJsonT);
}

View File

@ -0,0 +1,278 @@
import 'package:json_annotation/json_annotation.dart';
part 'user_info_detail.g.dart';
@JsonSerializable(checked: true)
class UserInfoDetail extends Object {
@JsonKey(name: 'Name')
String name;
@JsonKey(name: 'Status')
int status;
@JsonKey(name: 'Mobile')
String? mobile;
@JsonKey(name: 'Account')
String account;
@JsonKey(name: 'UserType')
int userType;
@JsonKey(name: 'SchoolId')
int schoolId;
@JsonKey(name: 'SchoolName')
String? schoolName;
@JsonKey(name: 'Email')
String? email;
@JsonKey(name: 'Id')
int id;
@JsonKey(name: 'RecordIsShow')
bool recordIsShow;
@JsonKey(name: 'LiveIsShow')
bool liveIsShow;
@JsonKey(name: 'FileIsShow')
bool fileIsShow;
@JsonKey(name: 'EquipmentIsShow')
bool equipmentIsShow;
@JsonKey(name: 'DataIsShow')
bool dataIsShow;
@JsonKey(name: 'DataUrl')
String? dataUrl;
@JsonKey(name: 'TaskIsShow')
bool taskIsShow;
@JsonKey(name: 'DataMonitorIsShow')
bool dataMonitorIsShow;
@JsonKey(name: 'GCSLists')
List<GCSLists>? gCSLists;
@JsonKey(name: 'LearnedCoursesNum')
int learnedCoursesNum;
@JsonKey(name: 'RoleAnys')
RoleAnys roleAnys;
@JsonKey(name: 'RoleIsShowMenus')
List<RoleIsShowMenus> roleIsShowMenus;
@JsonKey(name: 'OrgId')
int orgId;
@JsonKey(name: 'IsCanVerify')
bool isCanVerify;
@JsonKey(name: 'StageSubject')
StageSubject? stageSubject;
@JsonKey(name: 'UserOrgList')
List<UserOrgList> userOrgList;
// SN
@JsonKey(name: 'PointPenSn')
String? pointPenSn;
// Mac
@JsonKey(name: 'PointPenMAC')
String? pointPenMac;
UserInfoDetail(
this.name,
this.status,
this.mobile,
this.account,
this.userType,
this.schoolId,
this.schoolName,
this.email,
this.id,
this.recordIsShow,
this.liveIsShow,
this.fileIsShow,
this.equipmentIsShow,
this.dataIsShow,
this.dataUrl,
this.taskIsShow,
this.dataMonitorIsShow,
this.gCSLists,
this.learnedCoursesNum,
this.roleAnys,
this.roleIsShowMenus,
this.orgId,
this.isCanVerify,
this.stageSubject,
this.userOrgList,
this.pointPenSn,
this.pointPenMac,
) {
// Mac
if (pointPenSn == null && pointPenMac != null) {
pointPenMac = null;
}
}
factory UserInfoDetail.fromJson(Map<String, dynamic> srcJson) => _$UserInfoDetailFromJson(srcJson);
Map<String, dynamic> toJson() => _$UserInfoDetailToJson(this);
}
@JsonSerializable()
class GCSLists extends Object {
@JsonKey(name: 'Value')
String value;
@JsonKey(name: 'Text')
String? text;
@JsonKey(name: 'GCSLists')
List<GCSLists>? gCSLists;
GCSLists(
this.value,
this.text,
this.gCSLists,
);
factory GCSLists.fromJson(Map<String, dynamic> srcJson) => _$GCSListsFromJson(srcJson);
Map<String, dynamic> toJson() => _$GCSListsToJson(this);
}
@JsonSerializable()
class RoleAnys extends Object {
@JsonKey(name: 'YxIsShow')
bool yxIsShow;
@JsonKey(name: 'HtzxIsShow')
bool htzxIsShow;
@JsonKey(name: 'ZjIsShow')
bool zjIsShow;
@JsonKey(name: 'LjzkIsShow')
bool ljzkIsShow;
@JsonKey(name: 'IsResoure')
bool isResoure;
@JsonKey(name: 'YxNeiBuIsShow')
bool yxNeiBuIsShow;
@JsonKey(name: 'HtNeiBuIsShow')
bool htNeiBuIsShow;
@JsonKey(name: 'ZhongZhiIsShow')
bool zhongZhiIsShow;
@JsonKey(name: 'JSCZIsShow')
bool jSCZIsShow;
@JsonKey(name: 'YLRHYXIsShow')
bool yLRHYXIsShow;
@JsonKey(name: 'CSFZIsShow')
bool cSFZIsShow;
@JsonKey(name: 'YBYXIsShow')
bool yBYXIsShow;
RoleAnys(
this.yxIsShow,
this.htzxIsShow,
this.zjIsShow,
this.ljzkIsShow,
this.isResoure,
this.yxNeiBuIsShow,
this.htNeiBuIsShow,
this.zhongZhiIsShow,
this.jSCZIsShow,
this.yLRHYXIsShow,
this.cSFZIsShow,
this.yBYXIsShow,
);
factory RoleAnys.fromJson(Map<String, dynamic> srcJson) => _$RoleAnysFromJson(srcJson);
Map<String, dynamic> toJson() => _$RoleAnysToJson(this);
}
@JsonSerializable()
class RoleIsShowMenus extends Object {
@JsonKey(name: 'MenuName')
String menuName;
@JsonKey(name: 'MenuUrl')
String menuUrl;
@JsonKey(name: 'Parameter')
String? parameter;
@JsonKey(name: 'Children')
List<dynamic>? children;
RoleIsShowMenus(
this.menuName,
this.menuUrl,
this.parameter,
this.children,
);
factory RoleIsShowMenus.fromJson(Map<String, dynamic> srcJson) => _$RoleIsShowMenusFromJson(srcJson);
Map<String, dynamic> toJson() => _$RoleIsShowMenusToJson(this);
}
@JsonSerializable()
class StageSubject extends Object {
@JsonKey(name: 'StageId')
int stageId;
@JsonKey(name: 'StageName')
String stageName;
@JsonKey(name: 'SubjectId')
int subjectId;
@JsonKey(name: 'SubjectName')
String subjectName;
StageSubject(
this.stageId,
this.stageName,
this.subjectId,
this.subjectName,
);
factory StageSubject.fromJson(Map<String, dynamic> srcJson) => _$StageSubjectFromJson(srcJson);
Map<String, dynamic> toJson() => _$StageSubjectToJson(this);
}
@JsonSerializable()
class UserOrgList extends Object {
@JsonKey(name: 'Id')
int id;
@JsonKey(name: 'Name')
String name;
UserOrgList(
this.id,
this.name,
);
factory UserOrgList.fromJson(Map<String, dynamic> srcJson) => _$UserOrgListFromJson(srcJson);
Map<String, dynamic> toJson() => _$UserOrgListToJson(this);
}

View File

@ -0,0 +1,195 @@
import 'dart:io';
import 'package:dio/io.dart';
import 'package:get/get.dart' as getx;
import 'package:dio/dio.dart';
import 'package:wgshare/common/api/retrofit_client.dart';
import 'package:wgshare/common/config/request_config.dart';
import 'package:wgshare/common/store/user_store.dart';
import 'package:wgshare/utils/storage.dart';
import 'package:wgshare/utils/toast_utils.dart';
import 'package:wgshare/routes/app_routes.dart';
import 'package:package_info_plus/package_info_plus.dart';
class RequestTool {
static late Dio _dio;
//
static _init() {
// HttpClient
final httpClient = HttpClient()..maxConnectionsPerHost = 12; //
BaseOptions options = BaseOptions(
baseUrl: RequestConfig().baseUrl,
connectTimeout: const Duration(milliseconds: RequestConfig.connectTimeout),
receiveTimeout: const Duration(milliseconds: RequestConfig.receiveTimeout),
);
_dio = Dio(options)..httpClientAdapter = IOHttpClientAdapter(createHttpClient: () => httpClient);
_dio.interceptors.add(AuthInterceptor()); // token
_dio.interceptors.add(ResponseHandle()); //
_dio.interceptors.add(TheError()); //
const isProd = bool.fromEnvironment('dart.vm.product');
if (!isProd && RequestConfig.requestDataPrinting) {
_dio.interceptors.add(LogInterceptor(responseBody: true, requestBody: true)); //
}
return RetrofitClient(_dio, baseUrl: RequestConfig().baseUrl);
}
final RetrofitClient _client;
static RequestTool? _instance;
RequestTool._internal(this._client);
static get instance {
if (_instance == null) {
RetrofitClient client = _init();
_instance = RequestTool._internal(client);
}
return _instance!;
}
// DIO
Dio getDio() => _dio;
RetrofitClient getClient() => _client;
}
/*
*
*AuthInterceptor
*header认证
* */
class AuthInterceptor extends Interceptor {
@override
onRequest(RequestOptions options, RequestInterceptorHandler handler) async {
//app版本
PackageInfo packageInfo = await PackageInfo.fromPlatform();
String version = packageInfo.version;
// ignore: non_constant_identifier_names
String PLATFORM = "android"; //
if (Platform.isIOS) {
PLATFORM = "ios";
} else if (Platform.isAndroid) {
PLATFORM = "android";
} else if (Platform.isWindows) {
PLATFORM = "Windows";
} else if (Platform.isMacOS) {
PLATFORM = "macos";
} else if (Platform.isLinux) {
PLATFORM = "Linux";
}
Map<String, String> headers = {};
headers["Accept-Charset"] = "utf-8";
headers["Connection"] = "keep-alive";
headers["Accept"] = "*/*";
headers["x-version"] = version; //
headers["x-platform"] = PLATFORM;
headers["Content-Type"] = "application/json";
// header token
String? token = UserStore.to.token;
if (token?.isNotEmpty ?? false) {
headers["Authorization"] = 'Bearer $token'; //
}
options.headers = headers;
return super.onRequest(options, handler);
}
}
/*
* ResponseHandle
*
**/
class ResponseHandle extends Interceptor {
@override
void onResponse(Response response, ResponseInterceptorHandler handler) {
int? statusCode = response.statusCode;
var data = response.data;
var flag = data != null &&
((data['code'] != null && (data['code'] == 401 || data['code'] == '401')) ||
(data['Code'] != null && (data['Code'] == 401 || data['Code'] == '401')));
if (statusCode == 401 || flag) {
Future.delayed(const Duration(seconds: 2), () {
StorageService.to.erase();
getx.Get.offAllNamed(Routes.login);
});
}
super.onResponse(response, handler);
}
}
class TheError extends Interceptor {
// late getx.Rx<UserInfoDetail?> userInfo = UserStore.to.userDetailInfo;
@override
void onError(DioException err, ErrorInterceptorHandler handler) {
var message = '请求错误,请重试';
switch (err.type) {
case DioExceptionType.connectionTimeout:
message = '请求链接超时';
break;
case DioExceptionType.badCertificate:
message = '证书错误,清联系管理员';
break;
case DioExceptionType.sendTimeout:
message = '请求发送超时';
break;
case DioExceptionType.receiveTimeout:
message = '接收超时时发生';
break;
case DioExceptionType.badResponse:
if (err.response == null) {
print('请求进入异常但是请求response');
} else {
Response? response = err.response;
if (response != null) {
int? statusCode = response.statusCode;
var errorMap = response.data;
// var runtimeType = errorMap.runtimeType;
if (errorMap is Map && errorMap['error'] != null) {
message = errorMap['error']?['message'] ?? '请求错误,请重试';
} else {
if (statusCode != null) {
switch (statusCode) {
case 401:
message = '用户登录失效,请重新登录';
Future.delayed(const Duration(seconds: 2), () {
// UserStore.to.erase();
StorageService.to.erase();
getx.Get.offAllNamed(Routes.login);
});
break;
case 404:
message = '无效地址';
break;
default:
}
}
}
}
}
break;
case DioExceptionType.cancel:
message = '请求已取消';
break;
case DioExceptionType.connectionError:
message = '当前无网络,请重试';
break;
default:
message = '请求错误';
}
/* if (message == '用户登录失效,请重新登录' && userInfo.value?.id == null) {
return handler.next(error);
}*/
ToastUtils.showError(message);
return handler.next(err);
}
}

View File

@ -0,0 +1,12 @@
///
enum AppStorageKey {
token(value: 'TOKEN', label: "登录用户的token"),
userInfo(value: 'USERINFO', label: "登录用户的基本信息 及 token过期时间"),
account(value: 'ACCOUNT', label: "用户名"),
pwd(value: 'PWD', label: "密码");
final String label;
final String value;
const AppStorageKey({required this.value, required this.label});
}

View File

@ -0,0 +1,69 @@
import 'package:get/get.dart';
import 'package:wgshare/common/mixins/request_tool_mixin.dart';
import 'package:wgshare/common/models/common/base_structure_result.dart';
import 'package:wgshare/common/models/user_info_detail.dart';
import 'package:wgshare/common/store/app_storage_key.dart';
import 'package:wgshare/routes/app_routes.dart';
import 'package:wgshare/utils/storage.dart';
class UserStore extends GetxController with RequestToolMixin {
static UserStore get to => Get.find();
///
String? token;
/// Token及过期时间信息
// Rx<UserInfo?> userInfo = Rx(null);
///
Rx<UserInfoDetail?> userDetailInfo = Rx(null);
UserStore init() {
token = StorageService.to.read(AppStorageKey.token.value);
try {
var userDetail = StorageService.to.read(AppStorageKey.userInfo.value);
if (userDetail != null) {
userDetailInfo.value = UserInfoDetail.fromJson(userDetail);
}
} catch (err) {
print('$err');
StorageService.to.remove(AppStorageKey.userInfo.value);
}
if ((token?.isNotEmpty ?? false) && userDetailInfo.value != null) {
} else {
/// TODO
// Get.offAllNamed(Routes.login);
}
return this;
}
/// token
void setToken(String token) {
this.token = token;
StorageService.to.write(AppStorageKey.token.value, token);
}
///
void setUserDetailInfo(UserInfoDetail info) {
userDetailInfo.value = info;
StorageService.to.write(AppStorageKey.userInfo.value, info);
}
void erase() {
// userInfo.value = null;
userDetailInfo.value = null;
token = null;
StorageService.to.erase();
}
//
Future<UserInfoDetail?> updateUserInfo() async {
// BaseStructureResult<UserInfoDetail> res = await getClient().getUser();
// var data = res.data;
// if (res.success && data != null) {
// setUserDetailInfo(data);
// return data;
// }
// return null;
}
}

193
wgshare/lib/main.dart Normal file
View File

@ -0,0 +1,193 @@
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:get/get.dart';
import 'package:wgshare/common/store/user_store.dart';
import 'package:wgshare/utils/package_info_util.dart';
import 'package:wgshare/utils/storage.dart';
import 'package:wgshare/utils/utils.dart';
import 'common/config/colorUtils.dart';
import 'routes/app_pages.dart';
import 'routes/app_routes.dart';
void main() async {
Get.testMode = true;
WidgetsFlutterBinding.ensureInitialized();
PackageInfo packageInfo = await PackageInfoUtil.init();
PackageInfoUtil.getInstance(packageInfo); //
///
await Get.putAsync(() => StorageService().init());
/// UserStore
Get.put<UserStore>(UserStore().init());
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return ScreenUtilInit(
designSize: const Size(375, 812),
minTextAdapt: true,
splitScreenMode: true,
builder: (context, child) {
return GetMaterialApp(
title: '智汇享',
debugShowCheckedModeBanner: false,
theme: ThemeData(
brightness: Brightness.light,
primarySwatch: createMaterialColor(const Color.fromRGBO(85, 117, 242, 1)),
primaryColor: const Color.fromRGBO(85, 117, 242, 1),
primaryTextTheme: TextTheme(
bodyLarge: TextStyle(fontSize: 14.sp, color: Colors.black87),
),
useMaterial3: false,
//
colorScheme: const ColorScheme.light(primary: Color.fromRGBO(85, 117, 242, 1)),
),
enableLog: true,
logWriterCallback: (text, {bool isError = false}) {
// isError ? LoggerUtils.e(text) : LoggerUtils.i(text);
},
// flutter_localizations依赖
supportedLocales: const [
Locale('zh', 'CN'), //
// locale可以在这里添加
],
localizationsDelegates: const [
// ...delegates
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate, // 使Cupertino风格的组件
RefreshLocalizations.delegate,
// ...delegates
],
localeResolutionCallback: (locale, supportedLocales) {
// locale解析逻辑
// Locale对象
return locale;
},
//
defaultTransition: Transition.fade,
//
initialRoute: Routes.startPage,
///
getPages: AppPages.pages,
routingCallback: (routing) {
String? currentRouter = routing?.current;
print("当前路由:${routing?.current}");
},
builder: EasyLoading.init(
builder: (context, child) {
return MediaQuery(
//Setting font does not change with system font size
data: MediaQuery.of(context).copyWith(textScaler: const TextScaler.linear(1.0)),
child: Scaffold(
body: GestureDetector(onTap: () => Utils.hideKeyboard(), child: child),
),
);
},
),
// home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
});
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
// how it looks.
// This class is the configuration for the state. It holds the values (in this
// case the title) provided by the parent (in this case the App widget) and
// used by the build method of the State. Fields in a Widget subclass are
// always marked "final".
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
void _incrementCounter() {
setState(() {
// This call to setState tells the Flutter framework that something has
// changed in this State, which causes it to rerun the build method below
// so that the display can reflect the updated values. If we changed
// _counter without calling setState(), then the build method would not be
// called again, and so nothing would appear to happen.
_counter++;
});
}
@override
Widget build(BuildContext context) {
// This method is rerun every time setState is called, for instance as done
// by the _incrementCounter method above.
//
// The Flutter framework has been optimized to make rerunning build methods
// fast, so that you can just rebuild anything that needs updating rather
// than having to individually change instances of widgets.
return Scaffold(
appBar: AppBar(
// TRY THIS: Try changing the color here to a specific color (to
// Colors.amber, perhaps?) and trigger a hot reload to see the AppBar
// change color while the other colors stay the same.
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
// Here we take the value from the MyHomePage object that was created by
// the App.build method, and use it to set our appbar title.
title: Text(widget.title),
),
body: Center(
// Center is a layout widget. It takes a single child and positions it
// in the middle of the parent.
child: Column(
// Column is also a layout widget. It takes a list of children and
// arranges them vertically. By default, it sizes itself to fit its
// children horizontally, and tries to be as tall as its parent.
//
// Column has various properties to control how it sizes itself and
// how it positions its children. Here we use mainAxisAlignment to
// center the children vertically; the main axis here is the vertical
// axis because Columns are vertical (the cross axis would be
// horizontal).
//
// TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint"
// action in the IDE, or press "p" in the console), to see the
// wireframe for each widget.
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.headlineMedium,
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: const Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}

View File

@ -0,0 +1,10 @@
import 'package:get/get.dart';
import 'home_logic.dart';
class HomeBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut(() => HomeLogic());
}
}

View File

@ -0,0 +1,24 @@
import 'package:get/get.dart';
import 'package:wgshare/common/models/common/base_structure_result.dart';
import 'package:wgshare/common/mixins/request_tool_mixin.dart';
import 'home_state.dart';
class HomeLogic extends GetxController with RequestToolMixin {
final HomeState state = HomeState();
@override
void onInit() {
super.onInit();
}
void getTask() async {
// BaseStructureResult<StadyTask> res = await getClient().getStadyTask(state.currentSubject.value.subjectId);
// if (res.data != null) {
// state.morningTask.value = res.data!.morningTask ?? MorningTask(00, '', '', '');
// state.nightTask.value = res.data!.nightTask ?? MorningTask(00, '', '', '');
// }
}
void out() async {}
}

View File

@ -0,0 +1,9 @@
import 'package:get/get.dart';
class HomeState {
HomeState() {
///Initialize variables
}
final RxString userName = ''.obs;
}

View File

@ -0,0 +1,49 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:wgshare/common/models/user_info_detail.dart';
import 'package:wgshare/common/store/user_store.dart';
import 'package:wgshare/routes/app_routes.dart';
import 'package:wgshare/utils/my_text.dart';
import 'package:wgshare/utils/storage.dart';
import 'home_logic.dart';
class HomePage extends StatefulWidget {
const HomePage({super.key});
@override
State<HomePage> createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
final logic = Get.find<HomeLogic>();
final state = Get.find<HomeLogic>().state;
Timer? _timer;
@override
bool get wantKeepAlive => true;
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
super.build(context);
return Scaffold(
backgroundColor: const Color(0xFFE5E7F4),
// appBar:Header('课堂记录'),
body: Center(child: quickText("首页")),
);
}
@override
void dispose() {
Get.delete<HomeLogic>();
_timer?.cancel();
super.dispose();
}
}

View File

@ -0,0 +1,10 @@
import 'package:get/get.dart';
import 'login_logic.dart';
class LoginBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut(() => LoginLogic());
}
}

View File

@ -0,0 +1,16 @@
import 'package:get/get.dart';
import 'package:wgshare/common/mixins/request_tool_mixin.dart';
import 'login_state.dart';
class LoginLogic extends GetxController with RequestToolMixin {
final LoginState state = LoginState();
@override
void dispose() {
super.dispose();
state.passwordFocus.dispose();
state.passwordController.dispose();
state.userNameController.dispose();
}
}

View File

@ -0,0 +1,14 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
class LoginState {
LoginState() {
///Initialize variables
}
late TextEditingController userNameController = TextEditingController();
late TextEditingController passwordController = TextEditingController();
late FocusNode passwordFocus = FocusNode();
late RxBool canLogin = true.obs;
}

View File

@ -0,0 +1,39 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:wgshare/utils/my_text.dart';
import 'package:wgshare/utils/utils.dart';
import 'login_logic.dart';
class LoginPage extends StatefulWidget {
const LoginPage({super.key});
@override
State<LoginPage> createState() => _LoginPageState();
}
class _LoginPageState extends State<LoginPage> {
final logic = Get.find<LoginLogic>();
final state = Get.find<LoginLogic>().state;
@override
void initState() {
Utils.hideKeyboard();
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.transparent,
resizeToAvoidBottomInset: false,
body: Center(child: quickText("登录页面")),
);
}
@override
void dispose() {
Get.delete<LoginLogic>();
super.dispose();
}
}

View File

@ -0,0 +1,10 @@
import 'package:get/get.dart';
import 'mine_logic.dart';
class MineBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut(() => MineLogic());
}
}

View File

@ -0,0 +1,13 @@
import 'package:get/get.dart';
import 'package:wgshare/common/mixins/request_tool_mixin.dart';
import 'mine_state.dart';
class MineLogic extends GetxController with RequestToolMixin {
final MineState state = MineState();
@override
void onClose() {
super.dispose();
}
}

View File

@ -0,0 +1,21 @@
import 'package:flutter/material.dart';
import 'package:wgshare/utils/my_text.dart';
class MinePage extends StatefulWidget {
const MinePage({super.key});
@override
State<MinePage> createState() => MminePageState();
}
class MminePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
@override
bool get wantKeepAlive => true;
@override
Widget build(BuildContext context) {
super.build(context);
return Center(child: quickText("我的页面"));
}
}

View File

@ -0,0 +1,6 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
class MineState {
MineState();
}

View File

@ -0,0 +1,149 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:wgshare/common/mixins/request_tool_mixin.dart';
import 'package:wgshare/common/models/user_info_detail.dart';
import 'package:wgshare/common/store/user_store.dart';
import 'package:wgshare/pages/homePage/home_logic.dart';
import 'package:wgshare/utils/storage.dart';
import 'package:wgshare/utils/toast_utils.dart';
import 'package:wgshare/routes/app_routes.dart';
import 'homePage/home_view.dart';
import 'minePage/mine_logic.dart';
class StartPage extends StatefulWidget {
const StartPage({super.key});
@override
State<StartPage> createState() => _StartPageState();
}
class _StartPageState extends State<StartPage> with RequestToolMixin {
DateTime? lastPopTime;
final _pageController = Get.find<PageIndexController>();
late final List<Widget> _bodyList;
@override
void initState() {
super.initState();
Get.put(HomeLogic());
Get.put(MineLogic());
_bodyList = [
const HomePage(),
];
String? token = UserStore.to.token;
UserInfoDetail? userInfoDetail = UserStore.to.userDetailInfo.value;
if ((token?.isNotEmpty ?? false) && userInfoDetail != null) {
UserStore.to.updateUserInfo(); //
} else {
///
Future.delayed(const Duration(milliseconds: 100)).then((e) {
// UserStore.to.erase();
// StorageService.to.erase();
// Get.offAllNamed(Routes.login);
});
}
}
@override
void dispose() {
Get.delete<PageIndexController>();
super.dispose();
}
/// icon
Widget getItemIcon(String icon) {
return Image.asset(
icon,
fit: BoxFit.contain,
width: 24.w,
height: 24.h,
);
}
@override
Widget build(BuildContext context) {
return WillPopScope(
child: Scaffold(
body: PageView(
controller: _pageController._pageIndexState.pageController,
physics: const BouncingScrollPhysics(),
onPageChanged: (index) {
_pageController._pageIndexState.pageIndex.value = index;
},
children: _bodyList,
),
bottomNavigationBar: Obx(() {
return BottomNavigationBar(
items: <BottomNavigationBarItem>[
BottomNavigationBarItem(
label: '首页',
icon: getItemIcon('assets/images/ic_home_normal.png'),
activeIcon: getItemIcon('assets/images/ic_home_press.png'),
),
BottomNavigationBarItem(
label: '我的',
icon: getItemIcon('assets/images/ic_mine_normal.png'),
activeIcon: getItemIcon('assets/images/ic_mine_press.png'),
),
],
//
type: BottomNavigationBarType.fixed,
//
currentIndex: _pageController._pageIndexState.pageIndex.value,
//tabBottom的点击监听
onTap: (index) {
print('appbar下标${index}');
_pageController._pageIndexState.pageController.jumpToPage(index);
},
);
}),
),
onWillPop: () async {
if (lastPopTime == null || DateTime.now().difference(lastPopTime!) > const Duration(seconds: 1)) {
lastPopTime = DateTime.now();
ToastUtils.getFluttertoast(context: context, msg: '连续两次返回就退出');
return Future.value(false);
} else {
lastPopTime = DateTime.now();
// 退app
return Future.value(true);
}
},
);
}
}
class PageIndexState {
PageIndexState({required this.pageController, this.showUpgrade = false});
RxInt pageIndex = 0.obs;
bool showUpgrade;
//
final PageController pageController;
}
class PageIndexController extends GetxController with RequestToolMixin {
late PageIndexState _pageIndexState;
@override
void onInit() {
_pageIndexState = PageIndexState(pageController: PageController());
super.onInit();
}
}
class StartPageIndexBinding extends Bindings {
@override
void dependencies() {
Get.lazyPut(() => PageIndexController());
}
}

View File

@ -0,0 +1,19 @@
import 'package:get/get.dart';
import 'package:wgshare/pages/homePage/home_binding.dart';
import 'package:wgshare/pages/homePage/home_view.dart';
import 'package:wgshare/pages/loginPage/login_binding.dart';
import 'package:wgshare/pages/loginPage/login_view.dart';
import 'package:wgshare/pages/minePage/mine_binding.dart';
import 'package:wgshare/pages/minePage/mine_page.dart';
import 'package:wgshare/pages/start_page.dart';
import 'app_routes.dart';
abstract class AppPages {
static final pages = [
GetPage(name: Routes.startPage, page: () => const StartPage(), binding: StartPageIndexBinding(), transition: Transition.noTransition),
GetPage(name: Routes.home, page: () => const HomePage(), binding: HomeBinding(), transition: Transition.noTransition),
GetPage(name: Routes.myPage, page: () => const MinePage(), binding: MineBinding(), transition: Transition.noTransition),
GetPage(name: Routes.login, page: () => const LoginPage(), binding: LoginBinding(), transition: Transition.noTransition),
];
}

View File

@ -0,0 +1,7 @@
// part of 'app_pages.dart';
abstract class Routes {
static const startPage = '/startPage'; //
static const home = '/home'; //
static const myPage = '/myPage'; //
static const login = '/login'; //
}

View File

@ -0,0 +1,58 @@
// debounce.dart
import 'dart:async';
import 'package:easy_debounce/easy_debounce.dart';
import 'package:easy_debounce/easy_throttle.dart';
import 'package:flutter/material.dart';
///
///
/// [func]:
/// [delay]:
VoidCallback debounce(Function func, [Duration delay = const Duration(milliseconds: 2000)]) {
Timer? timer;
target() {
if (timer?.isActive ?? false) {
timer?.cancel();
}
timer = Timer(delay, () {
func.call();
});
}
return target;
}
///
///
/// [func]:
VoidCallback throttle(Future Function() func) {
bool enable = true;
target() {
if (enable == true) {
enable = false;
func().whenComplete(() {
enable = true;
});
}
}
return target;
}
///
///
/// [func]:
bool easyThrottle(String tagId, EasyThrottleCallback onExecute,
{Duration duration = const Duration(milliseconds: 300), EasyThrottleCallback? onAfter}) {
return EasyThrottle.throttle(
tagId, // <-- An ID for this particular throttler
duration, // <-- The throttle duration
onExecute, // <-- The target method
onAfter: onAfter // <-- Optional callback, called after the duration has passed
);
}
void easyDebounce(String tagId, {Duration duration = const Duration(milliseconds: 300), required EasyDebounceCallback onExecute}) =>
EasyDebounce.debounce(tagId, duration, onExecute);

View File

@ -0,0 +1,159 @@
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
import 'package:functional_widget_annotation/functional_widget_annotation.dart';
import 'package:get/get.dart';
import 'package:photo_view/photo_view.dart';
import 'package:photo_view/photo_view_gallery.dart';
import 'package:wgshare/utils/my_text.dart';
part 'cached_network_img.g.dart';
@hwidget
Widget $theCachedNetworkImage(ImageWidgetBuilder imageBuilder, {required String imageUrl}) {
UseCachedImgRefresh useImgRefsh = UseCachedImgRefresh.use();
return CachedNetworkImage(
key: useImgRefsh.imageKey.value,
cacheKey: imageUrl,
fit: BoxFit.fitWidth,
width: double.infinity,
imageUrl: imageUrl,
imageBuilder: imageBuilder,
// placeholder: (context, url) => const CircularProgressIndicator(),
placeholder: (context, url) => Center(child: SpinKitWave(color: Theme.of(context).primaryColor, size: 50.r)),
errorListener: (e) {
print('图片报错.............$e');
},
errorWidget: (context, url, error) {
return GestureDetector(
onTap: () => (useImgRefsh.imageKey.value = UniqueKey()),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
'assets/images/test_paper_loading_failed.png',
fit: BoxFit.cover,
),
quickText('加载失败,点击重试', color: const Color.fromRGBO(148, 163, 182, 1), size: 12.sp),
],
),
);
},
);
}
// CachedNetworkImage
class UseCachedImgRefresh {
ValueNotifier<int> refreshNumber;
ValueNotifier<Key> imageKey;
UseCachedImgRefresh._({required this.refreshNumber, required this.imageKey});
//
factory UseCachedImgRefresh.use() {
return UseCachedImgRefresh._(refreshNumber: useState(0), imageKey: useState(UniqueKey()));
}
}
@hwidget
Widget $photoViewGallery(BuildContext context, {int? initIndex, required List<String> urls}) {
var useIndex = useState<int>(initIndex != null && initIndex >= 0 ? initIndex : 0);
var pageController = usePageController();
useEffect(() {
if (initIndex != null && initIndex > 0) Future.delayed(Duration.zero, () => pageController.jumpToPage(initIndex));
return () {};
}, []);
return SizedBox(
width: Get.width / 0.7,
height: Get.height,
// child: PhotoView(imageProvider: NetworkImage(url)),
child: Column(
children: [
Expanded(
child: Stack(
children: [
PhotoViewGallery.builder(
scrollPhysics: const BouncingScrollPhysics(),
backgroundDecoration: const BoxDecoration(),
builder: (BuildContext context, int index) {
return PhotoViewGalleryPageOptions(
imageProvider: NetworkImage(urls[index]),
initialScale: PhotoViewComputedScale.contained,
);
},
itemCount: urls.length,
pageController: pageController,
onPageChanged: (i) {
useIndex.value = i;
},
loadingBuilder: (context, event) {
return Center(
child: SizedBox(
width: 20.r,
height: 20.r,
child: CircularProgressIndicator(
value: event == null ? 0 : (event.cumulativeBytesLoaded / (event.expectedTotalBytes ?? 1)),
),
),
);
},
),
Positioned(
right: 60.w,
top: 60.h,
child: IconButton(
onPressed: () => Navigator.pop(context),
icon: Icon(Icons.close, size: 80.r, color: Colors.white),
),
),
Positioned(
right: 100.w,
bottom: 0.h,
child: quickText("${useIndex.value + 1}", size: 28.sp, color: Colors.white, fontWeight: FontWeight.bold),
),
],
),
),
Container(
height: 200.h,
width: double.infinity,
margin: EdgeInsets.only(bottom: 2.h),
padding: EdgeInsets.symmetric(horizontal: 200.w),
alignment: Alignment.center,
child: ListView.builder(
itemCount: urls.length,
scrollDirection: Axis.horizontal,
itemBuilder: (BuildContext context, int index) {
return InkWell(
onTap: () => pageController.jumpToPage(index),
child: Container(
width: 200.w,
height: 200.h,
margin: EdgeInsets.symmetric(horizontal: 20.w),
decoration: BoxDecoration(
border: index == useIndex.value ? Border.all(color: Colors.white, width: 2) : null,
),
child: $TheCachedNetworkImage(
(_, ImageProvider imageProvider) {
return Image(
image: imageProvider,
fit: BoxFit.fitWidth,
);
},
imageUrl: urls[index],
),
),
);
},
),
),
],
),
);
}

View File

@ -0,0 +1,29 @@
import 'package:flutter/cupertino.dart';
import 'package:wgshare/common/config/colorUtils.dart';
// Text使用
Text quickText(text,
{double? size,
double? wordSpacing,
Color color = CommonColors.defaultColor,
TextAlign? align,
FontWeight? fontWeight,
TextOverflow overflow = TextOverflow.ellipsis,
int maxLines = 1,
bool noTextPadding = false,
TextDecoration decoration = TextDecoration.none}) {
return Text(
text.toString(),
textAlign: align,
maxLines: maxLines,
overflow: overflow,
style: TextStyle(
decoration: decoration,
fontSize: size,
color: color,
height: noTextPadding ? 1 : null,
fontWeight: fontWeight,
wordSpacing: wordSpacing,
),
);
}

View File

@ -0,0 +1,23 @@
import 'package:package_info_plus/package_info_plus.dart';
class PackageInfoUtil {
final PackageInfo packageInfo;
//
static PackageInfoUtil? _instance;
//
PackageInfoUtil._(this.packageInfo) {
//
}
static PackageInfoUtil getInstance([PackageInfo? packageName]) {
//
_instance ??= PackageInfoUtil._(packageName!);
return _instance!;
}
//
static Future<PackageInfo> init() async {
var packageInfo = await PackageInfo.fromPlatform();
return packageInfo;
}
}

View File

@ -0,0 +1,34 @@
import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';
class StorageService extends GetxService {
static StorageService get to => Get.find();
late final GetStorage _getStorage;
get storage => _getStorage;
Future<StorageService> init() async {
await GetStorage.init();
_getStorage = GetStorage();
return this;
}
T? read<T>(String key) {
return _getStorage.read<T>(key);
}
Future<void> write(String key, dynamic value) async {
return await _getStorage.write(key, value);
}
Future<void> remove(String key) async {
return await _getStorage.remove(key);
}
bool hasData(String key) {
return _getStorage.hasData(key);
}
Future erase() async {
await _getStorage.erase();
}
}

View File

@ -0,0 +1,73 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
class ToastUtils {
static void getFluttertoast({
required BuildContext context,
required String msg,
Toast? toastLength,
int timeInSecForIosWeb = 1,
double? fontSize,
ToastGravity? gravity,
Color? backgroundColor,
Color? textColor,
}) {
Fluttertoast.showToast(
msg: msg,
toastLength: toastLength ?? Toast.LENGTH_SHORT,
gravity: gravity ?? ToastGravity.CENTER,
timeInSecForIosWeb: timeInSecForIosWeb,
backgroundColor: backgroundColor ?? Theme.of(context).primaryColor,
textColor: textColor ?? Colors.white,
fontSize: fontSize ?? 16.sp,
);
}
static void getErrFluttertoast({
required BuildContext context,
required String msg,
ToastGravity gravity = ToastGravity.BOTTOM,
Color backgroundColor = Colors.grey,
Toast? toastLength,
int timeInSecForIosWeb = 1,
double? fontSize,
Color? textColor,
}) {
ToastUtils.getFluttertoast(
context: context,
msg: msg,
toastLength: toastLength ?? Toast.LENGTH_SHORT,
gravity: gravity,
timeInSecForIosWeb: timeInSecForIosWeb,
backgroundColor: backgroundColor,
textColor: textColor ?? Colors.white,
fontSize: fontSize ?? 16.sp,
);
}
static showError(String showMsg, {Duration? duration}) {
EasyLoading.showError(showMsg, duration: duration);
}
static showLoading() {
EasyLoading.show(status: 'loading...');
}
static showInfo(String showMsg, {Duration? duration}) {
EasyLoading.showInfo(showMsg, duration: duration);
}
static showInfoSimple(String showMsg, int microseconds) {
EasyLoading.showInfo(showMsg, duration: Duration(microseconds: microseconds));
}
static showSuccess(String showMsg, {Duration? duration}) {
EasyLoading.showSuccess(showMsg, duration: duration);
}
static dismiss() {
EasyLoading.dismiss();
}
}

View File

@ -0,0 +1,134 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'dart:math';
class Utils {
static Utils? _instance;
Utils._internal();
static Utils getInstance() {
_instance ??= Utils._internal();
return _instance!;
}
///
static void hideKeyboard() {
FocusScopeNode? currentFocus = Get.focusScope?.nearestScope;
if (currentFocus == null) {
return;
}
if (!currentFocus.hasPrimaryFocus && currentFocus.focusedChild != null) {
FocusManager.instance.primaryFocus?.unfocus();
}
}
void setTimeOut(int seconds, call) => Future.delayed(Duration(seconds: seconds), call);
Future<dynamic> setTimeOutMilliseconds(int milliseconds, call) => Future.delayed(Duration(milliseconds: milliseconds), call);
//
static bool isPad([double mobilePhoneScale = 1.2]) {
return ScreenUtil().scaleWidth > mobilePhoneScale;
}
static String getDoubleRemoveZero(double? val, [String? defaultVal]) {
try {
if (val == null) throw Exception('数据为空');
List<String> _valArr = val.toString().split('.');
if (_valArr.length >= 2) {
if (int.parse(_valArr[1]) == 0) {
return val.toInt().toString();
}
return val.toString();
}
return val.toInt().toString();
} catch (e) {
return defaultVal ?? '';
}
}
///
static String doubleToStringAsFixed(double val, {int fractionDigits = 2}) {
return val.toStringAsFixed(fractionDigits).replaceAll(RegExp(r'\.0*$'), '');
}
static calcRate(int divisor, int dividend) {
if (dividend != 0) {
return ((100 * divisor) / dividend);
// return ((100 * divisor) / dividend).toStringAsFixed(0);
} else {
return 0.0;
}
}
///
static String second2HMS(int sec, {bool isEasy = false}) {
String hms = "0";
if (!isEasy) hms = "0秒";
if (sec > 0) {
int h = sec ~/ 3600;
int m = (sec % 3600) ~/ 60;
int s = sec % 60;
if (h > 0) {
hms = "$h时$m分$s秒";
} else {
if (m > 0) {
hms = "$m分$s秒";
} else {
hms = "$s秒";
}
}
}
return hms;
}
static DateTime getWeekStartDate() {
DateTime now = DateTime.now();
int dayOfWeek = now.weekday; // 17
int diff = dayOfWeek - 1; //
if (diff < 0) {
diff += 7; //
}
return now.subtract(Duration(days: diff)); //
}
static DateTime getWeekEndDate() {
DateTime now = DateTime.now();
int dayOfWeek = now.weekday; //
int diff = 7 - dayOfWeek; //
if (diff == 0) {
diff = 7; //
}
return now.add(Duration(days: diff)); //
}
static String getQuestionSource(int type) {
var str = '';
switch (type) {
case 1:
str = '预习';
break;
case 3:
str = '复习';
break;
case 4:
str = '作业';
break;
case 5:
str = '考试';
break;
}
return str;
}
}
//
bool isPad([double mobilePhoneScale = 1.2]) {
return ScreenUtil().scaleWidth > mobilePhoneScale;
}
void toUpState(Function(void Function()) setState, VoidCallback fn, bool mounted) {
if (mounted) setState(fn);
}

Some files were not shown because too many files have changed in this diff Show More