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-01-02 17:56:59 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3415d83bf29334174976452bd61dbbdcc86dcfd6
3415d83b
1 parent
24471029
profile edit page
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
8 deletions
lib/account/account_router.dart
lib/account/page/account_edit_page.dart
lib/account/page/account_page.dart
lib/widgets/my_app_bar.dart
lib/account/account_router.dart
View file @
3415d83
import
'package:fluro/fluro.dart'
;
import
'package:one_poem/routers/i_router.dart'
;
import
'page/account_edit_page.dart'
;
import
'page/account_page.dart'
;
class
AccountRouter
implements
IRouterProvider
{
static
String
accountPage
=
'/account'
;
static
String
accountEditPage
=
'/account/edit'
;
@override
void
initRouter
(
FluroRouter
router
)
{
router
.
define
(
accountPage
,
handler:
Handler
(
handlerFunc:
(
_
,
__
)
{
return
const
AccountPage
(
isSelfPage:
true
,);
}));
router
.
define
(
accountEditPage
,
handler:
Handler
(
handlerFunc:
(
_
,
__
)
{
return
AccountEditPage
();
}));
}
}
...
...
lib/account/page/account_edit_page.dart
0 → 100644
View file @
3415d83
This diff is collapsed. Click to expand it.
lib/account/page/account_page.dart
View file @
3415d83
import
'package:flutter/material.dart'
;
import
'package:one_poem/routers/fluro_navigator.dart'
;
import
'package:one_poem/tiktok/style/style.dart'
;
import
'package:tapped/tapped.dart'
;
import
'package:flutter_gen/gen_l10n/one_poem_localizations.dart'
;
import
'package:one_poem/extension/int_extension.dart'
;
import
'../account_router.dart'
;
class
AccountPage
extends
StatefulWidget
{
const
AccountPage
({
Key
?
key
,
...
...
@@ -83,7 +86,28 @@ class _AccountPageState extends State<AccountPage> {
// 头像与关注
Stack
(
alignment:
Alignment
.
bottomLeft
,
children:
<
Widget
>[
likeButton
,
avatar
],
children:
<
Widget
>[
likeButton
,
avatar
,
Positioned
(
child:
GestureDetector
(
child:
CircleAvatar
(
backgroundColor:
Colors
.
red
.
withOpacity
(
0.4
),
radius:
14.0
,
child:
const
Icon
(
Icons
.
edit
,
color:
Colors
.
white
,
size:
16.0
,
),
),
onTap:
()
{
NavigatorUtils
.
push
(
context
,
AccountRouter
.
accountEditPage
);
},
),
left:
64
.
px
,
bottom:
10
.
px
,
),
],
),
Container
(
color:
ColorPlate
.
white
,
...
...
@@ -167,12 +191,17 @@ class _AccountPageState extends State<AccountPage> {
alignment:
Alignment
.
centerRight
,
height:
64
.
px
,
width:
double
.
infinity
,
child:
IconButton
(
icon:
const
Icon
(
Icons
.
settings_outlined
,
color:
Colors
.
black54
,
),
onPressed:
()
{},
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
end
,
children:
[
IconButton
(
icon:
const
Icon
(
Icons
.
settings_outlined
,
color:
Colors
.
black54
,
),
onPressed:
()
{},
),
],
),
),
body
,
...
...
lib/widgets/my_app_bar.dart
View file @
3415d83
...
...
@@ -44,7 +44,10 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
},
tooltip:
'返回'
,
padding:
const
EdgeInsets
.
all
(
12.0
),
icon:
const
Icon
(
Icons
.
arrow_back_ios_outlined
,
color:
Colors
.
white
,),
icon:
Icon
(
Icons
.
arrow_back_ios_outlined
,
color:
isTransparent
?
Colors
.
black54
:
Colors
.
white
,
),
)
:
Gaps
.
empty
;
...
...
Please
register
or
login
to post a comment