Skip to content

Commit e83c393

Browse files
committed
chore:项目骨架搭建
1 parent 4ae7242 commit e83c393

File tree

11 files changed

+255
-92
lines changed

11 files changed

+255
-92
lines changed

fonts/iconfont.ttf

2.24 KB
Binary file not shown.

images/logo.png

61.4 KB
Loading

ios/Podfile.lock

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
PODS:
2+
- Flutter (1.0.0)
3+
- flutter_plugin_android_lifecycle (0.0.1):
4+
- Flutter
5+
- image_picker (0.0.1):
6+
- Flutter
7+
- shared_preferences (0.0.1):
8+
- Flutter
9+
- shared_preferences_macos (0.0.1):
10+
- Flutter
11+
- shared_preferences_web (0.0.1):
12+
- Flutter
13+
14+
DEPENDENCIES:
15+
- Flutter (from `Flutter`)
16+
- flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`)
17+
- image_picker (from `.symlinks/plugins/image_picker/ios`)
18+
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
19+
- shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`)
20+
- shared_preferences_web (from `.symlinks/plugins/shared_preferences_web/ios`)
21+
22+
EXTERNAL SOURCES:
23+
Flutter:
24+
:path: Flutter
25+
flutter_plugin_android_lifecycle:
26+
:path: ".symlinks/plugins/flutter_plugin_android_lifecycle/ios"
27+
image_picker:
28+
:path: ".symlinks/plugins/image_picker/ios"
29+
shared_preferences:
30+
:path: ".symlinks/plugins/shared_preferences/ios"
31+
shared_preferences_macos:
32+
:path: ".symlinks/plugins/shared_preferences_macos/ios"
33+
shared_preferences_web:
34+
:path: ".symlinks/plugins/shared_preferences_web/ios"
35+
36+
SPEC CHECKSUMS:
37+
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
38+
flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35
39+
image_picker: 66aa71bc96850a90590a35d4c4a2907b0d823109
40+
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
41+
shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087
42+
shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9
43+
44+
PODFILE CHECKSUM: c34e2287a9ccaa606aeceab922830efb9a6ff69a
45+
46+
COCOAPODS: 1.9.1

ios/Runner.xcodeproj/project.pbxproj

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
1111
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
1212
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
13+
84376485DD5095D2BB26E859 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E87A03DE33DA1F3B804FA9EA /* Pods_Runner.framework */; };
1314
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
1415
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
1516
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
@@ -31,7 +32,9 @@
3132
/* Begin PBXFileReference section */
3233
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
3334
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
35+
21063AA02F2E882982C4E659 /* 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>"; };
3436
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
37+
637F3669458163FCEED9B39E /* 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>"; };
3538
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
3639
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
3740
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
@@ -42,19 +45,30 @@
4245
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
4346
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
4447
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
48+
B32E14FD31EFC55272D7FDB1 /* 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>"; };
49+
E87A03DE33DA1F3B804FA9EA /* 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+
84376485DD5095D2BB26E859 /* Pods_Runner.framework in Frameworks */,
5258
);
5359
runOnlyForDeploymentPostprocessing = 0;
5460
};
5561
/* End PBXFrameworksBuildPhase section */
5662

5763
/* Begin PBXGroup section */
64+
7CE84B1E92D5FB0EB0FBF930 /* Frameworks */ = {
65+
isa = PBXGroup;
66+
children = (
67+
E87A03DE33DA1F3B804FA9EA /* Pods_Runner.framework */,
68+
);
69+
name = Frameworks;
70+
sourceTree = "<group>";
71+
};
5872
9740EEB11CF90186004384FC /* Flutter */ = {
5973
isa = PBXGroup;
6074
children = (
@@ -72,6 +86,8 @@
7286
9740EEB11CF90186004384FC /* Flutter */,
7387
97C146F01CF9000F007C117D /* Runner */,
7488
97C146EF1CF9000F007C117D /* Products */,
89+
E94BD9192A19E6E2F15B9255 /* Pods */,
90+
7CE84B1E92D5FB0EB0FBF930 /* Frameworks */,
7591
);
7692
sourceTree = "<group>";
7793
};
@@ -106,19 +122,32 @@
106122
name = "Supporting Files";
107123
sourceTree = "<group>";
108124
};
125+
E94BD9192A19E6E2F15B9255 /* Pods */ = {
126+
isa = PBXGroup;
127+
children = (
128+
B32E14FD31EFC55272D7FDB1 /* Pods-Runner.debug.xcconfig */,
129+
21063AA02F2E882982C4E659 /* Pods-Runner.release.xcconfig */,
130+
637F3669458163FCEED9B39E /* Pods-Runner.profile.xcconfig */,
131+
);
132+
name = Pods;
133+
path = Pods;
134+
sourceTree = "<group>";
135+
};
109136
/* End PBXGroup section */
110137

111138
/* Begin PBXNativeTarget section */
112139
97C146ED1CF9000F007C117D /* Runner */ = {
113140
isa = PBXNativeTarget;
114141
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
115142
buildPhases = (
143+
41EE7901A9ED8A5F81428CCD /* [CP] Check Pods Manifest.lock */,
116144
9740EEB61CF901F6004384FC /* Run Script */,
117145
97C146EA1CF9000F007C117D /* Sources */,
118146
97C146EB1CF9000F007C117D /* Frameworks */,
119147
97C146EC1CF9000F007C117D /* Resources */,
120148
9705A1C41CF9048500538489 /* Embed Frameworks */,
121149
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
150+
B3066D5D06DDDD62561CB406 /* [CP] Embed Pods Frameworks */,
122151
);
123152
buildRules = (
124153
);
@@ -191,6 +220,28 @@
191220
shellPath = /bin/sh;
192221
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
193222
};
223+
41EE7901A9ED8A5F81428CCD /* [CP] Check Pods Manifest.lock */ = {
224+
isa = PBXShellScriptBuildPhase;
225+
buildActionMask = 2147483647;
226+
files = (
227+
);
228+
inputFileListPaths = (
229+
);
230+
inputPaths = (
231+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
232+
"${PODS_ROOT}/Manifest.lock",
233+
);
234+
name = "[CP] Check Pods Manifest.lock";
235+
outputFileListPaths = (
236+
);
237+
outputPaths = (
238+
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
239+
);
240+
runOnlyForDeploymentPostprocessing = 0;
241+
shellPath = /bin/sh;
242+
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";
243+
showEnvVarsInLog = 0;
244+
};
194245
9740EEB61CF901F6004384FC /* Run Script */ = {
195246
isa = PBXShellScriptBuildPhase;
196247
buildActionMask = 2147483647;
@@ -205,6 +256,30 @@
205256
shellPath = /bin/sh;
206257
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
207258
};
259+
B3066D5D06DDDD62561CB406 /* [CP] Embed Pods Frameworks */ = {
260+
isa = PBXShellScriptBuildPhase;
261+
buildActionMask = 2147483647;
262+
files = (
263+
);
264+
inputPaths = (
265+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
266+
"${PODS_ROOT}/../Flutter/Flutter.framework",
267+
"${BUILT_PRODUCTS_DIR}/flutter_plugin_android_lifecycle/flutter_plugin_android_lifecycle.framework",
268+
"${BUILT_PRODUCTS_DIR}/image_picker/image_picker.framework",
269+
"${BUILT_PRODUCTS_DIR}/shared_preferences/shared_preferences.framework",
270+
);
271+
name = "[CP] Embed Pods Frameworks";
272+
outputPaths = (
273+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
274+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_plugin_android_lifecycle.framework",
275+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_picker.framework",
276+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences.framework",
277+
);
278+
runOnlyForDeploymentPostprocessing = 0;
279+
shellPath = /bin/sh;
280+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
281+
showEnvVarsInLog = 0;
282+
};
208283
/* End PBXShellScriptBuildPhase section */
209284

210285
/* Begin PBXSourcesBuildPhase section */

ios/Runner.xcworkspace/contents.xcworkspacedata

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/main.dart

Lines changed: 7 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import 'package:flutter/material.dart';
22

3+
import 'page/main_tabs.dart';
4+
import 'route/route.dart';
5+
36
void main() {
47
runApp(MyApp());
58
}
@@ -9,7 +12,7 @@ class MyApp extends StatelessWidget {
912
@override
1013
Widget build(BuildContext context) {
1114
return MaterialApp(
12-
title: 'Flutter Demo',
15+
debugShowCheckedModeBanner: false,
1316
theme: ThemeData(
1417
// This is the theme of your application.
1518
//
@@ -26,92 +29,8 @@ class MyApp extends StatelessWidget {
2629
// closer together (more dense) than on mobile platforms.
2730
visualDensity: VisualDensity.adaptivePlatformDensity,
2831
),
29-
home: MyHomePage(title: 'Flutter Demo Home Page'),
30-
);
31-
}
32-
}
33-
34-
class MyHomePage extends StatefulWidget {
35-
MyHomePage({Key key, this.title}) : super(key: key);
36-
37-
// This widget is the home page of your application. It is stateful, meaning
38-
// that it has a State object (defined below) that contains fields that affect
39-
// how it looks.
40-
41-
// This class is the configuration for the state. It holds the values (in this
42-
// case the title) provided by the parent (in this case the App widget) and
43-
// used by the build method of the State. Fields in a Widget subclass are
44-
// always marked "final".
45-
46-
final String title;
47-
48-
@override
49-
_MyHomePageState createState() => _MyHomePageState();
50-
}
51-
52-
class _MyHomePageState extends State<MyHomePage> {
53-
int _counter = 0;
54-
55-
void _incrementCounter() {
56-
setState(() {
57-
// This call to setState tells the Flutter framework that something has
58-
// changed in this State, which causes it to rerun the build method below
59-
// so that the display can reflect the updated values. If we changed
60-
// _counter without calling setState(), then the build method would not be
61-
// called again, and so nothing would appear to happen.
62-
_counter++;
63-
});
64-
}
65-
66-
@override
67-
Widget build(BuildContext context) {
68-
// This method is rerun every time setState is called, for instance as done
69-
// by the _incrementCounter method above.
70-
//
71-
// The Flutter framework has been optimized to make rerunning build methods
72-
// fast, so that you can just rebuild anything that needs updating rather
73-
// than having to individually change instances of widgets.
74-
return Scaffold(
75-
appBar: AppBar(
76-
// Here we take the value from the MyHomePage object that was created by
77-
// the App.build method, and use it to set our appbar title.
78-
title: Text(widget.title),
79-
),
80-
body: Center(
81-
// Center is a layout widget. It takes a single child and positions it
82-
// in the middle of the parent.
83-
child: Column(
84-
// Column is also a layout widget. It takes a list of children and
85-
// arranges them vertically. By default, it sizes itself to fit its
86-
// children horizontally, and tries to be as tall as its parent.
87-
//
88-
// Invoke "debug painting" (press "p" in the console, choose the
89-
// "Toggle Debug Paint" action from the Flutter Inspector in Android
90-
// Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
91-
// to see the wireframe for each widget.
92-
//
93-
// Column has various properties to control how it sizes itself and
94-
// how it positions its children. Here we use mainAxisAlignment to
95-
// center the children vertically; the main axis here is the vertical
96-
// axis because Columns are vertical (the cross axis would be
97-
// horizontal).
98-
mainAxisAlignment: MainAxisAlignment.center,
99-
children: <Widget>[
100-
Text(
101-
'You have pushed the button this many times:',
102-
),
103-
Text(
104-
'$_counter',
105-
style: Theme.of(context).textTheme.headline4,
106-
),
107-
],
108-
),
109-
),
110-
floatingActionButton: FloatingActionButton(
111-
onPressed: _incrementCounter,
112-
tooltip: 'Increment',
113-
child: Icon(Icons.add),
114-
), // This trailing comma makes auto-formatting nicer for build methods.
32+
initialRoute: '/',
33+
routes: routes,
11534
);
11635
}
117-
}
36+
}

lib/page/album.dart

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import 'package:flutter/material.dart';
2+
3+
class AlbumPage extends StatelessWidget {
4+
5+
static const routeName = '/album';
6+
7+
@override
8+
Widget build(BuildContext context) {
9+
return Scaffold(
10+
appBar: AppBar(
11+
title: Text('相册'),
12+
centerTitle: true,
13+
),
14+
);
15+
}
16+
17+
}

lib/page/main_tabs.dart

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import 'package:flutter/material.dart';
2+
3+
import 'album.dart';
4+
import 'setting.dart';
5+
6+
class MainTabsPage extends StatefulWidget {
7+
8+
static const routeName = '/';
9+
10+
final int selectedIndex;
11+
12+
MainTabsPage({this.selectedIndex = 0});
13+
14+
@override
15+
_MainTabsPageState createState() => _MainTabsPageState(this.selectedIndex);
16+
17+
}
18+
19+
class _MainTabsPageState extends State<MainTabsPage> {
20+
21+
int _selectedIndex;
22+
23+
_MainTabsPageState(this._selectedIndex);
24+
25+
List<Widget> _list = [AlbumPage(), SettingPage()];
26+
27+
@override
28+
Widget build(BuildContext context) {
29+
return Scaffold(
30+
body: this._list[this._selectedIndex],
31+
bottomNavigationBar: BottomNavigationBar(
32+
currentIndex: this._selectedIndex,
33+
onTap: (value) {
34+
setState(() {
35+
this._selectedIndex = value;
36+
});
37+
},
38+
type: BottomNavigationBarType.fixed,
39+
items: <BottomNavigationBarItem>[
40+
BottomNavigationBarItem(
41+
icon: Icon(IconData(0xe621, fontFamily: 'iconfont')),
42+
title: Text('相册')
43+
),
44+
BottomNavigationBarItem(
45+
icon: Icon(IconData(0xe634, fontFamily: 'iconfont')),
46+
title: Text('设置')
47+
),
48+
],
49+
),
50+
);
51+
}
52+
53+
}

0 commit comments

Comments
 (0)