Made build portable

This commit is contained in:
Alessandro Autiero
2022-10-07 17:23:30 +02:00
parent 000a2a53ed
commit 55467152c9
128 changed files with 54402 additions and 7 deletions

View File

@@ -0,0 +1,37 @@
import 'package:fluent_ui/fluent_ui.dart';
import 'package:flutter_test/flutter_test.dart';
import 'app_test.dart';
void main() {
testWidgets('Checkbox change state accordingly', (WidgetTester tester) async {
bool? checkBoxValue = false;
await tester.pumpWidget(
StatefulBuilder(
builder: (BuildContext context, StateSetter setState) {
return wrapApp(
child: Checkbox(
checked: checkBoxValue,
onChanged: (bool? value) {
setState(() {
checkBoxValue = value;
});
},
),
);
},
),
);
expect(tester.widget<Checkbox>(find.byType(Checkbox)).checked, false);
await tester.tap(find.byType(Checkbox));
await tester.pumpAndSettle();
expect(checkBoxValue, true);
await tester.tap(find.byType(Checkbox));
await tester.pumpAndSettle();
expect(checkBoxValue, false);
});
}