Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
gmalpha_flutter
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
mobile
gmalpha_flutter
Commits
30f859a9
Commit
30f859a9
authored
Feb 20, 2019
by
艾娇平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
意见与建议
parent
ad253d64
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
128 additions
and
64 deletions
+128
-64
ALCommon.dart
lib/macros/ALCommon.dart
+7
-2
ALFont.dart
lib/macros/ALFont.dart
+8
-0
main.dart
lib/main.dart
+11
-2
opinion.dart
lib/opinion.dart
+102
-60
No files found.
lib/macros/ALCommon.dart
View file @
30f859a9
...
@@ -23,6 +23,7 @@ class ALAlphaButton extends FlatButton {
...
@@ -23,6 +23,7 @@ class ALAlphaButton extends FlatButton {
Color
disabledColor
,
Color
disabledColor
,
Color
highlightColor
,
Color
highlightColor
,
Color
splashColor
,
Color
splashColor
,
double
minWidth
,
Brightness
colorBrightness
,
Brightness
colorBrightness
,
EdgeInsetsGeometry
padding
,
EdgeInsetsGeometry
padding
,
ShapeBorder
shape
,
ShapeBorder
shape
,
...
@@ -52,9 +53,13 @@ class ALAlphaButton extends FlatButton {
...
@@ -52,9 +53,13 @@ class ALAlphaButton extends FlatButton {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
// TODO: implement build
// TODO: implement build
return
FlatButton
(
return
FlatButton
(
onPressed:
onPressed
,
textTheme:
textTheme
,
padding:
padding
,
child:
child
,
child:
child
,
color:
ALColors
.
Color323232
,
onPressed:
onPressed
,
textColor:
ALColors
.
Color323232
,
highlightColor:
ALColors
.
Color323232
,
color:
ALColors
.
ColorFFFFFF
,
shape:
OutlineInputBorder
(
shape:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
0
)),
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
0
)),
borderSide:
BorderSide
(
color:
ALColors
.
Color323232
)),
borderSide:
BorderSide
(
color:
ALColors
.
Color323232
)),
...
...
lib/macros/ALFont.dart
0 → 100644
View file @
30f859a9
//
// ALFont
//
// gmalpha_flutter
// Created by lxrent on 2019/2/19.
// Copyright © 2019 Gengmei. All rights reserved.
//
lib/main.dart
View file @
30f859a9
...
@@ -6,7 +6,15 @@ import 'package:flutter/rendering.dart';
...
@@ -6,7 +6,15 @@ import 'package:flutter/rendering.dart';
void
main
(
)
{
void
main
(
)
{
debugPaintSizeEnabled
=
false
;
//打开视觉调试开关
debugPaintSizeEnabled
=
false
;
//打开视觉调试开关
return
runApp
(
_widgetForRoute
(
window
.
defaultRouteName
));
return
runApp
(
_widgetForRoute
(
window
.
defaultRouteName
)
);
// return runApp(MaterialApp(
// home: '/',
// routes: {
//
// },
// ))
}
}
class
ALRoute
{
class
ALRoute
{
...
@@ -28,15 +36,16 @@ Widget _widgetForRoute(String route) {
...
@@ -28,15 +36,16 @@ Widget _widgetForRoute(String route) {
}
}
}
}
class
MyApp
extends
StatelessWidget
{
class
MyApp
extends
StatelessWidget
{
// This widget is the root of your application.
// This widget is the root of your application.
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
MaterialApp
(
return
MaterialApp
(
title:
'Flutter Demo'
,
title:
'Flutter Demo'
,
theme:
ThemeData
.
light
(),
theme:
ThemeData
.
light
(),
home:
MyHomePage
(
title:
'Flutter Demo Home Page'
),
home:
MyHomePage
(
title:
'Flutter Demo Home Page'
),
routes:
{
routes:
{
"/channeltest"
:
batteryChannelPage
,
"/channeltest"
:
batteryChannelPage
,
},
},
...
...
lib/opinion.dart
View file @
30f859a9
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'macros/ALColors.dart'
;
import
'macros/ALColors.dart'
;
import
'macros/ALDevice.dart'
;
import
'macros/ALDevice.dart'
;
import
'macros/ALCommon.dart'
;
//ALColors.ColorFFFFFF
//ALColors.ColorFFFFFF
class
Opinion
extends
StatelessWidget
{
class
Opinion
extends
StatelessWidget
{
...
@@ -19,11 +20,11 @@ class Opinion extends StatelessWidget {
...
@@ -19,11 +20,11 @@ class Opinion extends StatelessWidget {
debugShowCheckedModeBanner:
false
,
debugShowCheckedModeBanner:
false
,
title:
'Flutter Demo'
,
title:
'Flutter Demo'
,
color:
ALColors
.
ColorFFFFFF
,
color:
ALColors
.
ColorFFFFFF
,
theme:
ThemeData
.
light
(),
theme:
ThemeData
(
home:
OpinionPage
(
title:
'意见和建议1111111'
),
splashColor:
Colors
.
white10
// routes: {
,
//水波纹的颜色
// "/channeltest": batteryChannelPage
,
)
,
// }
,
home:
OpinionPage
(
title:
'意见和建议'
)
,
);
);
}
}
}
}
...
@@ -38,8 +39,8 @@ class OpinionPage extends StatefulWidget {
...
@@ -38,8 +39,8 @@ class OpinionPage extends StatefulWidget {
}
}
class
_OpinionPageState
extends
State
<
OpinionPage
>
{
class
_OpinionPageState
extends
State
<
OpinionPage
>
{
TextEditingController
opinionCtrl
=
TextEditingController
();
TextEditingController
opinionCtrl
=
TextEditingController
();
TextEditingController
telCtrl
=
TextEditingController
();
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
...
@@ -47,68 +48,109 @@ class _OpinionPageState extends State<OpinionPage> {
...
@@ -47,68 +48,109 @@ class _OpinionPageState extends State<OpinionPage> {
// appBar: AppBar(
// appBar: AppBar(
// title: Text('Home'),
// title: Text('Home'),
// ),
// ),
appBar:
PreferredSize
(
appBar:
PreferredSize
(
child:
Container
(
child:
Container
(
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
child:
Text
(
child:
Text
(
'意见与反馈'
,
'
${widget.title}
'
,
style:
TextStyle
(
color:
ALColors
.
Color323232
,
fontSize:
18
),
style:
TextStyle
(
color:
ALColors
.
Color323232
,
fontSize:
18
),
),
),
),
),
preferredSize:
Size
(
320
,
64
)),
preferredSize:
Size
(
320
,
64
)),
body:
Container
(
body:
Center
(
height:
ALDevice
.
height
,
// Center is a layout widget. It takes a single child and positions it
width:
ALDevice
.
width
,
// in the middle of the parent.
child:
Center
(
child:
Column
(
// Center is a layout widget. It takes a single child and positions it
mainAxisAlignment:
MainAxisAlignment
.
center
,
// in the middle of the parent.
children:
<
Widget
>[
child:
Column
(
Container
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
margin:
EdgeInsets
.
only
(
left:
30
,
top:
42
,
right:
30
,
bottom:
0
),
children:
<
Widget
>[
height:
215
,
Container
(
width:
ALDevice
.
width
,
alignment:
Alignment
.
topCenter
,
margin:
child:
TextField
(
EdgeInsets
.
only
(
left:
30
,
top:
42
,
right:
30
,
bottom:
0
),
controller:
opinionCtrl
,
height:
215
,
decoration:
InputDecoration
(
width:
ALDevice
.
width
,
contentPadding:
EdgeInsets
.
all
(
10
),
decoration:
BoxDecoration
(
border:
OutlineInputBorder
(
border:
Border
.
all
(
color:
ALColors
.
ColorC4C4C4
,
width:
1
),
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
0
)),
),
borderSide:
BorderSide
(
color:
ALColors
.
ColorC4C4C4
)
child:
TextField
(
),
// maxLines: 10,
focusedBorder:
OutlineInputBorder
(
controller:
opinionCtrl
,
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
0
)),
decoration:
InputDecoration
(
borderSide:
BorderSide
(
color:
ALColors
.
ColorC4C4C4
)
border:
InputBorder
.
none
,
contentPadding:
EdgeInsets
.
all
(
10
),
hintText:
'意见与建议'
,
hintStyle:
TextStyle
(
color:
ALColors
.
ColorC4C4C4
,
fontSize:
14
,
),
labelStyle:
TextStyle
(
color:
ALColors
.
Color323232
,
fontSize:
19
),
),
),
hintText:
'意见与建议'
,
),
hintStyle:
TextStyle
(
),
Container
(
height:
40
,
margin:
EdgeInsets
.
only
(
left:
30
,
right:
30
,
top:
30
),
padding:
EdgeInsets
.
only
(
bottom:
10
),
decoration:
BoxDecoration
(
border:
Border
(
bottom:
BorderSide
(
color:
ALColors
.
ColorC4C4C4
),
)),
alignment:
Alignment
.
centerLeft
,
child:
TextField
(
controller:
telCtrl
,
decoration:
InputDecoration
(
border:
InputBorder
.
none
,
contentPadding:
EdgeInsets
.
all
(
10
),
hintText:
'联系方式'
,
hintStyle:
TextStyle
(
color:
ALColors
.
ColorC4C4C4
,
color:
ALColors
.
ColorC4C4C4
,
fontSize:
14
,),
fontSize:
14
,
labelStyle:
TextStyle
(
color:
ALColors
.
Color323232
,
fontSize:
19
),
),
labelStyle:
TextStyle
(
color:
ALColors
.
Color323232
,
fontSize:
19
),
),
),
),
),
// Container(
// height: 1,
// margin: EdgeInsets.only(left: 30,right: 30,top: 5),
// child: Divider(height: 1,color: ALColors.ColorC4C4C4,),
// ),
Container
(
decoration:
BoxDecoration
(
border:
Border
.
all
(
color:
ALColors
.
Color323232
,
width:
1.5
)),
margin:
EdgeInsets
.
all
(
30
),
padding:
EdgeInsets
.
all
(
0
),
constraints:
BoxConstraints
(
minWidth:
ALDevice
.
width
,
minHeight:
45
),
alignment:
Alignment
.
center
,
child:
FlatButton
(
onHighlightChanged:
(
bool
b
){
),
},
),
onPressed:
confirmClick
,
OutlineButton
(
child:
Text
(
child:
Text
(
'有阴影'
),
'提交'
,
style:
TextStyle
(
fontSize:
14
,
color:
ALColors
.
Color323232
),
),
),
),
],
),
),
FlatButton
(
),
shape:
OutlineInputBorder
(
));
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
0
)),
borderSide:
BorderSide
(
color:
ALColors
.
Color323232
)
),
child:
Text
(
'提交2222'
),
color:
ALColors
.
ColorFFFFFF
,
onPressed:
()
{
Navigator
.
pushNamed
(
context
,
"/channeltest"
);
},
)
],
),
),
);
}
}
}
}
void
confirmClick
(
)
{
print
(
'confirmClick'
);
}
//
//
//class MyNarBar extends PreferredSizeWidget {
//class MyNarBar extends PreferredSizeWidget {
// @override
// @override
...
...
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