Skip to content

Commit

Permalink
Chore shiosyakeyakini-info#686 認証するを押したときにインジケーター表示
Browse files Browse the repository at this point in the history
  • Loading branch information
4ster1sk committed Nov 20, 2024
1 parent fa8ba3a commit 9029825
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions lib/view/login_page/mi_auth_login.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,18 @@ class MiAuthLogin extends HookConsumerWidget {
Container(),
ElevatedButton(
onPressed: () async {
await ref
.read(accountRepositoryProvider.notifier)
.openMiAuth(toAscii(serverController.text))
.expectFailure(context);
isAuthed.value = true;

try {
IndicatorView.showIndicator(context);
await ref
.read(accountRepositoryProvider.notifier)
.openMiAuth(toAscii(serverController.text))
.expectFailure(context);
} catch (e) {
rethrow;
} finally {
IndicatorView.hideIndicator(context);
}
isAuthed.value = true;
},
child: Text(
isAuthed.value
Expand Down

0 comments on commit 9029825

Please sign in to comment.