opt dyn repost

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-26 22:12:40 +08:00
parent 1d91b183fd
commit 39778247f6
3 changed files with 44 additions and 56 deletions

View File

@@ -504,24 +504,20 @@ class _CreateDynPanelState extends CommonPublishPageState<CreateDynPanel> {
iconAlignment: IconAlignment.end, iconAlignment: IconAlignment.end,
); );
Widget get _buildToolbar => GestureDetector( Widget get _buildToolbar => Padding(
onTap: hidePanel, padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
behavior: HitTestBehavior.opaque, child: Obx(
child: Padding( () => ToolbarIconButton(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), onPressed: () {
child: Obx( updatePanelType(
() => ToolbarIconButton( panelType.value == PanelType.emoji
onPressed: () { ? PanelType.keyboard
updatePanelType( : PanelType.emoji,
panelType.value == PanelType.emoji );
? PanelType.keyboard },
: PanelType.emoji, icon: const Icon(Icons.emoji_emotions, size: 22),
); tooltip: '表情',
}, selected: panelType.value == PanelType.emoji,
icon: const Icon(Icons.emoji_emotions, size: 22),
tooltip: '表情',
selected: panelType.value == PanelType.emoji,
),
), ),
), ),
); );

View File

@@ -119,7 +119,6 @@ class _RepostPanelState extends CommonPublishPageState<RepostPanel> {
: AnimatedSize( : AnimatedSize(
alignment: Alignment.topCenter, alignment: Alignment.topCenter,
curve: Curves.ease, curve: Curves.ease,
onEnd: () => _isExpanded = true,
duration: const Duration(milliseconds: 300), duration: const Duration(milliseconds: 300),
child: child(), child: child(),
); );
@@ -192,12 +191,14 @@ class _RepostPanelState extends CommonPublishPageState<RepostPanel> {
Widget _buildEditPlaceHolder(ThemeData theme) => GestureDetector( Widget _buildEditPlaceHolder(ThemeData theme) => GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () async { onTap: () {
setState(() => _isMax = true); setState(() => _isMax = true);
await Future.delayed(const Duration(milliseconds: 300)); Future.delayed(const Duration(milliseconds: 300), () {
if (mounted) { _isExpanded = true;
focusNode.requestFocus(); if (mounted) {
} focusNode.requestFocus();
}
});
}, },
child: SizedBox( child: SizedBox(
width: double.infinity, width: double.infinity,
@@ -319,24 +320,20 @@ class _RepostPanelState extends CommonPublishPageState<RepostPanel> {
), ),
); );
Widget get _buildToolbar => GestureDetector( Widget get _buildToolbar => Padding(
onTap: hidePanel, padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
behavior: HitTestBehavior.opaque, child: Obx(
child: Padding( () => ToolbarIconButton(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), onPressed: () {
child: Obx( updatePanelType(
() => ToolbarIconButton( panelType.value == PanelType.emoji
onPressed: () { ? PanelType.keyboard
updatePanelType( : PanelType.emoji,
panelType.value == PanelType.emoji );
? PanelType.keyboard },
: PanelType.emoji, icon: const Icon(Icons.emoji_emotions, size: 22),
); tooltip: '表情',
}, selected: panelType.value == PanelType.emoji,
icon: const Icon(Icons.emoji_emotions, size: 22),
tooltip: '表情',
selected: panelType.value == PanelType.emoji,
),
), ),
), ),
); );

View File

@@ -58,20 +58,15 @@ class _SelectTopicPanelState extends State<SelectTopicPanel> {
final theme = Theme.of(context); final theme = Theme.of(context);
return Column( return Column(
children: [ children: [
GestureDetector( SizedBox(
onTap: Get.back, height: 35,
behavior: HitTestBehavior.opaque, child: Center(
child: Container( child: Container(
height: 35, width: 32,
padding: const EdgeInsets.only(bottom: 2), height: 3,
child: Center( decoration: BoxDecoration(
child: Container( color: theme.colorScheme.outline,
width: 32, borderRadius: const BorderRadius.all(Radius.circular(3)),
height: 3,
decoration: BoxDecoration(
color: theme.colorScheme.outline,
borderRadius: const BorderRadius.all(Radius.circular(3)),
),
), ),
), ),
), ),