Skip to content

Commit c310e39

Browse files
committed
fix
1 parent c571f15 commit c310e39

File tree

16 files changed

+433
-45
lines changed

16 files changed

+433
-45
lines changed

.vscode/launch.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
// 使用 IntelliSense 了解相关属性。
3+
// 悬停以查看现有属性的描述。
4+
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "tform",
9+
"request": "launch",
10+
"type": "dart"
11+
},
12+
{
13+
"name": "example",
14+
"cwd": "example",
15+
"request": "launch",
16+
"type": "dart"
17+
}
18+
]
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package com.example.example
2+
3+
import io.flutter.embedding.android.FlutterActivity
4+
5+
class MainActivity: FlutterActivity() {
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Modify this file to customize your launch splash screen -->
3+
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4+
<item android:drawable="?android:colorBackground" />
5+
6+
<!-- You can insert your own image assets here -->
7+
<!-- <item>
8+
<bitmap
9+
android:gravity="center"
10+
android:src="@mipmap/launch_image" />
11+
</item> -->
12+
</layer-list>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
4+
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
5+
<!-- Show a splash screen on the activity. Automatically removed when
6+
Flutter draws its first frame -->
7+
<item name="android:windowBackground">@drawable/launch_background</item>
8+
</style>
9+
<!-- Theme applied to the Android Window as soon as the process has started.
10+
This theme determines the color of the Android Window while your
11+
Flutter UI initializes, as well as behind your Flutter UI while its
12+
running.
13+
14+
This Theme is only used starting with V2 of Flutter's Android embedding. -->
15+
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
16+
<item name="android:windowBackground">?android:colorBackground</item>
17+
</style>
18+
</resources>

example/ios/Podfile.lock

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
PODS:
2+
- Flutter (1.0.0)
3+
- fluttertoast (0.0.2):
4+
- Flutter
5+
- Toast
6+
- image_picker (0.0.1):
7+
- Flutter
8+
- Toast (4.0.0)
9+
10+
DEPENDENCIES:
11+
- Flutter (from `Flutter`)
12+
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
13+
- image_picker (from `.symlinks/plugins/image_picker/ios`)
14+
15+
SPEC REPOS:
16+
trunk:
17+
- Toast
18+
19+
EXTERNAL SOURCES:
20+
Flutter:
21+
:path: Flutter
22+
fluttertoast:
23+
:path: ".symlinks/plugins/fluttertoast/ios"
24+
image_picker:
25+
:path: ".symlinks/plugins/image_picker/ios"
26+
27+
SPEC CHECKSUMS:
28+
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
29+
fluttertoast: 6122fa75143e992b1d3470f61000f591a798cc58
30+
image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09
31+
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
32+
33+
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
34+
35+
COCOAPODS: 1.9.3

example/ios/Runner.xcodeproj/project.pbxproj

+85-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 46;
6+
objectVersion = 50;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -13,6 +13,7 @@
1313
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
1414
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
1515
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
16+
CC6BAFEA6D63A0FC62EF129B /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB6479A4CAD795632082FE01 /* Pods_Runner.framework */; };
1617
/* End PBXBuildFile section */
1718

1819
/* Begin PBXCopyFilesBuildPhase section */
@@ -29,6 +30,7 @@
2930
/* End PBXCopyFilesBuildPhase section */
3031

3132
/* Begin PBXFileReference section */
33+
0639F97EF8C3B5F30B7B44BA /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
3234
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
3335
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
3436
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
@@ -42,13 +44,17 @@
4244
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
4345
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
4446
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
47+
980FF74070EBF322C040C918 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
48+
C7B3F3346A005FDF0B67DD73 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
49+
EB6479A4CAD795632082FE01 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4550
/* End PBXFileReference section */
4651

4752
/* Begin PBXFrameworksBuildPhase section */
4853
97C146EB1CF9000F007C117D /* Frameworks */ = {
4954
isa = PBXFrameworksBuildPhase;
5055
buildActionMask = 2147483647;
5156
files = (
57+
CC6BAFEA6D63A0FC62EF129B /* Pods_Runner.framework in Frameworks */,
5258
);
5359
runOnlyForDeploymentPostprocessing = 0;
5460
};
@@ -72,6 +78,8 @@
7278
9740EEB11CF90186004384FC /* Flutter */,
7379
97C146F01CF9000F007C117D /* Runner */,
7480
97C146EF1CF9000F007C117D /* Products */,
81+
F86223A48C7329FDF5EAC02E /* Pods */,
82+
F5B746C02ED823B8E6BB89FD /* Frameworks */,
7583
);
7684
sourceTree = "<group>";
7785
};
@@ -98,19 +106,39 @@
98106
path = Runner;
99107
sourceTree = "<group>";
100108
};
109+
F5B746C02ED823B8E6BB89FD /* Frameworks */ = {
110+
isa = PBXGroup;
111+
children = (
112+
EB6479A4CAD795632082FE01 /* Pods_Runner.framework */,
113+
);
114+
name = Frameworks;
115+
sourceTree = "<group>";
116+
};
117+
F86223A48C7329FDF5EAC02E /* Pods */ = {
118+
isa = PBXGroup;
119+
children = (
120+
980FF74070EBF322C040C918 /* Pods-Runner.debug.xcconfig */,
121+
C7B3F3346A005FDF0B67DD73 /* Pods-Runner.release.xcconfig */,
122+
0639F97EF8C3B5F30B7B44BA /* Pods-Runner.profile.xcconfig */,
123+
);
124+
path = Pods;
125+
sourceTree = "<group>";
126+
};
101127
/* End PBXGroup section */
102128

103129
/* Begin PBXNativeTarget section */
104130
97C146ED1CF9000F007C117D /* Runner */ = {
105131
isa = PBXNativeTarget;
106132
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
107133
buildPhases = (
134+
77F20F3553B25676BD473CE3 /* [CP] Check Pods Manifest.lock */,
108135
9740EEB61CF901F6004384FC /* Run Script */,
109136
97C146EA1CF9000F007C117D /* Sources */,
110137
97C146EB1CF9000F007C117D /* Frameworks */,
111138
97C146EC1CF9000F007C117D /* Resources */,
112139
9705A1C41CF9048500538489 /* Embed Frameworks */,
113140
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
141+
DF1B56A7416165EE213280FA /* [CP] Embed Pods Frameworks */,
114142
);
115143
buildRules = (
116144
);
@@ -183,6 +211,28 @@
183211
shellPath = /bin/sh;
184212
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
185213
};
214+
77F20F3553B25676BD473CE3 /* [CP] Check Pods Manifest.lock */ = {
215+
isa = PBXShellScriptBuildPhase;
216+
buildActionMask = 2147483647;
217+
files = (
218+
);
219+
inputFileListPaths = (
220+
);
221+
inputPaths = (
222+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
223+
"${PODS_ROOT}/Manifest.lock",
224+
);
225+
name = "[CP] Check Pods Manifest.lock";
226+
outputFileListPaths = (
227+
);
228+
outputPaths = (
229+
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
230+
);
231+
runOnlyForDeploymentPostprocessing = 0;
232+
shellPath = /bin/sh;
233+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
234+
showEnvVarsInLog = 0;
235+
};
186236
9740EEB61CF901F6004384FC /* Run Script */ = {
187237
isa = PBXShellScriptBuildPhase;
188238
buildActionMask = 2147483647;
@@ -197,6 +247,23 @@
197247
shellPath = /bin/sh;
198248
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
199249
};
250+
DF1B56A7416165EE213280FA /* [CP] Embed Pods Frameworks */ = {
251+
isa = PBXShellScriptBuildPhase;
252+
buildActionMask = 2147483647;
253+
files = (
254+
);
255+
inputFileListPaths = (
256+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
257+
);
258+
name = "[CP] Embed Pods Frameworks";
259+
outputFileListPaths = (
260+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
261+
);
262+
runOnlyForDeploymentPostprocessing = 0;
263+
shellPath = /bin/sh;
264+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
265+
showEnvVarsInLog = 0;
266+
};
200267
/* End PBXShellScriptBuildPhase section */
201268

202269
/* Begin PBXSourcesBuildPhase section */
@@ -288,13 +355,17 @@
288355
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
289356
CLANG_ENABLE_MODULES = YES;
290357
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
358+
DEVELOPMENT_TEAM = 685MD7243L;
291359
ENABLE_BITCODE = NO;
292360
FRAMEWORK_SEARCH_PATHS = (
293361
"$(inherited)",
294362
"$(PROJECT_DIR)/Flutter",
295363
);
296364
INFOPLIST_FILE = Runner/Info.plist;
297-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
365+
LD_RUNPATH_SEARCH_PATHS = (
366+
"$(inherited)",
367+
"@executable_path/Frameworks",
368+
);
298369
LIBRARY_SEARCH_PATHS = (
299370
"$(inherited)",
300371
"$(PROJECT_DIR)/Flutter",
@@ -407,7 +478,8 @@
407478
MTL_ENABLE_DEBUG_INFO = NO;
408479
SDKROOT = iphoneos;
409480
SUPPORTED_PLATFORMS = iphoneos;
410-
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
481+
SWIFT_COMPILATION_MODE = wholemodule;
482+
SWIFT_OPTIMIZATION_LEVEL = "-O";
411483
TARGETED_DEVICE_FAMILY = "1,2";
412484
VALIDATE_PRODUCT = YES;
413485
};
@@ -420,13 +492,17 @@
420492
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
421493
CLANG_ENABLE_MODULES = YES;
422494
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
495+
DEVELOPMENT_TEAM = 685MD7243L;
423496
ENABLE_BITCODE = NO;
424497
FRAMEWORK_SEARCH_PATHS = (
425498
"$(inherited)",
426499
"$(PROJECT_DIR)/Flutter",
427500
);
428501
INFOPLIST_FILE = Runner/Info.plist;
429-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
502+
LD_RUNPATH_SEARCH_PATHS = (
503+
"$(inherited)",
504+
"@executable_path/Frameworks",
505+
);
430506
LIBRARY_SEARCH_PATHS = (
431507
"$(inherited)",
432508
"$(PROJECT_DIR)/Flutter",
@@ -447,13 +523,17 @@
447523
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
448524
CLANG_ENABLE_MODULES = YES;
449525
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
526+
DEVELOPMENT_TEAM = 685MD7243L;
450527
ENABLE_BITCODE = NO;
451528
FRAMEWORK_SEARCH_PATHS = (
452529
"$(inherited)",
453530
"$(PROJECT_DIR)/Flutter",
454531
);
455532
INFOPLIST_FILE = Runner/Info.plist;
456-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
533+
LD_RUNPATH_SEARCH_PATHS = (
534+
"$(inherited)",
535+
"@executable_path/Frameworks",
536+
);
457537
LIBRARY_SEARCH_PATHS = (
458538
"$(inherited)",
459539
"$(PROJECT_DIR)/Flutter",

example/ios/Runner.xcworkspace/contents.xcworkspacedata

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/lib/basic/form_page.dart

+25-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ List<TFormRow> buildFormRows() {
5555
TFormRow.input(
5656
title: "姓名",
5757
placeholder: "请输入姓名",
58-
value: "张二蛋",
58+
value: "呀哈哈",
5959
fieldConfig: TFormFieldConfig(
6060
height: 100,
6161
titleStyle: TextStyle(color: Colors.red, fontSize: 20),
@@ -117,6 +117,30 @@ List<TFormRow> buildFormRows() {
117117
);
118118
},
119119
),
120+
TFormRow.customSelector(
121+
title: "婚姻状况",
122+
placeholder: "请选择",
123+
state: [
124+
["未婚", "已婚"],
125+
[
126+
TFormRow.input(
127+
title: "配偶姓名", placeholder: "请输入配偶姓名", requireStar: true),
128+
TFormRow.input(
129+
title: "配偶电话", placeholder: "请输入配偶电话", requireStar: true)
130+
]
131+
],
132+
onTap: (context, row) async {
133+
String value = await showPicker(row.state[0], context);
134+
if (row.value != value) {
135+
if (value == "已婚") {
136+
TForm.of(context).insert(row, row.state[1]);
137+
} else {
138+
TForm.of(context).delete(row.state[1]);
139+
}
140+
}
141+
return value;
142+
},
143+
),
120144
TFormRow.selector(
121145
title: "学历",
122146
placeholder: "请选择",

0 commit comments

Comments
 (0)