1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00

Flutter 3.7.0 (#1556)

* Update `simplistic_editor` for Flutter 3.4 beta

* Re-enable beta and master CI

* Disable on master

* Added sample code for using plugins and channels from background isolates.

* goderbauer feedback 1

* goderbauer feedback2

* goderbauer feedback 3

* Add `background_isolate_channels` to CI

* Enable beta CI

* Enable all `stable` CI projects

* `dart fix --apply`

* `print` -> `denugPrint`

* Make deps min version not pinned

* Drop `_isDebug`

* Remove unused import

* `dart format`

* Fixup `linting_tool`

* Fixup `form_app`

* Enable all `master` CI

* Basic fixes

* Patch `simplistic_editor`

* Fix nl at eol

* Comment out `simplistic_editor`

* Incorporating @bleroux's latest changes

* Clean up CI scripts

* Copy `experimental/material_3_demo` to top level

* Update `game_template`

* Update `animations`

* Update `desktop_photo_search`

* Update `flutter_maps_firestore`

* Update `form_app`

* Update `infinite_list`

* Update `isolate_example`

* Update `jsonexample`

* Update `navigation_and_routing`

* Update `place_tracker`

* Update `platform_channels`

* Update `platform_design`

* Update `provider_shopper`

* Fixup `context_menus`

* `dart format`

* Update the main `material_3_demo`

* Make `tool/flutter_ci_script_stable.sh` executable again

Co-authored-by: Bruno Leroux <bruno.leroux@gmail.com>
Co-authored-by: Aaron Clarke <aaclarke@google.com>
This commit is contained in:
Brett Morgan
2023-01-25 10:08:51 +11:00
committed by GitHub
parent 4ee2002665
commit 5401bb88b4
337 changed files with 4550 additions and 1516 deletions

View File

@@ -16,59 +16,70 @@ void main() {
'selected on NavigationBar', (tester) async {
widgetSetup(tester, 449);
addTearDown(tester.binding.window.clearPhysicalSizeTestValue);
await tester.pumpWidget(const Material3Demo());
await tester.pumpWidget(const MaterialApp(home: Material3Demo()));
expect(find.text("Display Large"), findsNothing);
expect(find.text('Display Large'), findsNothing);
expect(find.byType(NavigationBar), findsOneWidget);
Finder textIconOnBar = find.byIcon(Icons.text_snippet_outlined);
Finder textIconOnBar = find.descendant(
of: find.byType(NavigationBar),
matching: find.byIcon(Icons.text_snippet_outlined));
expect(textIconOnBar, findsOneWidget);
await tester.tap(textIconOnBar);
await tester.pumpAndSettle(const Duration(microseconds: 500));
expect(textIconOnBar, findsNothing);
expect(find.byIcon(Icons.text_snippet), findsOneWidget);
expect(find.text("Display Large"), findsOneWidget);
Finder selectedTextIconOnBar = find.descendant(
of: find.byType(NavigationBar),
matching: find.byIcon(Icons.text_snippet));
expect(selectedTextIconOnBar, findsOneWidget);
expect(find.text('Display Large'), findsOneWidget);
});
testWidgets(
'Typography screen shows correctly when the corresponding icon is '
'selected on NavigationRail', (tester) async {
widgetSetup(tester, 450); // NavigationRail shows only when width is >= 450.
widgetSetup(
tester, 1200); // NavigationRail shows only when width is > 1000.
addTearDown(tester.binding.window.clearPhysicalSizeTestValue);
await tester.pumpWidget(const Material3Demo());
expect(find.text("Display Large"), findsNothing);
await tester.pumpWidget(const MaterialApp(home: Material3Demo()));
expect(find.text('Display Large'), findsNothing);
expect(find.byType(NavigationRail), findsOneWidget);
Finder textIconOnRail = find.byIcon(Icons.text_snippet_outlined);
Finder textIconOnRail = find.descendant(
of: find.byType(NavigationRail),
matching: find.byIcon(Icons.text_snippet_outlined));
expect(textIconOnRail, findsOneWidget);
await tester.tap(textIconOnRail);
await tester.pumpAndSettle(const Duration(microseconds: 500));
expect(textIconOnRail, findsNothing);
expect(find.byIcon(Icons.text_snippet), findsOneWidget);
expect(find.text("Display Large"), findsOneWidget);
Finder selectedTextIconOnRail = find.descendant(
of: find.byType(NavigationRail),
matching: find.byIcon(Icons.text_snippet));
expect(selectedTextIconOnRail, findsOneWidget);
expect(find.text('Display Large'), findsOneWidget);
});
testWidgets('Typography screen shows correct content', (tester) async {
await tester.pumpWidget(MaterialApp(
home: Scaffold(body: Row(children: const [TypographyScreen()])),
));
expect(find.text("Display Large"), findsOneWidget);
expect(find.text("Display Medium"), findsOneWidget);
expect(find.text("Display Small"), findsOneWidget);
expect(find.text("Headline Large"), findsOneWidget);
expect(find.text("Headline Medium"), findsOneWidget);
expect(find.text("Headline Small"), findsOneWidget);
expect(find.text("Title Large"), findsOneWidget);
expect(find.text("Title Medium"), findsOneWidget);
expect(find.text("Title Small"), findsOneWidget);
expect(find.text('Display Large'), findsOneWidget);
expect(find.text('Display Medium'), findsOneWidget);
expect(find.text('Display Small'), findsOneWidget);
expect(find.text('Headline Large'), findsOneWidget);
expect(find.text('Headline Medium'), findsOneWidget);
expect(find.text('Headline Small'), findsOneWidget);
expect(find.text('Title Large'), findsOneWidget);
expect(find.text('Title Medium'), findsOneWidget);
expect(find.text('Title Small'), findsOneWidget);
await tester.scrollUntilVisible(
find.text("Body Small"),
find.text('Body Small'),
500.0,
);
expect(find.text("Label Large"), findsOneWidget);
expect(find.text("Label Medium"), findsOneWidget);
expect(find.text("Label Small"), findsOneWidget);
expect(find.text("Body Large"), findsOneWidget);
expect(find.text("Body Medium"), findsOneWidget);
expect(find.text("Body Small"), findsOneWidget);
expect(find.text('Label Large'), findsOneWidget);
expect(find.text('Label Medium'), findsOneWidget);
expect(find.text('Label Small'), findsOneWidget);
expect(find.text('Body Large'), findsOneWidget);
expect(find.text('Body Medium'), findsOneWidget);
expect(find.text('Body Small'), findsOneWidget);
expect(find.byType(TextStyleExample), findsNWidgets(15));
});