mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: preview user avatar
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:PiliPalaX/pages/preview/view.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:PiliPalaX/common/widgets/network_img_layer.dart';
|
import 'package:PiliPalaX/common/widgets/network_img_layer.dart';
|
||||||
@@ -25,12 +26,23 @@ class ProfilePanel extends StatelessWidget {
|
|||||||
tag: ctr.heroTag!,
|
tag: ctr.heroTag!,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
NetworkImgLayer(
|
GestureDetector(
|
||||||
|
onTap: () => showDialog(
|
||||||
|
useSafeArea: false,
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return ImagePreview(initialPage: 0, imgList: [
|
||||||
|
!loadingStatus ? memberInfo.face : ctr.face.value
|
||||||
|
]);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
child: NetworkImgLayer(
|
||||||
width: 90,
|
width: 90,
|
||||||
height: 90,
|
height: 90,
|
||||||
type: 'avatar',
|
type: 'avatar',
|
||||||
src: !loadingStatus ? memberInfo.face : ctr.face.value,
|
src: !loadingStatus ? memberInfo.face : ctr.face.value,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
if (!loadingStatus &&
|
if (!loadingStatus &&
|
||||||
memberInfo.liveRoom != null &&
|
memberInfo.liveRoom != null &&
|
||||||
memberInfo.liveRoom!.liveStatus == 1)
|
memberInfo.liveRoom!.liveStatus == 1)
|
||||||
|
|||||||
@@ -241,8 +241,8 @@ class _ReplyPageState extends State<ReplyPage>
|
|||||||
if (!_selectKeyboard) {
|
if (!_selectKeyboard) {
|
||||||
_selectKeyboard = true;
|
_selectKeyboard = true;
|
||||||
_keyboardStream.add(true);
|
_keyboardStream.add(true);
|
||||||
}
|
|
||||||
updatePanelType(PanelType.keyboard);
|
updatePanelType(PanelType.keyboard);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.keyboard, size: 22),
|
icon: const Icon(Icons.keyboard, size: 22),
|
||||||
selected: snapshot.data!,
|
selected: snapshot.data!,
|
||||||
@@ -255,14 +255,10 @@ class _ReplyPageState extends State<ReplyPage>
|
|||||||
builder: (_, snapshot) => ToolbarIconButton(
|
builder: (_, snapshot) => ToolbarIconButton(
|
||||||
tooltip: '表情',
|
tooltip: '表情',
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
updatePanelType(
|
|
||||||
PanelType.emoji == _currentPanelType
|
|
||||||
? PanelType.keyboard
|
|
||||||
: PanelType.emoji,
|
|
||||||
);
|
|
||||||
if (_selectKeyboard) {
|
if (_selectKeyboard) {
|
||||||
_selectKeyboard = false;
|
_selectKeyboard = false;
|
||||||
_keyboardStream.add(false);
|
_keyboardStream.add(false);
|
||||||
|
updatePanelType(PanelType.emoji);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.emoji_emotions, size: 22),
|
icon: const Icon(Icons.emoji_emotions, size: 22),
|
||||||
|
|||||||
Reference in New Issue
Block a user