This file contains hidden or 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
| Call .chain on the _widthTween and then give a CurveTween, to create an Animatable. |
This file contains hidden or 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:flutter/material.dart'; | |
| void main() => runApp(const MyApp()); | |
| class MyApp extends StatelessWidget { | |
| const MyApp({Key? key}) : super(key: key); | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( |
This file contains hidden or 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:flutter/material.dart'; | |
| void main() => runApp(const MyApp()); | |
| class MyApp extends StatelessWidget { | |
| const MyApp({Key? key}) : super(key: key); | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( |
This file contains hidden or 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<bool> addSelfSignedCertificate() async { | |
| ByteData data = await rootBundle.load('assets/raw/certificate.pem'); | |
| SecurityContext context = SecurityContext.defaultContext; | |
| context.setTrustedCertificatesBytes(data.buffer.asUint8List()); | |
| return true; | |
| } | |
| void main() async { | |
| assert(await addSelfSignedCertificate()); | |
| runApp(MyApp()); |
This file contains hidden or 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
| void main() { | |
| ByteData data = await rootBundle.load('assets/raw/certificate.pem'); | |
| SecurityContext context = SecurityContext.defaultContext; | |
| context.setTrustedCertificatesBytes(data.buffer.asUint8List()); | |
| runApp(MyApp()); | |
| } |
This file contains hidden or 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<UserCredential> signInWithCredentials( | |
| String email, String password) async { | |
| try { | |
| return await _firebaseAuth.signInWithEmailAndPassword(email, password); | |
| } catch (e) { | |
| print('Error in sign in with credentials: $e'); | |
| throw '$e'; | |
| } | |
| } |
This file contains hidden or 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
| <body> | |
| <!-- Previously loaded Firebase SDKs --> | |
| <script> | |
| // TODO: Replace the following with your app's Firebase project configuration | |
| var firebaseConfig = { | |
| // ... | |
| }; | |
| // Initialize Firebase |
This file contains hidden or 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:firebase/firebase.dart'; | |
| import 'package:meta/meta.dart'; | |
| @immutable | |
| class UserRepository { | |
| UserRepository({Auth firebaseAuth, GoogleAuthProvider googleSignin}) | |
| : _firebaseAuth = firebaseAuth ?? auth(), | |
| _googleSignIn = googleSignin ?? GoogleAuthProvider(); | |
| final Auth _firebaseAuth; |
NewerOlder