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
Future<void> _signUpUser() async { | |
if (_formKey.currentState!.validate()) { | |
// Sign up code | |
} | |
} |
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
// (1) | |
Future<void> main() async { | |
// (2) | |
WidgetsFlutterBinding.ensureInitialized(); | |
await _configureAmplify(); | |
runApp(const AmplifyCustomAuthenticationFlows()); | |
} | |
Future<void> _configureAmplify() async { | |
try { |
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: | |
... | |
amplify_flutter: ^1.0.0-next.0 | |
amplify_auth_cognito: ^1.0.0-next.0 |
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
Using service: Cognito, provided by: awscloudformation | |
The current configured provider is Amazon Cognito. | |
Do you want to use the default authentication and security configuration? Default Configuration | |
Warning: you will not be able to edit these selections. | |
How do you want users to be able to sign in? Username | |
Do you want to configure advanced settings? No, I am done. |
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
? Enter a name for the project amplifycustomauthent | |
The following configuration will be applied: | |
Project information | |
| Name: amplifycustomauthent | |
| Environment: dev | |
| Default editor: Visual Studio Code | |
| App type: flutter | |
| Configuration file location: ./lib/ | |
? Initialize the project with the above configuration? Yes | |
Using default provider awscloudformation ? |
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
msalihg@ dart_first_amplify_authentication % amplify add auth | |
Using service: Cognito, provided by: awscloudformation | |
The current configured provider is Amazon Cognito. | |
Do you want to use the default authentication and security configuration? Defau | |
lt configuration | |
Warning: you will not be able to edit these selections. | |
How do you want users to be able to sign in? Username | |
Do you want to configure advanced settings? No, I am done. |
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
#!/bin/bash | |
[[ -d artifacts ]] && rm -r artifacts | |
mkdir artifacts | |
cp -R build/web artifacts |
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
name: On Website Deploy | |
"on": | |
push: | |
# (1) | |
branches: | |
- "main" | |
jobs: | |
build_and_deploy_web: | |
name: Build & Deploy Flutter to Web | |
runs-on: ubuntu-latest |
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
import 'package:amplify_auth_cognito/amplify_auth_cognito.dart'; | |
import 'package:amplify_authenticator/amplify_authenticator.dart'; | |
import 'package:amplify_flutter/amplify_flutter.dart'; | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatefulWidget { |
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
class Autogenerated { | |
Btcinr? _btcinr; | |
Btcinr? _xrpinr; | |
Btcinr? _ethinr; | |
Btcinr? _trxinr; | |
Btcinr? _eosinr; | |
Btcinr? _zilinr; | |
Btcinr? _batinr; | |
Btcinr? _zrxinr; | |
Btcinr? _reqinr; |