mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: emote panel
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -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 ?? '没有数据'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user