Skip to content

Instantly share code, notes, and snippets.

name: CI
on:
push:
branches:
- localnet
- devnet
- mainnet
pull_request:
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 {
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:
class Balance extends StatefulWidget {
Balance({Key key}) : super(key: key);
@override
_balanceState createState() => _balanceState();
}
class _balanceState extends State<Balance> {}
class Balance extends StatefulWidget {
Balance({Key key}) : super(key: key);
@override
BalanceState createState() => BalanceState();
}
class BalanceState extends State<Balance> {}
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.
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;
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();
StreamController<String> _accountController = new StreamController();
@override
void initState() {
super.initState();
Future<void>.delayed(
Duration(seconds: 2),
() => _accountController.add('Data Loaded'),
);
}
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) {