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
# Privacy Policy | |
We takes your privacy seriously. To better protect your privacy we provide this privacy policy notice explaining the way your personal information is collected and used. | |
## Collection of Routine Information | |
This app track basic information about their users. This information includes, but is not limited to, IP addresses, app details, timestamps, game stats and referring pages. None of this information can personally identify specific user to this app. The information is tracked for routine administration and maintenance purposes. | |
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() { | |
arithmetricOperators(); | |
equalityOperators(); | |
typeTestOperators(); | |
assigmentOperators(); | |
logicalOperators(); | |
bitwiseAndShiftOperators(); | |
conditionalExpressions(); | |
cascateNotation(); | |
otherOperators(); |
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 MyGenericType<T> { | |
const MyGenericType(this.data); | |
final T data; | |
} | |
void main() { | |
final type = MyGenericType('Exemplo'); | |
print(type); | |
} |
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
# This is a basic workflow to help you get started with Actions | |
name: Run tests | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [ master ] | |
pull_request: |
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(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { |
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 'dart:ui'; | |
import 'package:flutter_test/flutter_test.dart'; | |
import 'package:flutter_test/src/widget_tester.dart'; | |
import 'package:golden_tests/main.dart'; | |
void main() { | |
testWidgets('Testing with 360x640', (WidgetTester tester) async { | |
await tester.setScreenSize(width: 360, height: 640); //Samsung Galaxy S7 | |
await tester.pumpWidget(MyApp()); | |
await expectLater( |
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(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@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'; | |
import 'package:flutter_test/src/widget_tester.dart'; | |
extension SetScreenSize on WidgetTester { | |
Future<void> setScreenSize( | |
{double width = 540, | |
double height = 960, | |
double pixelDensity = 1}) async { | |
final size = Size(width, height); | |
await this.binding.setSurfaceSize(size); |
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
// Função do test | |
testWidgets('Descrição do golden teste', (WidgetTester tester) async { | |
//Renderiza Widget | |
await tester.pumpWidget(MyWidget()); | |
//Define golden test | |
await expectLater(find.byType(MyWidget), matchesGoldenFile('my_widget.png')); | |
} |
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() { | |
testWidgets('MyWidget has a title and message', (WidgetTester tester) async { | |
await tester.pumpWidget(MyWidget(title: 'T', message: 'M')); | |
final titleFinder = find.text('T'); | |
final messageFinder = find.text('M'); | |
// Use the `findsOneWidget` matcher provided by flutter_test to verify | |
// that the Text widgets appear exactly once in the widget tree. | |
expect(titleFinder, findsOneWidget); | |
expect(messageFinder, findsOneWidget); | |
}); |
NewerOlder