-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7eb463f
commit bbda7db
Showing
2 changed files
with
76 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import 'package:definy/model/log_in_state.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:url_launcher/link.dart'; | ||
|
||
class AccountPage extends StatelessWidget { | ||
final LogInState logInState; | ||
|
@@ -11,7 +12,29 @@ class AccountPage extends StatelessWidget { | |
return Column( | ||
children: [ | ||
const Text('アカウントページ'), | ||
Text(logInState.toString()), | ||
...switch (logInState) { | ||
LogInStateLoading() => [const Text('ログイン状態を確認中...')], | ||
LogInStateNotLoggedIn() => [ | ||
const Text('ログインしていません'), | ||
ElevatedButton( | ||
onPressed: () {}, | ||
child: const Text('ログイン'), | ||
), | ||
ElevatedButton( | ||
onPressed: () {}, | ||
child: const Text('新規登録'), | ||
), | ||
Link( | ||
uri: Uri.parse( | ||
'otpauth://totp/Example:[email protected]?secret=JBSWY3DPEHPK3PXP&issuer=Example', | ||
), | ||
builder: (context, followLink) => TextButton( | ||
onPressed: followLink, | ||
child: const Text('otpauth url テスト'), | ||
), | ||
) | ||
], | ||
}, | ||
], | ||
); | ||
} | ||
|