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: CI | |
on: | |
push: | |
branches: | |
- localnet | |
- devnet | |
- mainnet | |
pull_request: |
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:flutter/services.dart'; | |
import 'package:fluttertoast/fluttertoast.dart'; | |
import 'package:local_auth/local_auth.dart'; | |
import 'package:<package>/components/CustomToast.dart'; | |
import 'package:<package>/utils/Consts.dart'; | |
class Authentication { | |
static LocalAuthentication _localAuthentication = LocalAuthentication(); | |
static Future authenticate(context) async { |
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 com.android.build.OutputFile | |
def keystoreProperties = new Properties() | |
def keystorePropertiesFile = rootProject.file('key.properties') | |
if (keystorePropertiesFile.exists()) { | |
keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) | |
} | |
/** | |
* Set this to true to create two separate APKs instead of one: |
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 Balance extends StatefulWidget { | |
Balance({Key key}) : super(key: key); | |
@override | |
_balanceState createState() => _balanceState(); | |
} | |
class _balanceState extends State<Balance> {} |
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 Balance extends StatefulWidget { | |
Balance({Key key}) : super(key: key); | |
@override | |
BalanceState createState() => BalanceState(); | |
} | |
class BalanceState extends State<Balance> {} |
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:flutter/material.dart'; | |
import 'package:flutter_test/flutter_test.dart'; | |
import 'package:<package>/App.dart'; | |
void main() { | |
testWidgets('Counter increments smoke test', (WidgetTester tester) async { | |
// Build our app and trigger a frame. | |
await tester.pumpWidget(App()); | |
// Verify that our counter starts at 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
import 'package:flutter_driver/flutter_driver.dart'; | |
import 'package:test/test.dart'; | |
import 'package:screenshots/screenshots.dart'; | |
void main() { | |
group('Integration Tests', () { | |
final config = Config(); | |
FlutterDriver driver; |
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:flutter_driver/driver_extension.dart'; | |
import 'package:<package>/main.dart' as app; | |
void main() { | |
// This line enables the extension. | |
enableFlutterDriverExtension(); | |
// Call the `main()` function of the app, or call `runApp` with | |
// any widget you are interested in testing. | |
app.main(); |
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
StreamController<String> _accountController = new StreamController(); | |
@override | |
void initState() { | |
super.initState(); | |
Future<void>.delayed( | |
Duration(seconds: 2), | |
() => _accountController.add('Data Loaded'), | |
); | |
} |
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<String> _calculation = Future<String>.delayed( | |
Duration(seconds: 2), | |
() => 'Data Loaded', | |
); | |
Widget build(BuildContext context) { | |
return Container( | |
child: FutureBuilder<String>( | |
future: _calculation, | |
builder: (BuildContext context, AsyncSnapshot<String> snapshot) { |
NewerOlder