opt: emote panel

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-14 15:41:41 +08:00
parent 07d37a1209
commit 38fa8a10b7
4 changed files with 18 additions and 18 deletions

View File

@@ -131,18 +131,17 @@ class _LiveEmotePanelState extends State<LiveEmotePanel>
SizedBox(height: MediaQuery.of(context).padding.bottom),
],
)
: _errorWidget,
Error() => _errorWidget,
: _errorWidget(),
Error() => _errorWidget(loadingState.errMsg),
LoadingState() => throw UnimplementedError(),
};
}
Widget get _errorWidget => Center(
child: IconButton(
onPressed: () {
_emotePanelController.onReload();
},
Widget _errorWidget([String? errMsg]) => Center(
child: TextButton.icon(
onPressed: _emotePanelController.onReload,
icon: Icon(Icons.refresh),
label: Text(errMsg ?? '没有数据'),
),
);
}