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,38 @@
import 'package:fluent_ui/fluent_ui.dart';
import 'package:flutter_test/flutter_test.dart';
import 'app_test.dart';
void main() {
testWidgets('RadioButton change state accordingly',
(WidgetTester tester) async {
bool radioButtonValue = false;
await tester.pumpWidget(
StatefulBuilder(
builder: (BuildContext context, StateSetter setState) {
return wrapApp(
child: RadioButton(
checked: radioButtonValue,
onChanged: (bool value) {
setState(() {
radioButtonValue = value;
});
},
),
);
},
),
);
expect(tester.widget<RadioButton>(find.byType(RadioButton)).checked, false);
await tester.tap(find.byType(RadioButton));
await tester.pumpAndSettle();
expect(radioButtonValue, true);
await tester.tap(find.byType(RadioButton));
await tester.pumpAndSettle();
expect(radioButtonValue, false);
});
}