1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-10 14:58:34 +00:00

Update for Flutter 3.10 beta (#1746)

## Pre-launch Checklist

- [x] I read the [Flutter Style Guide] _recently_, and have followed its
advice.
- [x] I signed the [CLA].
- [x] I read the [Contributors Guide].
- [x] I updated/added relevant documentation (doc comments with `///`).
- [ ] All existing and new tests are passing.

---------

Co-authored-by: David Iglesias <ditman@gmail.com>
Co-authored-by: Mark Thompson <2554588+MarkTechson@users.noreply.github.com>
Co-authored-by: John Ryan <ryjohn@google.com>
This commit is contained in:
Brett Morgan
2023-05-11 06:16:31 +10:00
committed by GitHub
parent 474756ce04
commit 36e7a6ab04
188 changed files with 1779 additions and 1968 deletions

View File

@@ -20,7 +20,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: '>=2.19.5 <4.0.0'
sdk: ^3.0.0-0
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions

View File

@@ -38,22 +38,18 @@ void main() {
case TargetPlatform.iOS:
expect(find.byType(CupertinoTextSelectionToolbarButton), findsNothing);
expect(find.byType(CupertinoButton), findsNWidgets(2));
break;
case TargetPlatform.macOS:
expect(find.byType(CupertinoButton), findsNWidgets(2));
expect(find.byType(CupertinoDesktopTextSelectionToolbarButton),
findsNothing);
break;
case TargetPlatform.android:
case TargetPlatform.fuchsia:
expect(find.byType(CupertinoButton), findsNWidgets(1));
expect(find.byType(TextSelectionToolbarTextButton), findsNothing);
break;
case TargetPlatform.linux:
case TargetPlatform.windows:
expect(find.byType(CupertinoButton), findsNWidgets(1));
expect(find.byType(DesktopTextSelectionToolbarButton), findsNothing);
break;
}
});
}

View File

@@ -38,20 +38,16 @@ void main() {
case TargetPlatform.iOS:
expect(
find.byType(CupertinoTextSelectionToolbarButton), findsNWidgets(2));
break;
case TargetPlatform.macOS:
expect(find.byType(CupertinoDesktopTextSelectionToolbarButton),
findsNWidgets(2));
break;
case TargetPlatform.android:
case TargetPlatform.fuchsia:
expect(find.byType(TextSelectionToolbarTextButton), findsNWidgets(1));
break;
case TargetPlatform.linux:
case TargetPlatform.windows:
expect(
find.byType(DesktopTextSelectionToolbarButton), findsNWidgets(1));
break;
}
});
}

View File

@@ -45,20 +45,16 @@ void main() {
case TargetPlatform.iOS:
expect(
find.byType(CupertinoTextSelectionToolbarButton), findsNWidgets(2));
break;
case TargetPlatform.macOS:
expect(find.byType(CupertinoDesktopTextSelectionToolbarButton),
findsNWidgets(2));
break;
case TargetPlatform.android:
case TargetPlatform.fuchsia:
expect(find.byType(TextSelectionToolbarTextButton), findsNWidgets(1));
break;
case TargetPlatform.linux:
case TargetPlatform.windows:
expect(
find.byType(DesktopTextSelectionToolbarButton), findsNWidgets(1));
break;
}
// Tap the next field to hide the context menu.

View File

@@ -51,20 +51,16 @@ void main() {
case TargetPlatform.iOS:
expect(
find.byType(CupertinoTextSelectionToolbarButton), findsNWidgets(2));
break;
case TargetPlatform.macOS:
expect(find.byType(CupertinoDesktopTextSelectionToolbarButton),
findsNWidgets(2));
break;
case TargetPlatform.android:
case TargetPlatform.fuchsia:
expect(find.byType(TextSelectionToolbarTextButton), findsNWidgets(3));
break;
case TargetPlatform.linux:
case TargetPlatform.windows:
expect(
find.byType(DesktopTextSelectionToolbarButton), findsNWidgets(3));
break;
}
// Click on "Copy" to hide the context menu.
@@ -99,20 +95,16 @@ void main() {
case TargetPlatform.iOS:
expect(
find.byType(CupertinoTextSelectionToolbarButton), findsNWidgets(3));
break;
case TargetPlatform.macOS:
expect(find.byType(CupertinoDesktopTextSelectionToolbarButton),
findsNWidgets(3));
break;
case TargetPlatform.android:
case TargetPlatform.fuchsia:
expect(find.byType(TextSelectionToolbarTextButton), findsNWidgets(4));
break;
case TargetPlatform.linux:
case TargetPlatform.windows:
expect(
find.byType(DesktopTextSelectionToolbarButton), findsNWidgets(4));
break;
}
});
}

View File

@@ -45,19 +45,15 @@ void main() {
switch (defaultTargetPlatform) {
case TargetPlatform.iOS:
expect(find.byType(CupertinoTextSelectionToolbar), findsOneWidget);
break;
case TargetPlatform.android:
expect(find.byType(TextSelectionToolbar), findsOneWidget);
break;
case TargetPlatform.fuchsia:
case TargetPlatform.linux:
case TargetPlatform.windows:
expect(find.byType(DesktopTextSelectionToolbar), findsOneWidget);
break;
case TargetPlatform.macOS:
expect(find.byType(CupertinoDesktopTextSelectionToolbar),
findsOneWidget);
break;
}
// Tap the next field to hide the context menu.
@@ -84,13 +80,11 @@ void main() {
case TargetPlatform.android:
case TargetPlatform.fuchsia:
expect(find.byType(CupertinoTextSelectionToolbar), findsOneWidget);
break;
case TargetPlatform.macOS:
case TargetPlatform.linux:
case TargetPlatform.windows:
expect(find.byType(CupertinoDesktopTextSelectionToolbar),
findsOneWidget);
break;
}
// Tap the next field to hide the context menu.
@@ -114,19 +108,15 @@ void main() {
switch (defaultTargetPlatform) {
case TargetPlatform.iOS:
expect(find.byType(CupertinoTextSelectionToolbar), findsOneWidget);
break;
case TargetPlatform.android:
expect(find.byType(TextSelectionToolbar), findsOneWidget);
break;
case TargetPlatform.fuchsia:
case TargetPlatform.linux:
case TargetPlatform.windows:
expect(find.byType(DesktopTextSelectionToolbar), findsOneWidget);
break;
case TargetPlatform.macOS:
expect(find.byType(CupertinoDesktopTextSelectionToolbar),
findsOneWidget);
break;
}
// Tap the next field to hide the context menu.
@@ -171,19 +161,15 @@ void main() {
switch (defaultTargetPlatform) {
case TargetPlatform.iOS:
expect(find.byType(CupertinoTextSelectionToolbar), findsOneWidget);
break;
case TargetPlatform.android:
expect(find.byType(TextSelectionToolbar), findsOneWidget);
break;
case TargetPlatform.fuchsia:
case TargetPlatform.linux:
case TargetPlatform.windows:
expect(find.byType(DesktopTextSelectionToolbar), findsOneWidget);
break;
case TargetPlatform.macOS:
expect(find.byType(CupertinoDesktopTextSelectionToolbar),
findsOneWidget);
break;
}
},
variant: TargetPlatformVariant.all(),