Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2024-11-22 18:50:07 +08:00
parent 64f66dd58f
commit 57b2f48c72
22 changed files with 134 additions and 88 deletions

View File

@@ -114,14 +114,18 @@ class _EmotePanelState extends State<EmotePanel>
SizedBox(height: MediaQuery.of(context).padding.bottom),
],
)
: errorWidget(
callback: _emotePanelController.onReload,
),
Error() => errorWidget(
errMsg: loadingState.errMsg,
callback: _emotePanelController.onReload,
),
: _errorWidget,
Error() => _errorWidget,
LoadingState() => throw UnimplementedError(),
};
}
Widget get _errorWidget => Center(
child: IconButton(
onPressed: () {
_emotePanelController.onReload();
},
icon: Icon(Icons.refresh),
),
);
}