Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
netrain_flutter_app
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
邹志胜
netrain_flutter_app
Commits
3780e441
Commit
3780e441
authored
Oct 16, 2020
by
laishanqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交技术分享页面
parent
d9791b06
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
149 additions
and
19 deletions
+149
-19
Login.dart
netrain_flutter_app/lib/laishanqi/Login.dart
+97
-0
layout_page.dart
netrain_flutter_app/lib/laishanqi/layout_page.dart
+27
-3
HomePage.dart
netrain_flutter_app/lib/laishanqi/netrain/HomePage.dart
+18
-11
main.dart
netrain_flutter_app/lib/main.dart
+7
-5
No files found.
netrain_flutter_app/lib/laishanqi/Login.dart
0 → 100644
View file @
3780e441
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:netrain_flutter_app/laishanqi/netrain/Images.dart'
;
class
Login
extends
StatelessWidget
{
@override
Widget
build
(
BuildContext
context
)
{
var
controller
=
TextEditingController
();
return
MaterialApp
(
home:
Scaffold
(
body:
Container
(
margin:
EdgeInsets
.
only
(
top:
108
),
alignment:
Alignment
.
center
,
child:
Column
(
children:
[
Image
.
asset
(
Images
.
logo_01
),
Container
(
margin:
EdgeInsets
.
only
(
top:
91
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
baseline
,
mainAxisAlignment:
MainAxisAlignment
.
spaceEvenly
,
children:
[
Column
(
children:
[
Text
(
"验证码登录"
,
style:
TextStyle
(
color:
Color
(
0xff2893FF
),
fontWeight:
FontWeight
.
bold
,
fontSize:
17
),
),
Container
(
height:
6
,
),
Image
.
asset
(
Images
.
ic_login_mode
)
],
),
Text
(
"密码登录"
,
style:
TextStyle
(
color:
Color
(
0xff949494
),
fontWeight:
FontWeight
.
bold
,
fontSize:
17
)),
],
),
),
Container
(
margin:
EdgeInsets
.
only
(
top:
26
),
child:
Stack
(
children:
[
Container
(
child:
TextField
(
controller:
controller
,
decoration:
InputDecoration
(
contentPadding:
EdgeInsets
.
only
(
left:
19
),
hintText:
"请输入手机号"
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
20
),
borderSide:
BorderSide
(
color:
Color
(
0xffF1F1F1
),
width:
1
)),
),
),
margin:
EdgeInsets
.
only
(
left:
32
,
right:
32
),
height:
47
,
),
Positioned
(
top:
12
,
right:
50
,
child:
Text
(
"获取验证码"
,
style:
TextStyle
(
color:
Color
(
0xff727272
)),
))
],
),
),
Container
(
child:
TextField
(
controller:
controller
,
decoration:
InputDecoration
(
contentPadding:
EdgeInsets
.
only
(
left:
19
),
hintText:
"请输入密码"
,
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
20
),
borderSide:
BorderSide
(
color:
Color
(
0xffF1F1F1
),
width:
1
)),
),
),
margin:
EdgeInsets
.
only
(
left:
32
,
right:
32
,
top:
11
),
height:
47
,
),
],
),
),
),
);
}
}
netrain_flutter_app/lib/laishanqi/layout_page.dart
View file @
3780e441
...
...
@@ -28,7 +28,7 @@ class _LayoutGroupState extends State<LayoutPage> {
body:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
),
alignment:
Alignment
.
center
,
child:
ListView
(
child:
Column
(
children:
[
Row
(
children:
[
...
...
@@ -111,13 +111,37 @@ class _LayoutGroupState extends State<LayoutPage> {
),
),
),
Container
(
height:
50
,
width:
200
,
decoration:
BoxDecoration
(
color:
Colors
.
blue
),
child:
FractionallySizedBox
(
widthFactor:
1
,
child:
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
grey
),
child:
Text
(
'屏幕的二分之一'
),
),
),
Expanded
(
flex:
1
,
child:
Text
(
'屏幕的二分之一'
),
)
],
),
),
),
FractionallySizedBox
(
widthFactor:
1
,
widthFactor:
0.5
,
child:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
grey
),
child:
Text
(
'
宽度全屏
'
),
child:
Text
(
'
屏幕的二分之一
'
),
),
),
Stack
(
children:
[
ClipOval
(
...
...
netrain_flutter_app/lib/laishanqi/netrain/HomePage.dart
View file @
3780e441
...
...
@@ -5,12 +5,10 @@ import 'Images.dart';
class
HomePage
extends
StatefulWidget
{
@override
State
createState
()
{
return
_HomePage
();
}
State
createState
()
=>
_HomePageState
();
}
class
_HomePage
extends
State
{
class
_HomePage
State
extends
State
{
var
currentIndex
=
0
;
@override
...
...
@@ -74,15 +72,24 @@ class _HomePage extends State {
Expanded
(
child:
RefreshIndicator
(
onRefresh:
handleRefresh
,
child:
ListView
.
builder
(
padding:
EdgeInsets
.
all
(
0
),
itemCount:
10
,
itemBuilder:
(
BuildContext
context
,
int
index
)
{
return
_item
();
},
child:
ListView
.
separated
(
itemBuilder:
(
BuildContext
context
,
int
index
)
{
return
_item
();
},
separatorBuilder:
(
BuildContext
context
,
int
index
)
{
return
Text
(
"data"
);
},
itemCount:
5
)
// ListView.builder(
// padding: EdgeInsets.all(0),
// itemCount: 10,
// itemBuilder: (BuildContext context, int index) {
// return _item();
// },
),
),
),
// ),
],
),
);
...
...
netrain_flutter_app/lib/main.dart
View file @
3780e441
import
'package:flutter/material.dart'
;
import
'package:netrain_flutter_app/TestPage.dart'
;
import
'package:netrain_flutter_app/laishanqi/Login.dart'
;
import
'laishanqi/Stateful_page.dart'
;
import
'laishanqi/Stateless_page.dart'
;
...
...
@@ -7,9 +9,9 @@ import 'laishanqi/netrain/loginPage.dart';
import
'laishanqi/photo.dart'
;
void
main
(
)
{
runApp
(
MyApp
());
// runApp(MyApp());
runApp
(
Login
());
}
class
MyApp
extends
StatelessWidget
{
// This widget is the root of your application.
@override
...
...
@@ -61,9 +63,9 @@ class _RouterNavigatorState extends State<RouterNavigator> {
}),
_item
(
"less页面"
,
LessGroupPage
(),
'less'
),
_item
(
"ful页面"
,
FulGroupPage
(),
'ful'
),
_item
(
"layout页面"
,
LayoutPage
(),
'layout
'
),
_item
(
"拍照页面"
,
PhotoApp
(),
'photo
'
),
_item
(
"登陆"
,
LoginPage
(),
'login
'
),
_item
(
"layout页面"
,
LayoutPage
(),
'layout'
),
_item
(
"拍照页面"
,
PhotoApp
(),
'photo'
),
_item
(
"登陆"
,
LoginPage
(),
'login'
),
],
),
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment