Toggle navigation
Toggle navigation
This project
Loading...
Sign in
OnePoem
/
OnePoem-App
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
reason
2022-04-12 09:01:36 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5fde1cf2c619c2e22ee3c2160c041f38eaff76d8
5fde1cf2
1 parent
378a307d
clear
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
49 deletions
lib/account/page/account_page.dart
lib/login/page/login_page.dart
pubspec.lock
lib/account/page/account_page.dart
View file @
5fde1cf
import
'package:Parlando/net/dio_utils.dart'
;
import
'package:Parlando/net/http_api.dart'
;
import
'package:Parlando/res/constant.dart'
;
import
'package:Parlando/util/toast_utils.dart'
;
import
'package:flutter/material.dart'
;
import
'package:Parlando/membership/membership_router.dart'
;
import
'package:Parlando/poem/poem_router.dart'
;
...
...
@@ -31,6 +35,25 @@ class AccountPage extends StatefulWidget {
class
_AccountPageState
extends
State
<
AccountPage
>
{
@override
void
initState
()
{
super
.
initState
();
//todo MVVM?
Map
<
String
,
String
>
params
=
<
String
,
String
>{
"profile"
:
"1"
,
};
DioUtils
.
instance
.
asyncRequestNetwork
(
Method
.
post
,
HttpApi
.
login
,
queryParameters:
params
,
onSuccess:
(
data
)
{},
onError:
(
code
,
msg
)
{
Toast
.
show
(
msg
.
toString
());
},
);
}
@override
Widget
build
(
BuildContext
context
)
{
Widget
likeButton
=
Container
(
color:
ColorPlate
.
white
,
...
...
@@ -248,37 +271,9 @@ class _MembershipButton extends StatelessWidget {
}
}
class
_UserRightButton
extends
StatelessWidget
{
const
_UserRightButton
({
Key
?
key
,
required
this
.
title
,
})
:
super
(
key:
key
);
final
String
title
;
@override
Widget
build
(
BuildContext
context
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
.
px
,
horizontal:
12
.
px
,
),
margin:
EdgeInsets
.
all
(
8
.
px
),
alignment:
Alignment
.
center
,
child:
Text
(
title
,
style:
const
TextStyle
(
color:
ColorPlate
.
orange
),
),
decoration:
BoxDecoration
(
border:
Border
.
all
(
color:
ColorPlate
.
orange
),
borderRadius:
BorderRadius
.
circular
(
4
.
px
),
),
);
}
}
class
_UserTag
extends
StatelessWidget
{
final
String
?
tag
;
const
_UserTag
({
Key
?
key
,
this
.
tag
,
...
...
@@ -403,12 +398,12 @@ class _PointSelectTextButton extends StatelessWidget {
final
bool
isSelect
;
final
String
title
;
final
Function
?
onTap
;
const
_PointSelectTextButton
(
this
.
isSelect
,
this
.
title
,
{
Key
?
key
,
this
.
onTap
,
})
:
super
(
key:
key
);
const
_PointSelectTextButton
(
this
.
isSelect
,
this
.
title
,
{
Key
?
key
,
this
.
onTap
,
})
:
super
(
key:
key
);
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -418,13 +413,13 @@ class _PointSelectTextButton extends StatelessWidget {
children:
<
Widget
>[
isSelect
?
Container
(
width:
6
.
px
,
height:
6
.
px
,
decoration:
BoxDecoration
(
color:
ColorPlate
.
orange
,
borderRadius:
BorderRadius
.
circular
(
3
),
),
)
width:
6
.
px
,
height:
6
.
px
,
decoration:
BoxDecoration
(
color:
ColorPlate
.
orange
,
borderRadius:
BorderRadius
.
circular
(
3
),
),
)
:
Container
(),
Container
(
padding:
const
EdgeInsets
.
only
(
left:
2
),
...
...
@@ -443,12 +438,11 @@ class TextGroup extends StatelessWidget {
final
String
title
,
tag
;
final
Color
?
color
;
const
TextGroup
(
this
.
title
,
this
.
tag
,
{
Key
?
key
,
this
.
color
,
})
:
super
(
key:
key
);
const
TextGroup
(
this
.
title
,
this
.
tag
,
{
Key
?
key
,
this
.
color
,
})
:
super
(
key:
key
);
@override
Widget
build
(
BuildContext
context
)
{
...
...
lib/login/page/login_page.dart
View file @
5fde1cf
...
...
@@ -126,7 +126,6 @@ class _LoginPageState extends State<LoginPage>
}
void
_login
()
{
setState
(()
{});
_isLoading
=
true
;
setState
(()
{});
Map
<
String
,
String
>
params
=
<
String
,
String
>{
...
...
pubspec.lock
View file @
5fde1cf
This diff is collapsed. Click to expand it.
Please
register
or
login
to post a comment