Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
ChatGPT
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
关振斌
ChatGPT
Commits
644751c6
Commit
644751c6
authored
Feb 14, 2023
by
关振斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
8fcf01e0
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
235 additions
and
53 deletions
+235
-53
assets/images/VIP.png
assets/images/VIP.png
+0
-0
assets/images/dingyue.png
assets/images/dingyue.png
+0
-0
assets/images/huangguan.png
assets/images/huangguan.png
+0
-0
lib/pages/dashboard/components/appbar.dart
lib/pages/dashboard/components/appbar.dart
+9
-9
lib/pages/login/login_page.dart
lib/pages/login/login_page.dart
+216
-42
lib/pages/user/user_page.dart
lib/pages/user/user_page.dart
+2
-2
pubspec.lock
pubspec.lock
+7
-0
pubspec.yaml
pubspec.yaml
+1
-0
No files found.
assets/images/VIP.png
0 → 100644
View file @
644751c6
9.59 KB
assets/images/dingyue.png
0 → 100644
View file @
644751c6
6.33 KB
assets/images/huangguan.png
0 → 100644
View file @
644751c6
6.76 KB
lib/pages/dashboard/components/appbar.dart
View file @
644751c6
...
...
@@ -60,18 +60,18 @@ class DoctorAppBar extends StatelessWidget {
height:
60
,
width:
60
,
decoration:
BoxDecoration
(
boxShadow:
[
BoxShadow
(
blurRadius:
3
,
offset:
Offset
(
0
,
4
),
color:
Colors
.
black54
,
)
],
color:
Color
(
0xffA295FD
),
//
boxShadow: [
//
BoxShadow(
//
blurRadius: 3,
//
offset: Offset(0, 4),
//
color: Colors.black54,
//
)
//
],
//
color: Color(0xffA295FD),
borderRadius:
BorderRadius
.
circular
(
5
)),
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
5
),
child:
Image
.
asset
(
"assets/images/d
octor_1
.png"
)),
child:
Image
.
asset
(
"assets/images/d
ingyue
.png"
)),
),
)
],
...
...
lib/pages/login/login_page.dart
View file @
644751c6
...
...
@@ -2,6 +2,7 @@ import 'dart:async';
import
'package:chart/entity/user_entity.dart'
;
import
'package:chart/pages/dashboard/dashboard_page.dart'
;
import
'package:flutter_easyloading/flutter_easyloading.dart'
;
import
'package:glassmorphism/glassmorphism.dart'
;
import
'package:url_launcher/url_launcher.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
...
...
@@ -9,6 +10,7 @@ import 'package:url_launcher/link.dart';
import
'package:url_launcher/url_launcher.dart'
;
import
'package:pinput/pinput.dart'
;
import
"package:chart/service/user_service.dart"
;
import
'package:gradient_widgets/gradient_widgets.dart'
;
class
LoginPage
extends
StatefulWidget
{
const
LoginPage
({
super
.
key
});
...
...
@@ -54,6 +56,9 @@ class _MyHomePageState extends State<LoginPage> {
}
_getCode
()
async
{
if
(
controller
.
text
.
length
<
11
)
{
return
EasyLoading
.
showError
(
"手机号码输入有误!"
);
}
EasyLoading
.
show
(
status:
"发送验证码..."
);
var
phone
=
controller
.
text
.
replaceAll
(
"+"
,
""
)
...
...
@@ -104,49 +109,202 @@ class _MyHomePageState extends State<LoginPage> {
);
return
Scaffold
(
appBar:
AppBar
(),
body:
Container
(
// appBar: AppBar(),
body:
SingleChildScrollView
(
physics:
const
ClampingScrollPhysics
(),
child:
GestureDetector
(
onTap:
()
{
FocusScope
.
of
(
context
).
requestFocus
(
FocusNode
());
},
child:
Container
(
width:
MediaQuery
.
of
(
context
).
size
.
width
,
height:
MediaQuery
.
of
(
context
).
size
.
height
,
// decoration: const BoxDecoration(
// gradient: LinearGradient(
// colors: <Color>[
// CustomTheme.loginGradientStart,
// CustomTheme.loginGradientEnd
// ],
// begin: FractionalOffset(0.0, 0.0),
// end: FractionalOffset(1.0, 1.0),
// stops: <double>[0.0, 1.0],
// tileMode: TileMode.clamp),
// ),
decoration:
BoxDecoration
(
image:
DecorationImage
(
image:
Image
.
asset
(
"assets/images/bg.png"
).
image
,
fit:
BoxFit
.
cover
),
),
// p
padding:
EdgeInsets
.
symmetric
(
horizontal:
40
),
// color: Colors.red,
width:
double
.
infinity
,
height:
double
.
infinity
,
child:
Center
(
// width: double.infinity,
// height: double.infinity,
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
// Container(
// width: double.infinity,
// color: Colors.red,
// height: 300,
// child: Text(""),
// ),
Column
(
children:
[
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
16
,
vertical:
80
),
// height: 200,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
"GPT大师傅"
,
style:
TextStyle
(
color:
Colors
.
white
,
fontWeight:
FontWeight
.
bold
,
fontSize:
30
,
),
)
]),
),
Center
(
child:
GlassmorphicContainer
(
width:
MediaQuery
.
of
(
context
).
size
.
width
*
.
9
,
height:
280.0
,
borderRadius:
16
,
padding:
EdgeInsets
.
only
(
bottom:
16
),
blur:
14
,
alignment:
Alignment
.
bottomCenter
,
border:
2
,
child:
Container
(
padding:
EdgeInsets
.
all
(
16
),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
TextField
(
autofocus:
true
,
controller:
controller
,
keyboardType:
TextInputType
.
phone
,
style:
const
TextStyle
(
color:
Colors
.
white
,
fontSize:
16
),
style:
const
TextStyle
(
color:
Colors
.
white
,
fontSize:
16
),
decoration:
InputDecoration
(
labelStyle:
TextStyle
(
color:
Colors
.
white
.
withOpacity
(
1
)),
hintStyle:
TextStyle
(
color:
Colors
.
grey
,
textBaseline:
TextBaseline
.
ideographic
,
),
labelText:
'电话号码'
,
border:
OutlineInputBorder
(
borderSide:
BorderSide
(),
borderSide:
const
BorderSide
(),
),
enabledBorder:
OutlineInputBorder
(
///设置边框四个角的弧度
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
20
)),
///用来配置边框的样式
borderSide:
BorderSide
(
///设置边框的颜色
color:
Colors
.
white
.
withOpacity
(.
2
),
///设置边框的粗细
width:
2.0
,
),
),
focusedBorder:
OutlineInputBorder
(
///设置边框四个角的弧度
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
20
)),
///用来配置边框的样式
borderSide:
BorderSide
(
///设置边框的颜色
color:
Colors
.
white
.
withOpacity
(
1
),
///设置边框的粗细
width:
2.0
,
),
),
),
textInputAction:
TextInputAction
.
done
,
inputFormatters:
<
TextInputFormatter
>[
LengthLimitingTextInputFormatter
(
13
)
],
// decoration: InputDecoration(
// filled: true,
// enabledBorder: OutlineInputBorder(
// borderSide: BorderSide(color: Color(0x00FF0000)),
// borderRadius: BorderRadius.all(
// Radius.circular(100),
// ),
// ),
// focusedBorder: OutlineInputBorder(
// borderSide: BorderSide(color: Color(0x00000000)),
// borderRadius: BorderRadius.all(
// Radius.circular(100),
// ),
// ),
// contentPadding: EdgeInsets.all(10),
// prefixIcon: Icon(Icons.lock),
// // fillColor: Colors.blue,
// hintText: "请输入密码",
// ),
// ),
onChanged:
(
v
)
=>
_splitPhoneNumber
(
v
),
),
SizedBox
(
height:
20
,
),
MaterialButton
(
Container
(
width:
double
.
infinity
,
margin:
EdgeInsets
.
only
(
top:
30
),
// col
// child: GradientButton(
// child: Text('Gradient'),
// callback: () {},
// gradient: Gradients.ali,
// shadowColor: Gradients.backToFuture.colors.last
// .withOpacity(0.25),
// ),
child:
MaterialButton
(
shape:
RoundedRectangleBorder
(
// 圆角矩形
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
10
)),
),
padding:
EdgeInsets
.
symmetric
(
vertical:
12
),
child:
Text
(
'确定'
),
color:
Theme
.
of
(
context
).
primaryColor
,
textColor:
Colors
.
white
,
onPressed:
_getCode
),
]),
)
],
),
),
linearGradient:
LinearGradient
(
begin:
Alignment
.
topLeft
,
end:
Alignment
.
bottomRight
,
colors:
[
Color
(
0xFF0FFFF
).
withOpacity
(
0.2
),
Color
(
0xFF0FFFF
).
withOpacity
(
0.2
),
],
),
borderGradient:
LinearGradient
(
begin:
Alignment
.
topLeft
,
end:
Alignment
.
bottomRight
,
colors:
[
Color
(
0xFF0FFFF
).
withOpacity
(
1
),
Color
(
0xFFFFFFF
),
Color
(
0xFF0FFFF
).
withOpacity
(
1
),
],
),
));
),
),
],
)),
)));
}
int
inputLength
=
0
;
...
...
@@ -175,3 +333,19 @@ class _MyHomePageState extends State<LoginPage> {
inputLength
=
text
.
length
;
}
}
class
CustomTheme
{
const
CustomTheme
();
static
const
Color
loginGradientStart
=
Color
(
0xFFfbab66
);
static
const
Color
loginGradientEnd
=
Color
(
0xFFf7418c
);
static
const
Color
white
=
Color
(
0xFFFFFFFF
);
static
const
Color
black
=
Color
(
0xFF000000
);
static
const
LinearGradient
primaryGradient
=
LinearGradient
(
colors:
<
Color
>[
loginGradientStart
,
loginGradientEnd
],
stops:
<
double
>[
0.0
,
1.0
],
begin:
Alignment
.
topCenter
,
end:
Alignment
.
bottomCenter
,
);
}
lib/pages/user/user_page.dart
View file @
644751c6
...
...
@@ -121,10 +121,10 @@ class UserPageState extends State<UserPage> {
items:
[
SettingsItem
(
onTap:
()
{
Navigator
.
of
(
context
).
pushNamed
(
'/
ms-code
'
);
Navigator
.
of
(
context
).
pushNamed
(
'/
login
'
);
},
icons:
Icons
.
exit_to_app_rounded
,
title:
"
Sign Out
"
,
title:
"
${_userModel.isLogin}
"
,
),
SettingsItem
(
onTap:
()
{},
...
...
pubspec.lock
View file @
644751c6
...
...
@@ -483,6 +483,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.0"
gradient_widgets:
dependency: "direct main"
description:
name: gradient_widgets
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.0"
html:
dependency: transitive
description:
...
...
pubspec.yaml
View file @
644751c6
...
...
@@ -93,6 +93,7 @@ dependencies:
easy_container
:
^1.0.4
intl_phone_field
:
^3.1.0
extended_phone_number_input
:
^1.0.2
gradient_widgets
:
^0.6.0
# package:bubble/bubble.dart
dev_dependencies
:
...
...
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