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
name: Upload build artifact | |
on: | |
push: | |
branches: | |
- "master" | |
- "actions/*" | |
paths: | |
- "iwfpapp/**" | |
- ".github/**" | |
jobs: |
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
name: Documentation | |
on: | |
push: | |
branches: | |
- "master" | |
jobs: | |
deploy: | |
name: Generate documentation | |
runs-on: ubuntu-latest | |
steps: |
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
class MyWidget extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'demo', | |
home: Scaffold( | |
appBar: AppBar( | |
title: Text('demo title'), | |
), | |
body: Center( |
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
/// main.dart (the entry point to the demo app) | |
import 'package:flutter/material.dart'; | |
import 'package:demo_async_test/contrib.dart'; | |
import 'package:demo_async_test/slow.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override |
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'; | |
import 'package:flutter_test/flutter_test.dart'; | |
import 'package:demo_async_test/main.dart'; | |
void main() { | |
testWidgets('Counter increments', (WidgetTester tester) async { | |
await tester.pumpWidget(MyApp()); | |
expect(find.text('0'), findsOneWidget); | |
await tester.tap(find.byIcon(Icons.add)); |
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
testWidgets('Counter increments', (WidgetTester tester) async { | |
await tester.pumpWidget(MyApp()); | |
expect(find.text('0'), findsOneWidget); | |
await tester.tap(find.byIcon(Icons.add)); | |
await tester.pump(); | |
expect(find.text('1'), findsOneWidget); | |
}); |
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
testWidgets('Slow screen content shows up', (WidgetTester tester) async { | |
await tester.pumpWidget(MyApp()); | |
await tester.tap(find.byKey(Key('slow_btn'))); | |
await tester.pumpAndSettle(new Duration(seconds: 5)); | |
expect(find.byKey(Key('slow_content')), findsOneWidget); | |
}); |
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
testWidgets('Counter increments', (WidgetTester tester) async { | |
await tester.pumpWidget(MyApp()); | |
expect(find.text('0'), findsOneWidget); | |
await tester.tap(find.byIcon(Icons.add)); | |
expect(find.text('1'), findsOneWidget); | |
}); |
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
testWidgets('Contrib screen shows up', (WidgetTester tester) async { | |
await tester.pumpWidget(MyApp()); | |
await tester.tap(find.byKey(Key('contrib_btn'))); | |
await tester.pump(); | |
await tester.pump(); | |
// and many more pump... | |
await tester.pump(); | |
await tester.pump(); | |
await tester.pump(); | |
expect(find.byKey(Key('contrib_title')), findsOneWidget); |