Skip to content

Commit

Permalink
enhance: 認証するを押したときにインジケーター表示(shiosyakeyakini-info#686)
Browse files Browse the repository at this point in the history
  • Loading branch information
4ster1sk committed Nov 21, 2024
1 parent e065ba3 commit 1f5ec2b
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 1f5ec2b

Please sign in to comment.