mod: 登录/退出登录逻辑

This commit is contained in:
guozhigq
2023-08-09 22:25:24 +08:00
parent 79aa50c0df
commit 8a5a56cb15
8 changed files with 173 additions and 167 deletions

View File

@ -177,50 +177,6 @@ class _DynamicsPageState extends State<DynamicsPage>
icon: const Icon(Icons.history, size: 21),
),
),
Positioned(
left: 10,
top: 0,
bottom: 0,
child: Align(
alignment: Alignment.center,
child: user.get(UserBoxKey.userLogin) ?? false
? GestureDetector(
onTap: () {
feedBack();
showModalBottomSheet(
context: context,
builder: (_) => const SizedBox(
height: 450,
child: MinePage(),
),
clipBehavior: Clip.hardEdge,
isScrollControlled: true,
);
},
child: NetworkImgLayer(
type: 'avatar',
width: 30,
height: 30,
src: user.get(UserBoxKey.userFace),
),
)
: IconButton(
onPressed: () {
feedBack();
showModalBottomSheet(
context: context,
builder: (_) => const SizedBox(
height: 450,
child: MinePage(),
),
clipBehavior: Clip.hardEdge,
isScrollControlled: true,
);
},
icon: const Icon(CupertinoIcons.person, size: 22),
),
),
),
],
),
),