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
# .bashrcを編集する | |
alias vibash='vi ~/.bashrc' | |
# .bashrcを更新する | |
alias rebash='source ~/.bashrc' | |
# Git | |
alias gst='git status' | |
alias gdf='git diff --staged' | |
alias gcm='git commit -m' | |
alias gcma='git commit --amend' |
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
Carthage/[email protected] | |
realm/[email protected] | |
yonaskolb/[email protected] |
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
# https://github.com/Homebrew/homebrew-bundle | |
tap "homebrew/bundle" | |
tap "homebrew/cask" | |
tap "homebrew/core" | |
cask_args appdir: "/Applications" | |
# ---------------------------------------- | |
# brew | |
# ---------------------------------------- |
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
// Determine if Sign In with Apple is supported on the current device | |
await AppleSignIn.isAvailable() // => Future<bool> |
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
/// Apple認証で取得したフルネームを保存して使用するためのクラス | |
class AuthCredentialWithApple { | |
AuthCredentialWithApple({ | |
@required this.authCredential, | |
this.givenName, | |
this.familyName, | |
}); | |
AuthCredential authCredential; | |
String givenName; | |
String familyName; |
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
/// Apple認可のクレデンシャルを要求し、(取得できた場合は)フルネームも一緒に返却する | |
Future<AuthCredentialWithApple> requestAppleIdCredential() async { | |
// apple_sign_inパッケージによるリクエスト実行関数 | |
final authResult = await AppleSignIn.performRequests([ | |
// メールアドレスとフルネーム、取得したいスコープを指定する | |
// メールアドレスとフルネームどちらも不要な場合は空のListを指定すればOK | |
const AppleIdRequest(requestedScopes: [Scope.email, Scope.fullName]) | |
]); | |
// エラーハンドリング | |
if (authResult.error != null) { |
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
/// Sign in with Appleが押された | |
Future onPressedAppleButton(BuildContext context) async { | |
// 証明書をリクエストして取得 | |
AuthCredentialWithApple credentialWithApple; // フルネームを使用しない場合は `AuthCredential`でOK | |
try { | |
credentialWithApple = await requestAppleIdCredential(); // この後実装 | |
} on Exception catch (e) { | |
// エラーハンドリング | |
} | |
if (credentialWithApple == null) { |
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
dependencies: | |
flutter: | |
sdk: flutter | |
# Sign in with Apple | |
apple_sign_in: ^0.1.0 | |
# Firebase | |
firebase_core: ^0.4.4+3 | |
# ユーザー認可 | |
firebase_auth: ^0.15.5+3 |
OlderNewer