Fixed typos (#159331)
Here's another one of my PRs where I hunt for typos across `flutter` repo. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [Features we expect every widget to implement]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
This commit is contained in:
parent
c5132b52c2
commit
e2ada1c939
@ -14,7 +14,7 @@ void main() {
|
|||||||
expect(find.byType(ExpansionTile), findsExactly(3));
|
expect(find.byType(ExpansionTile), findsExactly(3));
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('exapansion tile has one h1 tag', (WidgetTester tester) async {
|
testWidgets('expansion tile has one h1 tag', (WidgetTester tester) async {
|
||||||
await pumpsUseCase(tester, ExpansionTileUseCase());
|
await pumpsUseCase(tester, ExpansionTileUseCase());
|
||||||
final Finder findHeadingLevelOnes = find.bySemanticsLabel('ExpansionTile Demo');
|
final Finder findHeadingLevelOnes = find.bySemanticsLabel('ExpansionTile Demo');
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
|
@ -127,8 +127,8 @@ Future<void> main() async {
|
|||||||
final ArgResults results = parser.parse(mainArgs);
|
final ArgResults results = parser.parse(mainArgs);
|
||||||
final List<String> selectedTests = results.multiOption('tests');
|
final List<String> selectedTests = results.multiOption('tests');
|
||||||
|
|
||||||
// Shuffle the tests becauase we don't want order dependent tests.
|
// Shuffle the tests because we don't want order dependent tests.
|
||||||
// It is the responsibily of the infra to tell us what the seed value is,
|
// It is the responsibility of the infra to tell us what the seed value is,
|
||||||
// in case we want to have the seed stable for some time period.
|
// in case we want to have the seed stable for some time period.
|
||||||
final List<Benchmark> tests = benchmarks.where((Benchmark e) => selectedTests.contains(e.$1)).toList();
|
final List<Benchmark> tests = benchmarks.where((Benchmark e) => selectedTests.contains(e.$1)).toList();
|
||||||
tests.shuffle(Random(int.parse(results.option('seed')!)));
|
tests.shuffle(Random(int.parse(results.option('seed')!)));
|
||||||
|
@ -25,7 +25,7 @@ Future<void> execute() async {
|
|||||||
|
|
||||||
final BenchmarkResultPrinter printer = BenchmarkResultPrinter();
|
final BenchmarkResultPrinter printer = BenchmarkResultPrinter();
|
||||||
|
|
||||||
void runNotifiyListenersLoopWithObserverList(
|
void runNotifyListenersLoopWithObserverList(
|
||||||
int totalIterations, {
|
int totalIterations, {
|
||||||
bool failRemoval = false,
|
bool failRemoval = false,
|
||||||
bool addResult = true,
|
bool addResult = true,
|
||||||
@ -79,7 +79,7 @@ Future<void> execute() async {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void runNotifiyListenersLoopWithHashedObserverList(
|
void runNotifyListenersLoopWithHashedObserverList(
|
||||||
int totalIterations, {
|
int totalIterations, {
|
||||||
bool addResult = true,
|
bool addResult = true,
|
||||||
}) {
|
}) {
|
||||||
@ -124,7 +124,7 @@ Future<void> execute() async {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void runNotifiyListenersLoopWithAnimationController(
|
void runNotifyListenersLoopWithAnimationController(
|
||||||
int totalIterations, {
|
int totalIterations, {
|
||||||
bool addResult = true,
|
bool addResult = true,
|
||||||
}) {
|
}) {
|
||||||
@ -162,11 +162,11 @@ Future<void> execute() async {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
runNotifiyListenersLoopWithObserverList(_kNumIterationsList);
|
runNotifyListenersLoopWithObserverList(_kNumIterationsList);
|
||||||
runNotifiyListenersLoopWithObserverList(_kNumIterationsList,
|
runNotifyListenersLoopWithObserverList(_kNumIterationsList,
|
||||||
failRemoval: true);
|
failRemoval: true);
|
||||||
runNotifiyListenersLoopWithHashedObserverList(_kNumIterationsHashed);
|
runNotifyListenersLoopWithHashedObserverList(_kNumIterationsHashed);
|
||||||
runNotifiyListenersLoopWithAnimationController(_kNumIterationsHashed);
|
runNotifyListenersLoopWithAnimationController(_kNumIterationsHashed);
|
||||||
|
|
||||||
printer.printToStdout();
|
printer.printToStdout();
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ final List<String> flutterTestArgs = <String>[];
|
|||||||
/// Whether execution should be simulated for debugging purposes.
|
/// Whether execution should be simulated for debugging purposes.
|
||||||
///
|
///
|
||||||
/// When `true`, calls to [runCommand] print to [io.stdout] instead of running
|
/// When `true`, calls to [runCommand] print to [io.stdout] instead of running
|
||||||
/// the process. This is useful for determing what an invocation of `test.dart`
|
/// the process. This is useful for determining what an invocation of `test.dart`
|
||||||
/// _might_ due if not invoked with `--dry-run`, or otherwise determine what the
|
/// _might_ due if not invoked with `--dry-run`, or otherwise determine what the
|
||||||
/// different test shards and sub-shards are configured as.
|
/// different test shards and sub-shards are configured as.
|
||||||
bool get dryRun => _dryRun ?? false;
|
bool get dryRun => _dryRun ?? false;
|
||||||
@ -621,7 +621,7 @@ List<T> selectIndexOfTotalSubshard<T>(List<T> tests, {String subshardKey = kSubs
|
|||||||
required int subShardCount,
|
required int subShardCount,
|
||||||
}) {
|
}) {
|
||||||
// While there exists a closed formula figuring out the range of tests the
|
// While there exists a closed formula figuring out the range of tests the
|
||||||
// subshard is resposible for, modeling this as a simulation of distributing
|
// subshard is responsible for, modeling this as a simulation of distributing
|
||||||
// items equally into buckets is more intuitive.
|
// items equally into buckets is more intuitive.
|
||||||
//
|
//
|
||||||
// A bucket represents how many tests a subshard should be allocated.
|
// A bucket represents how many tests a subshard should be allocated.
|
||||||
|
@ -2042,7 +2042,7 @@ class MemoryTest {
|
|||||||
await receivedNextMessage;
|
await receivedNextMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Taps the application and looks for acknowldgement.
|
/// Taps the application and looks for acknowledgement.
|
||||||
///
|
///
|
||||||
/// This is used by several tests to ensure scrolling gestures are installed.
|
/// This is used by several tests to ensure scrolling gestures are installed.
|
||||||
Future<void> tapNotification() async {
|
Future<void> tapNotification() async {
|
||||||
|
@ -11,7 +11,7 @@ import 'package:process/process.dart';
|
|||||||
/// A minimal wrapper around the `adb` command-line tool.
|
/// A minimal wrapper around the `adb` command-line tool.
|
||||||
@internal
|
@internal
|
||||||
class Adb {
|
class Adb {
|
||||||
const Adb._(this._prefixArgs, this._proccess);
|
const Adb._(this._prefixArgs, this._process);
|
||||||
|
|
||||||
/// Creates a new `adb` command runner that uses the `adb` command-line tool.
|
/// Creates a new `adb` command runner that uses the `adb` command-line tool.
|
||||||
///
|
///
|
||||||
@ -41,7 +41,7 @@ class Adb {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<AdbStringResult> _runString(List<String> args) async {
|
Future<AdbStringResult> _runString(List<String> args) async {
|
||||||
final io.ProcessResult result = await _proccess.run(
|
final io.ProcessResult result = await _process.run(
|
||||||
<String>[
|
<String>[
|
||||||
..._prefixArgs,
|
..._prefixArgs,
|
||||||
...args,
|
...args,
|
||||||
@ -55,7 +55,7 @@ class Adb {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<AdbBinaryResult> _runBinary(List<String> args) async {
|
Future<AdbBinaryResult> _runBinary(List<String> args) async {
|
||||||
final io.ProcessResult result = await _proccess.run(
|
final io.ProcessResult result = await _process.run(
|
||||||
<String>[
|
<String>[
|
||||||
..._prefixArgs,
|
..._prefixArgs,
|
||||||
...args,
|
...args,
|
||||||
@ -70,7 +70,7 @@ class Adb {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final List<String> _prefixArgs;
|
final List<String> _prefixArgs;
|
||||||
final ProcessManager _proccess;
|
final ProcessManager _process;
|
||||||
|
|
||||||
/// Returns whether the device is currently connected.
|
/// Returns whether the device is currently connected.
|
||||||
///
|
///
|
||||||
@ -161,7 +161,7 @@ class Adb {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Disable confirnations for immersive mode.
|
/// Disable confirmations for immersive mode.
|
||||||
Future<void> disableImmersiveModeConfirmations() async {
|
Future<void> disableImmersiveModeConfirmations() async {
|
||||||
final AdbStringResult result = await _runString(<String>[
|
final AdbStringResult result = await _runString(<String>[
|
||||||
'shell',
|
'shell',
|
||||||
|
@ -86,7 +86,7 @@ final class AndroidNativeDriver implements NativeDriver {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Future<NativeScreenshot> screenshot() async {
|
Future<NativeScreenshot> screenshot() async {
|
||||||
// Indentical wait to what `FlutterDriver.screenshot` does.
|
// Identical wait to what `FlutterDriver.screenshot` does.
|
||||||
await _waitFor2s();
|
await _waitFor2s();
|
||||||
return _AdbScreencap(await _adb.screencap(), _tmpDir);
|
return _AdbScreencap(await _adb.screencap(), _tmpDir);
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ final class NativeResult extends Result {
|
|||||||
Map<String, dynamic> toJson() => const <String, Object?>{};
|
Map<String, dynamic> toJson() => const <String, Object?>{};
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An object that descrbes searching for _native_ elements.
|
/// An object that describes searching for _native_ elements.
|
||||||
sealed class NativeFinder {
|
sealed class NativeFinder {
|
||||||
const NativeFinder();
|
const NativeFinder();
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ final class NaiveLocalFileComparator extends GoldenFileComparator {
|
|||||||
// late NativeDriver nativeDriver;
|
// late NativeDriver nativeDriver;
|
||||||
|
|
||||||
/// Asserts that a [NativeScreenshot], [Future<NativeScreenshot>], or
|
/// Asserts that a [NativeScreenshot], [Future<NativeScreenshot>], or
|
||||||
/// [List<int>] matches the golden image file indentified by [key], with an
|
/// [List<int>] matches the golden image file identified by [key], with an
|
||||||
/// optional [version] number].
|
/// optional [version] number].
|
||||||
///
|
///
|
||||||
/// The [key] may be either a [Uri] or a [String] representation of a URL.
|
/// The [key] may be either a [Uri] or a [String] representation of a URL.
|
||||||
@ -151,7 +151,7 @@ final class NaiveLocalFileComparator extends GoldenFileComparator {
|
|||||||
/// ## Golden File Testing
|
/// ## Golden File Testing
|
||||||
///
|
///
|
||||||
/// The term __golden file__ refers to a master image that is considered the
|
/// The term __golden file__ refers to a master image that is considered the
|
||||||
/// true renmdering of a given widget, state, application, or other visual
|
/// true rendering of a given widget, state, application, or other visual
|
||||||
/// representation you have chosen to capture.
|
/// representation you have chosen to capture.
|
||||||
///
|
///
|
||||||
/// The master golden image files are tested against can be created or updated
|
/// The master golden image files are tested against can be created or updated
|
||||||
|
@ -1079,7 +1079,7 @@ However, where possible avoid global constants. Rather than `kDefaultButtonColor
|
|||||||
|
|
||||||
### Avoid abbreviations
|
### Avoid abbreviations
|
||||||
|
|
||||||
Unless the abbreviation is more recognizable than the expansion (e.g. XML, HTTP, JSON), expand abbrevations
|
Unless the abbreviation is more recognizable than the expansion (e.g. XML, HTTP, JSON), expand abbreviations
|
||||||
when selecting a name for an identifier. In general, avoid one-character names unless one character is idiomatic
|
when selecting a name for an identifier. In general, avoid one-character names unless one character is idiomatic
|
||||||
(for example, prefer `index` over `i`, but prefer `x` over `horizontalPosition`).
|
(for example, prefer `index` over `i`, but prefer `x` over `horizontalPosition`).
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ See below for instructions on bringing up test scaffolding in a plugin (*does no
|
|||||||
1. Use of OCMock in new tests, especially Swift tests, is discouraged in favor of protocol-based
|
1. Use of OCMock in new tests, especially Swift tests, is discouraged in favor of protocol-based
|
||||||
programming and dependency injection. However, if your XCTests require OCMock, open the
|
programming and dependency injection. However, if your XCTests require OCMock, open the
|
||||||
Package Dependencies section of the project in Xcode, and add the following dependency to
|
Package Dependencies section of the project in Xcode, and add the following dependency to
|
||||||
the RunnnerTests target:
|
the RunnerTests target:
|
||||||
|
|
||||||
```
|
```
|
||||||
https://github.com/erikdoe/ocmock
|
https://github.com/erikdoe/ocmock
|
||||||
|
@ -53,7 +53,7 @@ class _SliverAutoScrollExampleState extends State<SliverAutoScrollExample> {
|
|||||||
|
|
||||||
// After an interactive scroll ends, if the alignedItem is partially visible
|
// After an interactive scroll ends, if the alignedItem is partially visible
|
||||||
// at the top or bottom of the viewport, then auto-scroll so that it's
|
// at the top or bottom of the viewport, then auto-scroll so that it's
|
||||||
// completely visible. To accomodate mouse-wheel scrolls and other small
|
// completely visible. To accommodate mouse-wheel scrolls and other small
|
||||||
// adjustments, scrolls that change the scroll offset by less than
|
// adjustments, scrolls that change the scroll offset by less than
|
||||||
// the alignedItem's extent don't trigger an auto-scroll.
|
// the alignedItem's extent don't trigger an auto-scroll.
|
||||||
void maybeAutoScrollAlignedItem(RenderSliver alignedItem) {
|
void maybeAutoScrollAlignedItem(RenderSliver alignedItem) {
|
||||||
|
@ -56,7 +56,7 @@ class _IsScrollingListenerExampleState extends State<IsScrollingListenerExample>
|
|||||||
}
|
}
|
||||||
|
|
||||||
// After an interactive scroll "ends", auto-scroll so that last item in the
|
// After an interactive scroll "ends", auto-scroll so that last item in the
|
||||||
// viewport is completely visible. To accomodate mouse-wheel scrolls, other small
|
// viewport is completely visible. To accommodate mouse-wheel scrolls, other small
|
||||||
// adjustments, and scrolling to the top, scrolls that put the scroll offset at
|
// adjustments, and scrolling to the top, scrolls that put the scroll offset at
|
||||||
// zero or change the scroll offset by less than itemExtent don't trigger
|
// zero or change the scroll offset by less than itemExtent don't trigger
|
||||||
// an auto-scroll.
|
// an auto-scroll.
|
||||||
|
@ -45,7 +45,7 @@ class _SettingsAppBarExampleState extends State<SettingsAppBarExample> {
|
|||||||
|
|
||||||
// The key must be for a widget _below_ a RenderSliver so that
|
// The key must be for a widget _below_ a RenderSliver so that
|
||||||
// findAncestorRenderObjectOfType can find the RenderSliver when it searches
|
// findAncestorRenderObjectOfType can find the RenderSliver when it searches
|
||||||
// the key widget's renderer ancesotrs.
|
// the key widget's renderer ancestors.
|
||||||
RenderSliver? keyToSliver(GlobalKey key) => key.currentContext?.findAncestorRenderObjectOfType<RenderSliver>();
|
RenderSliver? keyToSliver(GlobalKey key) => key.currentContext?.findAncestorRenderObjectOfType<RenderSliver>();
|
||||||
|
|
||||||
// Each time the app's list scrolls: if the Title sliver has scrolled completely behind
|
// Each time the app's list scrolls: if the Title sliver has scrolled completely behind
|
||||||
|
@ -15,7 +15,7 @@ void main() {
|
|||||||
final double itemHeight = tester.getSize(find.widgetWithText(Card, 'Item 0.15')).height;
|
final double itemHeight = tester.getSize(find.widgetWithText(Card, 'Item 0.15')).height;
|
||||||
|
|
||||||
// The scroll view is 600 pixels high and the big orange
|
// The scroll view is 600 pixels high and the big orange
|
||||||
// "AlignedItem" is precedeed by 15 regular items. Scroll up enough
|
// "AlignedItem" is preceded by 15 regular items. Scroll up enough
|
||||||
// to make it partially visible.
|
// to make it partially visible.
|
||||||
await tester.drag(find.byType(CustomScrollView), Offset(0, 600 - 15.5 * itemHeight));
|
await tester.drag(find.byType(CustomScrollView), Offset(0, 600 - 15.5 * itemHeight));
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
|
@ -55,7 +55,7 @@ void main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Regression test for https://github.com/flutter/flutter/issues/156806.
|
// Regression test for https://github.com/flutter/flutter/issues/156806.
|
||||||
testWidgets('SingleActivator is used instead of LogiccalKeySet', (WidgetTester tester) async {
|
testWidgets('SingleActivator is used instead of LogicalKeySet', (WidgetTester tester) async {
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
const example.ShortcutsExampleApp(),
|
const example.ShortcutsExampleApp(),
|
||||||
);
|
);
|
||||||
|
@ -1280,7 +1280,7 @@ class _RenderSegmentedControl<T extends Object> extends RenderBox
|
|||||||
|
|
||||||
for (int index = 0; index < children.length; index += 2) {
|
for (int index = 0; index < children.length; index += 2) {
|
||||||
// Children contains both segment and separator and the order is segment ->
|
// Children contains both segment and separator and the order is segment ->
|
||||||
// separator -> segment. So to paint separators, indes should start from 0 and
|
// separator -> segment. So to paint separators, index should start from 0 and
|
||||||
// the step should be 2.
|
// the step should be 2.
|
||||||
_paintChild(context, offset, children[index]);
|
_paintChild(context, offset, children[index]);
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ const double _subHeaderHeight = 52.0;
|
|||||||
const double _monthNavButtonsWidth = 108.0;
|
const double _monthNavButtonsWidth = 108.0;
|
||||||
|
|
||||||
// 3.0 is the maximum scale factor on mobile phones. As of 07/30/24, iOS goes up
|
// 3.0 is the maximum scale factor on mobile phones. As of 07/30/24, iOS goes up
|
||||||
// to a max of 3.0 text sxale factor, and Android goes up to 2.0. This is the
|
// to a max of 3.0 text scale factor, and Android goes up to 2.0. This is the
|
||||||
// default used for non-range date pickers. This default is changed to a lower
|
// default used for non-range date pickers. This default is changed to a lower
|
||||||
// value at different parts of the date pickers depending on content, and device
|
// value at different parts of the date pickers depending on content, and device
|
||||||
// orientation.
|
// orientation.
|
||||||
|
@ -556,7 +556,7 @@ abstract class PageTransitionsBuilder {
|
|||||||
/// const constructors so that they can be used in const expressions.
|
/// const constructors so that they can be used in const expressions.
|
||||||
const PageTransitionsBuilder();
|
const PageTransitionsBuilder();
|
||||||
|
|
||||||
/// Provideds a secondary transition to the previous route.
|
/// Provides a secondary transition to the previous route.
|
||||||
///
|
///
|
||||||
/// {@macro flutter.widgets.delegatedTransition}
|
/// {@macro flutter.widgets.delegatedTransition}
|
||||||
DelegatedTransitionBuilder? get delegatedTransition => null;
|
DelegatedTransitionBuilder? get delegatedTransition => null;
|
||||||
|
@ -566,7 +566,7 @@ class Slider extends StatefulWidget {
|
|||||||
/// overlay shape, whichever is larger.
|
/// overlay shape, whichever is larger.
|
||||||
final EdgeInsetsGeometry? padding;
|
final EdgeInsetsGeometry? padding;
|
||||||
|
|
||||||
/// When true, the [Slider] will use the 2023 Material 3 esign appearance.
|
/// When true, the [Slider] will use the 2023 Material 3 design appearance.
|
||||||
///
|
///
|
||||||
/// Defaults to true. If false, the [Slider] will use the latest Material 3
|
/// Defaults to true. If false, the [Slider] will use the latest Material 3
|
||||||
/// Design appearance, which was introduced in December 2023.
|
/// Design appearance, which was introduced in December 2023.
|
||||||
|
@ -1698,7 +1698,7 @@ class SemanticsProperties extends DiagnosticableTree {
|
|||||||
/// * Buttons must respond to tap/click events produced via keyboard shortcuts.
|
/// * Buttons must respond to tap/click events produced via keyboard shortcuts.
|
||||||
/// * Text fields must become focused and editable, showing an on-screen
|
/// * Text fields must become focused and editable, showing an on-screen
|
||||||
/// keyboard, if necessary.
|
/// keyboard, if necessary.
|
||||||
/// * Checkboxes, switches, and radio buttons must become togglable using
|
/// * Checkboxes, switches, and radio buttons must become toggleable using
|
||||||
/// keyboard shortcuts.
|
/// keyboard shortcuts.
|
||||||
///
|
///
|
||||||
/// Focus behavior is specific to the platform and to the assistive technology
|
/// Focus behavior is specific to the platform and to the assistive technology
|
||||||
|
@ -1267,11 +1267,11 @@ mixin TextInputClient {
|
|||||||
void performSelector(String selectorName) {}
|
void performSelector(String selectorName) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An interface into iOS's stylus hadnwriting text input.
|
/// An interface into iOS's stylus handwriting text input.
|
||||||
///
|
///
|
||||||
/// See also:
|
/// See also:
|
||||||
///
|
///
|
||||||
/// * [Scribe], which provides similar functionality for Anroid.
|
/// * [Scribe], which provides similar functionality for Android.
|
||||||
/// * [UIIndirectScribbleInteraction](https://developer.apple.com/documentation/uikit/uiindirectscribbleinteraction),
|
/// * [UIIndirectScribbleInteraction](https://developer.apple.com/documentation/uikit/uiindirectscribbleinteraction),
|
||||||
/// which is iOS's API for Scribble.
|
/// which is iOS's API for Scribble.
|
||||||
abstract class ScribbleClient {
|
abstract class ScribbleClient {
|
||||||
|
@ -1762,7 +1762,7 @@ class EditableText extends StatefulWidget {
|
|||||||
///
|
///
|
||||||
/// See also:
|
/// See also:
|
||||||
///
|
///
|
||||||
/// * [ScribbleClient], which can be mixed into an arbirtrary widget to
|
/// * [ScribbleClient], which can be mixed into an arbitrary widget to
|
||||||
/// provide iOS Scribble functionality.
|
/// provide iOS Scribble functionality.
|
||||||
/// * [Scribe], which can be used to interact with Android Scribe directly.
|
/// * [Scribe], which can be used to interact with Android Scribe directly.
|
||||||
final bool stylusHandwritingEnabled;
|
final bool stylusHandwritingEnabled;
|
||||||
|
@ -2713,7 +2713,7 @@ final class BuildScope {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool _debugAssertElementInScope(Element element, Element debugBuildRoot) {
|
bool _debugAssertElementInScope(Element element, Element debugBuildRoot) {
|
||||||
final bool isInScope = element._debugIsDescsendantOf(debugBuildRoot)
|
final bool isInScope = element._debugIsDescendantOf(debugBuildRoot)
|
||||||
|| !element.debugIsActive;
|
|| !element.debugIsActive;
|
||||||
if (isInScope) {
|
if (isInScope) {
|
||||||
return true;
|
return true;
|
||||||
@ -3674,7 +3674,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _debugIsDescsendantOf(Element target) {
|
bool _debugIsDescendantOf(Element target) {
|
||||||
Element? element = this;
|
Element? element = this;
|
||||||
while (element != null && element.depth > target.depth) {
|
while (element != null && element.depth > target.depth) {
|
||||||
element = element._parent;
|
element = element._parent;
|
||||||
@ -5172,7 +5172,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
|
|||||||
if (owner!._debugBuilding) {
|
if (owner!._debugBuilding) {
|
||||||
assert(owner!._debugCurrentBuildTarget != null);
|
assert(owner!._debugCurrentBuildTarget != null);
|
||||||
assert(owner!._debugStateLocked);
|
assert(owner!._debugStateLocked);
|
||||||
if (_debugIsDescsendantOf(owner!._debugCurrentBuildTarget!)) {
|
if (_debugIsDescendantOf(owner!._debugCurrentBuildTarget!)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
final List<DiagnosticsNode> information = <DiagnosticsNode>[
|
final List<DiagnosticsNode> information = <DiagnosticsNode>[
|
||||||
|
@ -29,7 +29,7 @@ import 'media_query.dart';
|
|||||||
/// {@tool snippet}
|
/// {@tool snippet}
|
||||||
///
|
///
|
||||||
/// This example creates a blue box containing text that is sufficiently padded
|
/// This example creates a blue box containing text that is sufficiently padded
|
||||||
/// to avoid instrusions by the operating system.
|
/// to avoid intrusions by the operating system.
|
||||||
///
|
///
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// SafeArea(
|
/// SafeArea(
|
||||||
|
@ -1860,7 +1860,7 @@ class _SelectionHandleOverlayState extends State<_SelectionHandleOverlay> with S
|
|||||||
/// Returns the bounding [Rect] of the text selection handle in local
|
/// Returns the bounding [Rect] of the text selection handle in local
|
||||||
/// coordinates.
|
/// coordinates.
|
||||||
///
|
///
|
||||||
/// When interacting with a text seletion handle through a touch event, the
|
/// When interacting with a text selection handle through a touch event, the
|
||||||
/// interactive area should be at least [kMinInteractiveDimension] square,
|
/// interactive area should be at least [kMinInteractiveDimension] square,
|
||||||
/// which this method does not consider.
|
/// which this method does not consider.
|
||||||
Rect _getHandleRect(TextSelectionHandleType type, double preferredLineHeight) {
|
Rect _getHandleRect(TextSelectionHandleType type, double preferredLineHeight) {
|
||||||
|
@ -400,7 +400,7 @@ void main() {
|
|||||||
expect(getHighlightedIndex(tester), null);
|
expect(getHighlightedIndex(tester), null);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgets('Disabled segment can be selected programmtically', (WidgetTester tester) async {
|
testWidgets('Disabled segment can be selected programmatically', (WidgetTester tester) async {
|
||||||
const Map<int, Widget> children = <int, Widget>{
|
const Map<int, Widget> children = <int, Widget>{
|
||||||
0: Text('Child 1'),
|
0: Text('Child 1'),
|
||||||
1: Text('Child 2'),
|
1: Text('Child 2'),
|
||||||
|
@ -1517,7 +1517,7 @@ void main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Regression test for https://github.com/flutter/flutter/issues/152375.
|
// Regression test for https://github.com/flutter/flutter/issues/152375.
|
||||||
testWidgets('Searching can hightlight entry after keyboard navigation while focused', (WidgetTester tester) async {
|
testWidgets('Searching can highlight entry after keyboard navigation while focused', (WidgetTester tester) async {
|
||||||
final ThemeData themeData = ThemeData();
|
final ThemeData themeData = ThemeData();
|
||||||
await tester.pumpWidget(MaterialApp(
|
await tester.pumpWidget(MaterialApp(
|
||||||
theme: themeData,
|
theme: themeData,
|
||||||
|
@ -4744,7 +4744,7 @@ void main() {
|
|||||||
|
|
||||||
// Test default track shape.
|
// Test default track shape.
|
||||||
const Radius trackOuterCornerRadius = Radius.circular(8.0);
|
const Radius trackOuterCornerRadius = Radius.circular(8.0);
|
||||||
const Radius trackInnerCornderRadius = Radius.circular(2.0);
|
const Radius trackInnerCornerRadius = Radius.circular(2.0);
|
||||||
expect(
|
expect(
|
||||||
material,
|
material,
|
||||||
paints
|
paints
|
||||||
@ -4753,20 +4753,20 @@ void main() {
|
|||||||
rrect: RRect.fromLTRBAndCorners(
|
rrect: RRect.fromLTRBAndCorners(
|
||||||
24.0, 292.0, 356.4, 308.0,
|
24.0, 292.0, 356.4, 308.0,
|
||||||
topLeft: trackOuterCornerRadius,
|
topLeft: trackOuterCornerRadius,
|
||||||
topRight: trackInnerCornderRadius,
|
topRight: trackInnerCornerRadius,
|
||||||
bottomRight: trackInnerCornderRadius,
|
bottomRight: trackInnerCornerRadius,
|
||||||
bottomLeft: trackOuterCornerRadius,
|
bottomLeft: trackOuterCornerRadius,
|
||||||
),
|
),
|
||||||
color: activeTrackColor,
|
color: activeTrackColor,
|
||||||
)
|
)
|
||||||
// Inctive track.
|
// Inactive track.
|
||||||
..rrect(
|
..rrect(
|
||||||
rrect: RRect.fromLTRBAndCorners(
|
rrect: RRect.fromLTRBAndCorners(
|
||||||
368.4, 292.0, 776.0, 308.0,
|
368.4, 292.0, 776.0, 308.0,
|
||||||
topLeft: trackInnerCornderRadius,
|
topLeft: trackInnerCornerRadius,
|
||||||
topRight: trackOuterCornerRadius,
|
topRight: trackOuterCornerRadius,
|
||||||
bottomRight: trackOuterCornerRadius,
|
bottomRight: trackOuterCornerRadius,
|
||||||
bottomLeft: trackInnerCornderRadius,
|
bottomLeft: trackInnerCornerRadius,
|
||||||
),
|
),
|
||||||
color: inactiveTrackColor,
|
color: inactiveTrackColor,
|
||||||
)
|
)
|
||||||
|
@ -2671,7 +2671,7 @@ void main() {
|
|||||||
|
|
||||||
// Test default track shape.
|
// Test default track shape.
|
||||||
const Radius trackOuterCornerRadius = Radius.circular(8.0);
|
const Radius trackOuterCornerRadius = Radius.circular(8.0);
|
||||||
const Radius trackInnerCornderRadius = Radius.circular(2.0);
|
const Radius trackInnerCornerRadius = Radius.circular(2.0);
|
||||||
expect(
|
expect(
|
||||||
material,
|
material,
|
||||||
paints
|
paints
|
||||||
@ -2680,19 +2680,19 @@ void main() {
|
|||||||
rrect: RRect.fromLTRBAndCorners(
|
rrect: RRect.fromLTRBAndCorners(
|
||||||
24.0, 292.0, 400.0, 308.0,
|
24.0, 292.0, 400.0, 308.0,
|
||||||
topLeft: trackOuterCornerRadius,
|
topLeft: trackOuterCornerRadius,
|
||||||
topRight: trackInnerCornderRadius,
|
topRight: trackInnerCornerRadius,
|
||||||
bottomRight: trackInnerCornderRadius,
|
bottomRight: trackInnerCornerRadius,
|
||||||
bottomLeft: trackOuterCornerRadius,
|
bottomLeft: trackOuterCornerRadius,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
// Inctive track.
|
// Inactive track.
|
||||||
..rrect(
|
..rrect(
|
||||||
rrect: RRect.fromLTRBAndCorners(
|
rrect: RRect.fromLTRBAndCorners(
|
||||||
400.0, 292.0, 776.0, 308.0,
|
400.0, 292.0, 776.0, 308.0,
|
||||||
topLeft: trackInnerCornderRadius,
|
topLeft: trackInnerCornerRadius,
|
||||||
topRight: trackOuterCornerRadius,
|
topRight: trackOuterCornerRadius,
|
||||||
bottomRight: trackOuterCornerRadius,
|
bottomRight: trackOuterCornerRadius,
|
||||||
bottomLeft: trackInnerCornderRadius,
|
bottomLeft: trackInnerCornerRadius,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -2707,19 +2707,19 @@ void main() {
|
|||||||
rrect: RRect.fromLTRBAndCorners(
|
rrect: RRect.fromLTRBAndCorners(
|
||||||
24.0, 292.0, 390.0, 308.0,
|
24.0, 292.0, 390.0, 308.0,
|
||||||
topLeft: trackOuterCornerRadius,
|
topLeft: trackOuterCornerRadius,
|
||||||
topRight: trackInnerCornderRadius,
|
topRight: trackInnerCornerRadius,
|
||||||
bottomRight: trackInnerCornderRadius,
|
bottomRight: trackInnerCornerRadius,
|
||||||
bottomLeft: trackOuterCornerRadius,
|
bottomLeft: trackOuterCornerRadius,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
// Inctive track.
|
// Inactive track.
|
||||||
..rrect(
|
..rrect(
|
||||||
rrect: RRect.fromLTRBAndCorners(
|
rrect: RRect.fromLTRBAndCorners(
|
||||||
410.0, 292.0, 776.0, 308.0,
|
410.0, 292.0, 776.0, 308.0,
|
||||||
topLeft: trackInnerCornderRadius,
|
topLeft: trackInnerCornerRadius,
|
||||||
topRight: trackOuterCornerRadius,
|
topRight: trackOuterCornerRadius,
|
||||||
bottomRight: trackOuterCornerRadius,
|
bottomRight: trackOuterCornerRadius,
|
||||||
bottomLeft: trackInnerCornderRadius,
|
bottomLeft: trackInnerCornerRadius,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -2488,7 +2488,7 @@ void main() {
|
|||||||
expect(tabBarBox.size.height, 48.0);
|
expect(tabBarBox.size.height, 48.0);
|
||||||
|
|
||||||
// Ease in sine (accelerating).
|
// Ease in sine (accelerating).
|
||||||
double accelerateIntepolation(double fraction) {
|
double accelerateInterpolation(double fraction) {
|
||||||
return 1.0 - math.cos((fraction * math.pi) / 2.0);
|
return 1.0 - math.cos((fraction * math.pi) / 2.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2499,8 +2499,8 @@ void main() {
|
|||||||
}) {
|
}) {
|
||||||
const double indicatorWeight = 3.0;
|
const double indicatorWeight = 3.0;
|
||||||
final double tabChangeProgress = (controller.index - controller.animation!.value).abs();
|
final double tabChangeProgress = (controller.index - controller.animation!.value).abs();
|
||||||
final double leftFraction = accelerateIntepolation(tabChangeProgress);
|
final double leftFraction = accelerateInterpolation(tabChangeProgress);
|
||||||
final double rightFraction = accelerateIntepolation(tabChangeProgress);
|
final double rightFraction = accelerateInterpolation(tabChangeProgress);
|
||||||
|
|
||||||
final RRect rrect = RRect.fromLTRBAndCorners(
|
final RRect rrect = RRect.fromLTRBAndCorners(
|
||||||
lerpDouble(rect.left, targetRect.left, leftFraction)!,
|
lerpDouble(rect.left, targetRect.left, leftFraction)!,
|
||||||
@ -7313,7 +7313,7 @@ void main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// This is a regression test for https://github.com/flutter/flutter/issues/150316.
|
// This is a regression test for https://github.com/flutter/flutter/issues/150316.
|
||||||
testWidgets('Scrollable TabBar wuth transparent divider expands to full width', (WidgetTester tester) async {
|
testWidgets('Scrollable TabBar with transparent divider expands to full width', (WidgetTester tester) async {
|
||||||
Widget buildTabBar({ Color? dividerColor, TabAlignment? tabAlignment }) {
|
Widget buildTabBar({ Color? dividerColor, TabAlignment? tabAlignment }) {
|
||||||
return boilerplate(
|
return boilerplate(
|
||||||
child: Center(
|
child: Center(
|
||||||
@ -7424,7 +7424,7 @@ void main() {
|
|||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
|
|
||||||
// Ease in sine (accelerating).
|
// Ease in sine (accelerating).
|
||||||
double accelerateIntepolation(double fraction) {
|
double accelerateInterpolation(double fraction) {
|
||||||
return 1.0 - math.cos((fraction * math.pi) / 2.0);
|
return 1.0 - math.cos((fraction * math.pi) / 2.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7435,8 +7435,8 @@ void main() {
|
|||||||
}) {
|
}) {
|
||||||
const double indicatorWeight = 3.0;
|
const double indicatorWeight = 3.0;
|
||||||
final double tabChangeProgress = (controller.index - controller.animation!.value).abs();
|
final double tabChangeProgress = (controller.index - controller.animation!.value).abs();
|
||||||
final double leftFraction = accelerateIntepolation(tabChangeProgress);
|
final double leftFraction = accelerateInterpolation(tabChangeProgress);
|
||||||
final double rightFraction = accelerateIntepolation(tabChangeProgress);
|
final double rightFraction = accelerateInterpolation(tabChangeProgress);
|
||||||
|
|
||||||
final RRect rrect = RRect.fromLTRBAndCorners(
|
final RRect rrect = RRect.fromLTRBAndCorners(
|
||||||
lerpDouble(rect.left, targetRect.left, leftFraction)!,
|
lerpDouble(rect.left, targetRect.left, leftFraction)!,
|
||||||
|
@ -153,7 +153,7 @@ void main() {
|
|||||||
expect(checked, isTrue);
|
expect(checked, isTrue);
|
||||||
}, variant: KeySimulatorTransitModeVariant.all());
|
}, variant: KeySimulatorTransitModeVariant.all());
|
||||||
|
|
||||||
testWidgets('Title is not created if title is not passed and kIsweb', (WidgetTester tester) async {
|
testWidgets('Title is not created if title is not passed and kIsWeb', (WidgetTester tester) async {
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
WidgetsApp(
|
WidgetsApp(
|
||||||
color: const Color(0xFF123456),
|
color: const Color(0xFF123456),
|
||||||
|
@ -12844,7 +12844,7 @@ void main() {
|
|||||||
selection: TextSelection.collapsed(offset: textAC.length),
|
selection: TextSelection.collapsed(offset: textAC.length),
|
||||||
);
|
);
|
||||||
|
|
||||||
bool isDeskop() {
|
bool isDesktop() {
|
||||||
return debugDefaultTargetPlatformOverride == TargetPlatform.macOS
|
return debugDefaultTargetPlatformOverride == TargetPlatform.macOS
|
||||||
|| debugDefaultTargetPlatformOverride == TargetPlatform.windows
|
|| debugDefaultTargetPlatformOverride == TargetPlatform.windows
|
||||||
|| debugDefaultTargetPlatformOverride == TargetPlatform.linux;
|
|| debugDefaultTargetPlatformOverride == TargetPlatform.linux;
|
||||||
@ -13032,7 +13032,7 @@ void main() {
|
|||||||
focusNode.requestFocus();
|
focusNode.requestFocus();
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
await waitForThrottling(tester);
|
await waitForThrottling(tester);
|
||||||
expect(controller.value, isDeskop() ? textASelected : textACollapsedAtEnd);
|
expect(controller.value, isDesktop() ? textASelected : textACollapsedAtEnd);
|
||||||
|
|
||||||
// Insert some text.
|
// Insert some text.
|
||||||
await tester.enterText(find.byType(EditableText), textAB);
|
await tester.enterText(find.byType(EditableText), textAB);
|
||||||
@ -13041,7 +13041,7 @@ void main() {
|
|||||||
// Undo the insertion without waiting for the throttling delay.
|
// Undo the insertion without waiting for the throttling delay.
|
||||||
await sendUndo(tester);
|
await sendUndo(tester);
|
||||||
expect(controller.value.selection.isValid, true);
|
expect(controller.value.selection.isValid, true);
|
||||||
expect(controller.value, isDeskop() ? textASelected : textACollapsedAtEnd);
|
expect(controller.value, isDesktop() ? textASelected : textACollapsedAtEnd);
|
||||||
|
|
||||||
// On web, these keyboard shortcuts are handled by the browser.
|
// On web, these keyboard shortcuts are handled by the browser.
|
||||||
}, variant: TargetPlatformVariant.all(), skip: kIsWeb); // [intended]
|
}, variant: TargetPlatformVariant.all(), skip: kIsWeb); // [intended]
|
||||||
@ -13056,7 +13056,7 @@ void main() {
|
|||||||
await tester.pump();
|
await tester.pump();
|
||||||
await sendUndo(tester);
|
await sendUndo(tester);
|
||||||
await waitForThrottling(tester);
|
await waitForThrottling(tester);
|
||||||
expect(controller.value, isDeskop() ? textASelected : textACollapsedAtEnd);
|
expect(controller.value, isDesktop() ? textASelected : textACollapsedAtEnd);
|
||||||
|
|
||||||
// Insert some text.
|
// Insert some text.
|
||||||
await tester.enterText(find.byType(EditableText), textAB);
|
await tester.enterText(find.byType(EditableText), textAB);
|
||||||
@ -13066,7 +13066,7 @@ void main() {
|
|||||||
await sendUndo(tester);
|
await sendUndo(tester);
|
||||||
|
|
||||||
// Initial text should have been recorded and restored.
|
// Initial text should have been recorded and restored.
|
||||||
expect(controller.value, isDeskop() ? textASelected : textACollapsedAtEnd);
|
expect(controller.value, isDesktop() ? textASelected : textACollapsedAtEnd);
|
||||||
|
|
||||||
// On web, these keyboard shortcuts are handled by the browser.
|
// On web, these keyboard shortcuts are handled by the browser.
|
||||||
}, variant: TargetPlatformVariant.all(), skip: kIsWeb); // [intended]
|
}, variant: TargetPlatformVariant.all(), skip: kIsWeb); // [intended]
|
||||||
|
@ -2424,11 +2424,11 @@ class _DummyMultiChildWidget extends Widget {
|
|||||||
|
|
||||||
final List<Widget> children;
|
final List<Widget> children;
|
||||||
@override
|
@override
|
||||||
Element createElement() => _DummyMuitiChildElement(this);
|
Element createElement() => _DummyMultiChildElement(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
class _DummyMuitiChildElement extends Element {
|
class _DummyMultiChildElement extends Element {
|
||||||
_DummyMuitiChildElement(super.widget);
|
_DummyMultiChildElement(super.widget);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool get debugDoingBuild => throw UnimplementedError();
|
bool get debugDoingBuild => throw UnimplementedError();
|
||||||
|
@ -3267,7 +3267,7 @@ The provided ScrollController cannot be shared by multiple ScrollView widgets.''
|
|||||||
// that begin in the center of the scrollable are handled by the
|
// that begin in the center of the scrollable are handled by the
|
||||||
// scrollable, not the scrollbar. However: the scrollbar widget does
|
// scrollable, not the scrollbar. However: the scrollbar widget does
|
||||||
// contain the scrollable and this test verifies that it doesn't
|
// contain the scrollable and this test verifies that it doesn't
|
||||||
// inadvertantly handle thumb down/start/update/end gestures due
|
// inadvertently handle thumb down/start/update/end gestures due
|
||||||
// to trackpad pan/zoom events. Those callbacks are prevented by
|
// to trackpad pan/zoom events. Those callbacks are prevented by
|
||||||
// the overrides of isPointerPanZoomAllowed in the scrollbar
|
// the overrides of isPointerPanZoomAllowed in the scrollbar
|
||||||
// gesture recognizers.
|
// gesture recognizers.
|
||||||
|
@ -320,7 +320,7 @@ void main() {
|
|||||||
final Offset gPos = textOffsetToPosition(paragraph, testValue.indexOf('g'));
|
final Offset gPos = textOffsetToPosition(paragraph, testValue.indexOf('g'));
|
||||||
final Offset pPos = textOffsetToPosition(paragraph, testValue.indexOf('p'));
|
final Offset pPos = textOffsetToPosition(paragraph, testValue.indexOf('p'));
|
||||||
|
|
||||||
// A double tap + drag should take precendence over parent drags.
|
// A double tap + drag should take precedence over parent drags.
|
||||||
final TestGesture gesture = await tester.startGesture(gPos);
|
final TestGesture gesture = await tester.startGesture(gPos);
|
||||||
addTearDown(gesture.removePointer);
|
addTearDown(gesture.removePointer);
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
@ -382,7 +382,7 @@ void main() {
|
|||||||
final Offset gPos = textOffsetToPosition(paragraph, testValue.indexOf('g'));
|
final Offset gPos = textOffsetToPosition(paragraph, testValue.indexOf('g'));
|
||||||
final Offset pPos = textOffsetToPosition(paragraph, testValue.indexOf('p'));
|
final Offset pPos = textOffsetToPosition(paragraph, testValue.indexOf('p'));
|
||||||
|
|
||||||
// A double tap + drag should take precendence over parent drags.
|
// A double tap + drag should take precedence over parent drags.
|
||||||
final TestGesture gesture = await tester.startGesture(gPos);
|
final TestGesture gesture = await tester.startGesture(gPos);
|
||||||
addTearDown(gesture.removePointer);
|
addTearDown(gesture.removePointer);
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
@ -4634,7 +4634,7 @@ void main() {
|
|||||||
await gesture.up();
|
await gesture.up();
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
|
|
||||||
// Clear selection programatically.
|
// Clear selection programmatically.
|
||||||
state.clearSelection();
|
state.clearSelection();
|
||||||
expect(paragraph1.selections, isEmpty);
|
expect(paragraph1.selections, isEmpty);
|
||||||
expect(paragraph2.selections, isEmpty);
|
expect(paragraph2.selections, isEmpty);
|
||||||
|
@ -3593,7 +3593,7 @@ void main() {
|
|||||||
final Offset gPos = textOffsetToPosition(tester, testValue.indexOf('g'));
|
final Offset gPos = textOffsetToPosition(tester, testValue.indexOf('g'));
|
||||||
final Offset pPos = textOffsetToPosition(tester, testValue.indexOf('p'));
|
final Offset pPos = textOffsetToPosition(tester, testValue.indexOf('p'));
|
||||||
|
|
||||||
// A double tap + drag should take precendence over parent drags.
|
// A double tap + drag should take precedence over parent drags.
|
||||||
final TestGesture gesture = await tester.startGesture(gPos);
|
final TestGesture gesture = await tester.startGesture(gPos);
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
await gesture.up();
|
await gesture.up();
|
||||||
|
@ -996,7 +996,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Intitially the exit select button is on the left.
|
// Initially the exit select button is on the left.
|
||||||
final Finder exitButton = buttonFinder('EXIT SELECT MODE');
|
final Finder exitButton = buttonFinder('EXIT SELECT MODE');
|
||||||
expect(exitButton, findsOneWidget);
|
expect(exitButton, findsOneWidget);
|
||||||
final Finder moveRightButton = buttonFinder('MOVE RIGHT');
|
final Finder moveRightButton = buttonFinder('MOVE RIGHT');
|
||||||
|
@ -58,7 +58,7 @@ class ScreenshotCommand extends Command {
|
|||||||
|
|
||||||
/// base64 encode a PNG
|
/// base64 encode a PNG
|
||||||
class ScreenshotResult extends Result {
|
class ScreenshotResult extends Result {
|
||||||
/// Consructs a screenshot result with PNG or raw RGBA byte data.
|
/// Constructs a screenshot result with PNG or raw RGBA byte data.
|
||||||
ScreenshotResult(this._data);
|
ScreenshotResult(this._data);
|
||||||
|
|
||||||
final Uint8List _data;
|
final Uint8List _data;
|
||||||
|
@ -511,7 +511,7 @@ final RegExp _agpJavaError = RegExp(r'Android Gradle plugin requires Java (\d+\.
|
|||||||
// Android Gradle Plugin handles the error here: http://shortn/_SgUWyRdywL.
|
// Android Gradle Plugin handles the error here: http://shortn/_SgUWyRdywL.
|
||||||
|
|
||||||
// If we ever need to reference or check the thrown requirements,
|
// If we ever need to reference or check the thrown requirements,
|
||||||
// we can find the Java and Android Gradle Plugin compatability here:
|
// we can find the Java and Android Gradle Plugin compatibility here:
|
||||||
// 'https://developer.android.com/build/releases/past-releases'
|
// 'https://developer.android.com/build/releases/past-releases'
|
||||||
@visibleForTesting
|
@visibleForTesting
|
||||||
final GradleHandledError incompatibleJavaAndAgpVersionsHandler= GradleHandledError(
|
final GradleHandledError incompatibleJavaAndAgpVersionsHandler= GradleHandledError(
|
||||||
|
@ -117,7 +117,7 @@ Future<Set<String>> computeExclusiveDevDependencies(
|
|||||||
|
|
||||||
// Remove any listed dependency from dev dependencies; it might have been
|
// Remove any listed dependency from dev dependencies; it might have been
|
||||||
// a dev dependency for the app (root) package, but it is being used as a
|
// a dev dependency for the app (root) package, but it is being used as a
|
||||||
// real dependency for a dependend on package, so we would not want to send
|
// real dependency for a dependent on package, so we would not want to send
|
||||||
// a signal that the package can be ignored/removed.
|
// a signal that the package can be ignored/removed.
|
||||||
devDependencies.removeAll(directDependencies);
|
devDependencies.removeAll(directDependencies);
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ Future<void> generateLocalizationsSyntheticPackage({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (featureFlags.isExplicitPackageDependenciesEnabled) {
|
} else if (featureFlags.isExplicitPackageDependenciesEnabled) {
|
||||||
// synthetic-packages: true was not set and it is no longer the defualt.
|
// synthetic-packages: true was not set and it is no longer the default.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ abstract class Pub {
|
|||||||
|
|
||||||
/// Runs, parses, and returns `pub deps --json` for [project].
|
/// Runs, parses, and returns `pub deps --json` for [project].
|
||||||
///
|
///
|
||||||
/// While it is guaranteed that, if succcessful, that the result are a valid
|
/// While it is guaranteed that, if successful, that the result are a valid
|
||||||
/// JSON object, the exact contents returned are _not_ validated, and are left
|
/// JSON object, the exact contents returned are _not_ validated, and are left
|
||||||
/// as a responsibility of the caller.
|
/// as a responsibility of the caller.
|
||||||
Future<Map<String, Object?>> deps(FlutterProject project);
|
Future<Map<String, Object?>> deps(FlutterProject project);
|
||||||
|
@ -1372,7 +1372,7 @@ String? _validatePlugin(Plugin plugin, String platformKey, {
|
|||||||
if (_hasPluginInlineImpl(plugin, platformKey, pluginResolutionType: pluginResolutionType)) {
|
if (_hasPluginInlineImpl(plugin, platformKey, pluginResolutionType: pluginResolutionType)) {
|
||||||
return 'Plugin ${plugin.name}:$platformKey which provides an inline implementation '
|
return 'Plugin ${plugin.name}:$platformKey which provides an inline implementation '
|
||||||
'cannot also reference a default implementation for $defaultImplPluginName. '
|
'cannot also reference a default implementation for $defaultImplPluginName. '
|
||||||
'Ask the maintainers of ${plugin.name} to either remove the implementation via `platforms: $platformKey:${pluginResolutionType == _PluginResolutionType.dart ? ' dartPluginClass' : '` `pluginClass` or `dartPLuginClass'}` '
|
'Ask the maintainers of ${plugin.name} to either remove the implementation via `platforms: $platformKey:${pluginResolutionType == _PluginResolutionType.dart ? ' dartPluginClass' : '` `pluginClass` or `dartPluginClass'}` '
|
||||||
'or avoid referencing a default implementation via `platforms: $platformKey: default_package: $defaultImplPluginName`.\n';
|
'or avoid referencing a default implementation via `platforms: $platformKey: default_package: $defaultImplPluginName`.\n';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ Future<DartBuildResult> runFlutterSpecificDartBuild({
|
|||||||
required Uri projectUri,
|
required Uri projectUri,
|
||||||
required FileSystem fileSystem,
|
required FileSystem fileSystem,
|
||||||
}) async {
|
}) async {
|
||||||
final OS targetOS = getNativeOSFromTargetPlatfrorm(targetPlatform);
|
final OS targetOS = getNativeOSFromTargetPlatform(targetPlatform);
|
||||||
final Uri buildUri = nativeAssetsBuildUri(projectUri, targetOS);
|
final Uri buildUri = nativeAssetsBuildUri(projectUri, targetOS);
|
||||||
final Directory buildDir = fileSystem.directory(buildUri);
|
final Directory buildDir = fileSystem.directory(buildUri);
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ Future<void> installCodeAssets({
|
|||||||
required FileSystem fileSystem,
|
required FileSystem fileSystem,
|
||||||
required Uri nativeAssetsFileUri,
|
required Uri nativeAssetsFileUri,
|
||||||
}) async {
|
}) async {
|
||||||
final OS targetOS = getNativeOSFromTargetPlatfrorm(targetPlatform);
|
final OS targetOS = getNativeOSFromTargetPlatform(targetPlatform);
|
||||||
final Uri buildUri = nativeAssetsBuildUri(projectUri, targetOS);
|
final Uri buildUri = nativeAssetsBuildUri(projectUri, targetOS);
|
||||||
final bool flutterTester = targetPlatform == build_info.TargetPlatform.tester;
|
final bool flutterTester = targetPlatform == build_info.TargetPlatform.tester;
|
||||||
final build_info.BuildMode buildMode = _getBuildMode(environmentDefines, flutterTester);
|
final build_info.BuildMode buildMode = _getBuildMode(environmentDefines, flutterTester);
|
||||||
@ -807,7 +807,7 @@ Never _throwNativeAssetsLinkFailed() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
OS getNativeOSFromTargetPlatfrorm(build_info.TargetPlatform platform) {
|
OS getNativeOSFromTargetPlatform(build_info.TargetPlatform platform) {
|
||||||
switch (platform) {
|
switch (platform) {
|
||||||
case build_info.TargetPlatform.ios:
|
case build_info.TargetPlatform.ios:
|
||||||
return OS.iOS;
|
return OS.iOS;
|
||||||
|
@ -54,7 +54,7 @@ Future<Uri?> testCompilerBuildNativeAssets(BuildInfo buildInfo) async {
|
|||||||
// Only `flutter test` uses the
|
// Only `flutter test` uses the
|
||||||
// `build/native_assets/<os>/native_assets.json` file which uses absolute
|
// `build/native_assets/<os>/native_assets.json` file which uses absolute
|
||||||
// paths to the shared libraries.
|
// paths to the shared libraries.
|
||||||
final OS targetOS = getNativeOSFromTargetPlatfrorm(TargetPlatform.tester);
|
final OS targetOS = getNativeOSFromTargetPlatform(TargetPlatform.tester);
|
||||||
final Uri buildUri = nativeAssetsBuildUri(projectUri, targetOS);
|
final Uri buildUri = nativeAssetsBuildUri(projectUri, targetOS);
|
||||||
final Uri nativeAssetsFileUri = buildUri.resolve('native_assets.json');
|
final Uri nativeAssetsFileUri = buildUri.resolve('native_assets.json');
|
||||||
|
|
||||||
|
@ -503,7 +503,7 @@ class CocoaPods {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (stdout.contains('unknown ISA `PBXFileSystemSynchronizedRootGroup`')) {
|
} else if (stdout.contains('unknown ISA `PBXFileSystemSynchronizedRootGroup`')) {
|
||||||
// CocoaPods must be at least verison 1.16.2 to handle synchronized
|
// CocoaPods must be at least version 1.16.2 to handle synchronized
|
||||||
// groups/folders https://github.com/CocoaPods/CocoaPods/issues/12456
|
// groups/folders https://github.com/CocoaPods/CocoaPods/issues/12456
|
||||||
_logger.printError(
|
_logger.printError(
|
||||||
'Error: Your Cocoapods might be out-of-date and unable to support synchronized groups/folders. '
|
'Error: Your Cocoapods might be out-of-date and unable to support synchronized groups/folders. '
|
||||||
|
@ -51,22 +51,22 @@ class SwiftPackageManagerIntegrationMigration extends ProjectMigrator {
|
|||||||
static const String _flutterPluginsSwiftPackageBuildFileIdentifier = '78A318202AECB46A00862997';
|
static const String _flutterPluginsSwiftPackageBuildFileIdentifier = '78A318202AECB46A00862997';
|
||||||
|
|
||||||
/// New identifier for FlutterGeneratedPluginSwiftPackage XCLocalSwiftPackageReference.
|
/// New identifier for FlutterGeneratedPluginSwiftPackage XCLocalSwiftPackageReference.
|
||||||
static const String _localFlutterPluginsSwiftPackageReferenceIdentifer = '781AD8BC2B33823900A9FFBB';
|
static const String _localFlutterPluginsSwiftPackageReferenceIdentifier = '781AD8BC2B33823900A9FFBB';
|
||||||
|
|
||||||
/// New identifier for FlutterGeneratedPluginSwiftPackage XCSwiftPackageProductDependency.
|
/// New identifier for FlutterGeneratedPluginSwiftPackage XCSwiftPackageProductDependency.
|
||||||
static const String _flutterPluginsSwiftPackageProductDependencyIdentifer = '78A3181F2AECB46A00862997';
|
static const String _flutterPluginsSwiftPackageProductDependencyIdentifier = '78A3181F2AECB46A00862997';
|
||||||
|
|
||||||
/// Existing iOS identifier for Runner PBXFrameworksBuildPhase.
|
/// Existing iOS identifier for Runner PBXFrameworksBuildPhase.
|
||||||
static const String _iosRunnerFrameworksBuildPhaseIdentifer = '97C146EB1CF9000F007C117D';
|
static const String _iosRunnerFrameworksBuildPhaseIdentifier = '97C146EB1CF9000F007C117D';
|
||||||
|
|
||||||
/// Existing macOS identifier for Runner PBXFrameworksBuildPhase.
|
/// Existing macOS identifier for Runner PBXFrameworksBuildPhase.
|
||||||
static const String _macosRunnerFrameworksBuildPhaseIdentifer = '33CC10EA2044A3C60003C045';
|
static const String _macosRunnerFrameworksBuildPhaseIdentifier = '33CC10EA2044A3C60003C045';
|
||||||
|
|
||||||
/// Existing iOS identifier for Runner PBXNativeTarget.
|
/// Existing iOS identifier for Runner PBXNativeTarget.
|
||||||
static const String _iosRunnerNativeTargetIdentifer = '97C146ED1CF9000F007C117D';
|
static const String _iosRunnerNativeTargetIdentifier = '97C146ED1CF9000F007C117D';
|
||||||
|
|
||||||
/// Existing macOS identifier for Runner PBXNativeTarget.
|
/// Existing macOS identifier for Runner PBXNativeTarget.
|
||||||
static const String _macosRunnerNativeTargetIdentifer = '33CC10EC2044A3C60003C045';
|
static const String _macosRunnerNativeTargetIdentifier = '33CC10EC2044A3C60003C045';
|
||||||
|
|
||||||
/// Existing iOS identifier for Runner PBXProject.
|
/// Existing iOS identifier for Runner PBXProject.
|
||||||
static const String _iosProjectIdentifier = '97C146E61CF9000F007C117D';
|
static const String _iosProjectIdentifier = '97C146E61CF9000F007C117D';
|
||||||
@ -78,16 +78,16 @@ class SwiftPackageManagerIntegrationMigration extends ProjectMigrator {
|
|||||||
.directory(_xcodeProjectInfoFile.parent)
|
.directory(_xcodeProjectInfoFile.parent)
|
||||||
.childFile('project.pbxproj.backup');
|
.childFile('project.pbxproj.backup');
|
||||||
|
|
||||||
String get _runnerFrameworksBuildPhaseIdentifer {
|
String get _runnerFrameworksBuildPhaseIdentifier {
|
||||||
return _platform == SupportedPlatform.ios
|
return _platform == SupportedPlatform.ios
|
||||||
? _iosRunnerFrameworksBuildPhaseIdentifer
|
? _iosRunnerFrameworksBuildPhaseIdentifier
|
||||||
: _macosRunnerFrameworksBuildPhaseIdentifer;
|
: _macosRunnerFrameworksBuildPhaseIdentifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
String get _runnerNativeTargetIdentifer {
|
String get _runnerNativeTargetIdentifier {
|
||||||
return _platform == SupportedPlatform.ios
|
return _platform == SupportedPlatform.ios
|
||||||
? _iosRunnerNativeTargetIdentifer
|
? _iosRunnerNativeTargetIdentifier
|
||||||
: _macosRunnerNativeTargetIdentifer;
|
: _macosRunnerNativeTargetIdentifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
String get _projectIdentifier {
|
String get _projectIdentifier {
|
||||||
@ -255,7 +255,7 @@ class SwiftPackageManagerIntegrationMigration extends ProjectMigrator {
|
|||||||
// </BuildableReference>
|
// </BuildableReference>
|
||||||
final List<String> schemeLines = LineSplitter.split(schemeContent).toList();
|
final List<String> schemeLines = LineSplitter.split(schemeContent).toList();
|
||||||
final int index = schemeLines.indexWhere((String line) =>
|
final int index = schemeLines.indexWhere((String line) =>
|
||||||
line.contains('BlueprintIdentifier = "$_runnerNativeTargetIdentifer"'),
|
line.contains('BlueprintIdentifier = "$_runnerNativeTargetIdentifier"'),
|
||||||
);
|
);
|
||||||
if (index == -1 || index + 3 >= schemeLines.length) {
|
if (index == -1 || index + 3 >= schemeLines.length) {
|
||||||
throw Exception(
|
throw Exception(
|
||||||
@ -297,7 +297,7 @@ class SwiftPackageManagerIntegrationMigration extends ProjectMigrator {
|
|||||||
<EnvironmentBuildable>
|
<EnvironmentBuildable>
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "$_runnerNativeTargetIdentifer"
|
BlueprintIdentifier = "$_runnerNativeTargetIdentifier"
|
||||||
$buildableName
|
$buildableName
|
||||||
$blueprintName
|
$blueprintName
|
||||||
$referencedContainer
|
$referencedContainer
|
||||||
@ -421,10 +421,10 @@ $newContent
|
|||||||
if (originalProjectContents.contains(_flutterPluginsSwiftPackageBuildFileIdentifier)) {
|
if (originalProjectContents.contains(_flutterPluginsSwiftPackageBuildFileIdentifier)) {
|
||||||
throw Exception('Duplicate id found for PBXBuildFile.');
|
throw Exception('Duplicate id found for PBXBuildFile.');
|
||||||
}
|
}
|
||||||
if (originalProjectContents.contains(_flutterPluginsSwiftPackageProductDependencyIdentifer)) {
|
if (originalProjectContents.contains(_flutterPluginsSwiftPackageProductDependencyIdentifier)) {
|
||||||
throw Exception('Duplicate id found for XCSwiftPackageProductDependency.');
|
throw Exception('Duplicate id found for XCSwiftPackageProductDependency.');
|
||||||
}
|
}
|
||||||
if (originalProjectContents.contains(_localFlutterPluginsSwiftPackageReferenceIdentifer)) {
|
if (originalProjectContents.contains(_localFlutterPluginsSwiftPackageReferenceIdentifier)) {
|
||||||
throw Exception('Duplicate id found for XCLocalSwiftPackageReference.');
|
throw Exception('Duplicate id found for XCLocalSwiftPackageReference.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -451,7 +451,7 @@ $newContent
|
|||||||
}
|
}
|
||||||
|
|
||||||
const String newContent =
|
const String newContent =
|
||||||
' $_flutterPluginsSwiftPackageBuildFileIdentifier /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = $_flutterPluginsSwiftPackageProductDependencyIdentifer /* FlutterGeneratedPluginSwiftPackage */; };';
|
' $_flutterPluginsSwiftPackageBuildFileIdentifier /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = $_flutterPluginsSwiftPackageProductDependencyIdentifier /* FlutterGeneratedPluginSwiftPackage */; };';
|
||||||
|
|
||||||
final (int _, int endSectionIndex) = _sectionRange('PBXBuildFile', lines);
|
final (int _, int endSectionIndex) = _sectionRange('PBXBuildFile', lines);
|
||||||
|
|
||||||
@ -465,7 +465,7 @@ $newContent
|
|||||||
}) {
|
}) {
|
||||||
final bool migrated = projectInfo.frameworksBuildPhases
|
final bool migrated = projectInfo.frameworksBuildPhases
|
||||||
.where((ParsedProjectFrameworksBuildPhase phase) =>
|
.where((ParsedProjectFrameworksBuildPhase phase) =>
|
||||||
phase.identifier == _runnerFrameworksBuildPhaseIdentifer &&
|
phase.identifier == _runnerFrameworksBuildPhaseIdentifier &&
|
||||||
phase.files != null &&
|
phase.files != null &&
|
||||||
phase.files!.contains(_flutterPluginsSwiftPackageBuildFileIdentifier))
|
phase.files!.contains(_flutterPluginsSwiftPackageBuildFileIdentifier))
|
||||||
.toList()
|
.toList()
|
||||||
@ -493,7 +493,7 @@ $newContent
|
|||||||
// Find index where Frameworks Build Phase for the Runner target begins.
|
// Find index where Frameworks Build Phase for the Runner target begins.
|
||||||
final int runnerFrameworksPhaseStartIndex = lines.indexWhere(
|
final int runnerFrameworksPhaseStartIndex = lines.indexWhere(
|
||||||
(String line) => line.trim().startsWith(
|
(String line) => line.trim().startsWith(
|
||||||
'$_runnerFrameworksBuildPhaseIdentifer /* Frameworks */ = {',
|
'$_runnerFrameworksBuildPhaseIdentifier /* Frameworks */ = {',
|
||||||
),
|
),
|
||||||
startSectionIndex,
|
startSectionIndex,
|
||||||
);
|
);
|
||||||
@ -509,7 +509,7 @@ $newContent
|
|||||||
final ParsedProjectFrameworksBuildPhase? runnerFrameworksPhase = projectInfo
|
final ParsedProjectFrameworksBuildPhase? runnerFrameworksPhase = projectInfo
|
||||||
.frameworksBuildPhases
|
.frameworksBuildPhases
|
||||||
.where((ParsedProjectFrameworksBuildPhase phase) =>
|
.where((ParsedProjectFrameworksBuildPhase phase) =>
|
||||||
phase.identifier == _runnerFrameworksBuildPhaseIdentifer)
|
phase.identifier == _runnerFrameworksBuildPhaseIdentifier)
|
||||||
.toList()
|
.toList()
|
||||||
.firstOrNull;
|
.firstOrNull;
|
||||||
if (runnerFrameworksPhase == null) {
|
if (runnerFrameworksPhase == null) {
|
||||||
@ -550,10 +550,10 @@ $newContent
|
|||||||
}) {
|
}) {
|
||||||
final bool migrated = projectInfo.nativeTargets
|
final bool migrated = projectInfo.nativeTargets
|
||||||
.where((ParsedNativeTarget target) =>
|
.where((ParsedNativeTarget target) =>
|
||||||
target.identifier == _runnerNativeTargetIdentifer &&
|
target.identifier == _runnerNativeTargetIdentifier &&
|
||||||
target.packageProductDependencies != null &&
|
target.packageProductDependencies != null &&
|
||||||
target.packageProductDependencies!
|
target.packageProductDependencies!
|
||||||
.contains(_flutterPluginsSwiftPackageProductDependencyIdentifer))
|
.contains(_flutterPluginsSwiftPackageProductDependencyIdentifier))
|
||||||
.toList()
|
.toList()
|
||||||
.isNotEmpty;
|
.isNotEmpty;
|
||||||
if (logErrorIfNotMigrated && !migrated) {
|
if (logErrorIfNotMigrated && !migrated) {
|
||||||
@ -576,7 +576,7 @@ $newContent
|
|||||||
// Find index where Native Target for the Runner target begins.
|
// Find index where Native Target for the Runner target begins.
|
||||||
final ParsedNativeTarget? runnerNativeTarget = projectInfo.nativeTargets
|
final ParsedNativeTarget? runnerNativeTarget = projectInfo.nativeTargets
|
||||||
.where((ParsedNativeTarget target) =>
|
.where((ParsedNativeTarget target) =>
|
||||||
target.identifier == _runnerNativeTargetIdentifer)
|
target.identifier == _runnerNativeTargetIdentifier)
|
||||||
.firstOrNull;
|
.firstOrNull;
|
||||||
if (runnerNativeTarget == null) {
|
if (runnerNativeTarget == null) {
|
||||||
throw Exception(
|
throw Exception(
|
||||||
@ -584,8 +584,8 @@ $newContent
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
final String subsectionLineStart = runnerNativeTarget.name != null
|
final String subsectionLineStart = runnerNativeTarget.name != null
|
||||||
? '$_runnerNativeTargetIdentifer /* ${runnerNativeTarget.name} */ = {'
|
? '$_runnerNativeTargetIdentifier /* ${runnerNativeTarget.name} */ = {'
|
||||||
: _runnerNativeTargetIdentifer;
|
: _runnerNativeTargetIdentifier;
|
||||||
final int runnerNativeTargetStartIndex = lines.indexWhere(
|
final int runnerNativeTargetStartIndex = lines.indexWhere(
|
||||||
(String line) => line.trim().startsWith(subsectionLineStart),
|
(String line) => line.trim().startsWith(subsectionLineStart),
|
||||||
startSectionIndex,
|
startSectionIndex,
|
||||||
@ -601,7 +601,7 @@ $newContent
|
|||||||
// If packageProductDependencies is null, the packageProductDependencies field is missing and must be added.
|
// If packageProductDependencies is null, the packageProductDependencies field is missing and must be added.
|
||||||
const List<String> newContent = <String>[
|
const List<String> newContent = <String>[
|
||||||
' packageProductDependencies = (',
|
' packageProductDependencies = (',
|
||||||
' $_flutterPluginsSwiftPackageProductDependencyIdentifer /* FlutterGeneratedPluginSwiftPackage */,',
|
' $_flutterPluginsSwiftPackageProductDependencyIdentifier /* FlutterGeneratedPluginSwiftPackage */,',
|
||||||
' );',
|
' );',
|
||||||
];
|
];
|
||||||
lines.insertAll(runnerNativeTargetStartIndex + 1, newContent);
|
lines.insertAll(runnerNativeTargetStartIndex + 1, newContent);
|
||||||
@ -617,7 +617,7 @@ $newContent
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
const String newContent =
|
const String newContent =
|
||||||
' $_flutterPluginsSwiftPackageProductDependencyIdentifer /* FlutterGeneratedPluginSwiftPackage */,';
|
' $_flutterPluginsSwiftPackageProductDependencyIdentifier /* FlutterGeneratedPluginSwiftPackage */,';
|
||||||
lines.insert(packageProductDependenciesIndex + 1, newContent);
|
lines.insert(packageProductDependenciesIndex + 1, newContent);
|
||||||
}
|
}
|
||||||
return lines;
|
return lines;
|
||||||
@ -632,7 +632,7 @@ $newContent
|
|||||||
target.identifier == _projectIdentifier &&
|
target.identifier == _projectIdentifier &&
|
||||||
target.packageReferences != null &&
|
target.packageReferences != null &&
|
||||||
target.packageReferences!
|
target.packageReferences!
|
||||||
.contains(_localFlutterPluginsSwiftPackageReferenceIdentifer))
|
.contains(_localFlutterPluginsSwiftPackageReferenceIdentifier))
|
||||||
.toList()
|
.toList()
|
||||||
.isNotEmpty;
|
.isNotEmpty;
|
||||||
if (logErrorIfNotMigrated && !migrated) {
|
if (logErrorIfNotMigrated && !migrated) {
|
||||||
@ -681,7 +681,7 @@ $newContent
|
|||||||
// If packageReferences is null, the packageReferences field is missing and must be added.
|
// If packageReferences is null, the packageReferences field is missing and must be added.
|
||||||
const List<String> newContent = <String>[
|
const List<String> newContent = <String>[
|
||||||
' packageReferences = (',
|
' packageReferences = (',
|
||||||
' $_localFlutterPluginsSwiftPackageReferenceIdentifer /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,',
|
' $_localFlutterPluginsSwiftPackageReferenceIdentifier /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,',
|
||||||
' );',
|
' );',
|
||||||
];
|
];
|
||||||
lines.insertAll(projectStartIndex + 1, newContent);
|
lines.insertAll(projectStartIndex + 1, newContent);
|
||||||
@ -697,7 +697,7 @@ $newContent
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
const String newContent =
|
const String newContent =
|
||||||
' $_localFlutterPluginsSwiftPackageReferenceIdentifer /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,';
|
' $_localFlutterPluginsSwiftPackageReferenceIdentifier /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,';
|
||||||
lines.insert(packageReferencesIndex + 1, newContent);
|
lines.insert(packageReferencesIndex + 1, newContent);
|
||||||
}
|
}
|
||||||
return lines;
|
return lines;
|
||||||
@ -708,7 +708,7 @@ $newContent
|
|||||||
bool logErrorIfNotMigrated = false,
|
bool logErrorIfNotMigrated = false,
|
||||||
}) {
|
}) {
|
||||||
final bool migrated = projectInfo.localSwiftPackageProductDependencies
|
final bool migrated = projectInfo.localSwiftPackageProductDependencies
|
||||||
.contains(_localFlutterPluginsSwiftPackageReferenceIdentifer);
|
.contains(_localFlutterPluginsSwiftPackageReferenceIdentifier);
|
||||||
if (logErrorIfNotMigrated && !migrated) {
|
if (logErrorIfNotMigrated && !migrated) {
|
||||||
logger.printError('XCLocalSwiftPackageReference was not migrated or was migrated incorrectly.');
|
logger.printError('XCLocalSwiftPackageReference was not migrated or was migrated incorrectly.');
|
||||||
}
|
}
|
||||||
@ -734,7 +734,7 @@ $newContent
|
|||||||
// There isn't a XCLocalSwiftPackageReference section yet, so add it
|
// There isn't a XCLocalSwiftPackageReference section yet, so add it
|
||||||
final List<String> newContent = <String>[
|
final List<String> newContent = <String>[
|
||||||
'/* Begin XCLocalSwiftPackageReference section */',
|
'/* Begin XCLocalSwiftPackageReference section */',
|
||||||
' $_localFlutterPluginsSwiftPackageReferenceIdentifer /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {',
|
' $_localFlutterPluginsSwiftPackageReferenceIdentifier /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {',
|
||||||
' isa = XCLocalSwiftPackageReference;',
|
' isa = XCLocalSwiftPackageReference;',
|
||||||
' relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;',
|
' relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;',
|
||||||
' };',
|
' };',
|
||||||
@ -752,7 +752,7 @@ $newContent
|
|||||||
}
|
}
|
||||||
|
|
||||||
final List<String> newContent = <String>[
|
final List<String> newContent = <String>[
|
||||||
' $_localFlutterPluginsSwiftPackageReferenceIdentifer /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {',
|
' $_localFlutterPluginsSwiftPackageReferenceIdentifier /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {',
|
||||||
' isa = XCLocalSwiftPackageReference;',
|
' isa = XCLocalSwiftPackageReference;',
|
||||||
' relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;',
|
' relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;',
|
||||||
' };',
|
' };',
|
||||||
@ -768,7 +768,7 @@ $newContent
|
|||||||
bool logErrorIfNotMigrated = false,
|
bool logErrorIfNotMigrated = false,
|
||||||
}) {
|
}) {
|
||||||
final bool migrated = projectInfo.swiftPackageProductDependencies
|
final bool migrated = projectInfo.swiftPackageProductDependencies
|
||||||
.contains(_flutterPluginsSwiftPackageProductDependencyIdentifer);
|
.contains(_flutterPluginsSwiftPackageProductDependencyIdentifier);
|
||||||
if (logErrorIfNotMigrated && !migrated) {
|
if (logErrorIfNotMigrated && !migrated) {
|
||||||
logger.printError('XCSwiftPackageProductDependency was not migrated or was migrated incorrectly.');
|
logger.printError('XCSwiftPackageProductDependency was not migrated or was migrated incorrectly.');
|
||||||
}
|
}
|
||||||
@ -794,7 +794,7 @@ $newContent
|
|||||||
// There isn't a XCSwiftPackageProductDependency section yet, so add it
|
// There isn't a XCSwiftPackageProductDependency section yet, so add it
|
||||||
final List<String> newContent = <String>[
|
final List<String> newContent = <String>[
|
||||||
'/* Begin XCSwiftPackageProductDependency section */',
|
'/* Begin XCSwiftPackageProductDependency section */',
|
||||||
' $_flutterPluginsSwiftPackageProductDependencyIdentifer /* FlutterGeneratedPluginSwiftPackage */ = {',
|
' $_flutterPluginsSwiftPackageProductDependencyIdentifier /* FlutterGeneratedPluginSwiftPackage */ = {',
|
||||||
' isa = XCSwiftPackageProductDependency;',
|
' isa = XCSwiftPackageProductDependency;',
|
||||||
' productName = FlutterGeneratedPluginSwiftPackage;',
|
' productName = FlutterGeneratedPluginSwiftPackage;',
|
||||||
' };',
|
' };',
|
||||||
@ -812,7 +812,7 @@ $newContent
|
|||||||
}
|
}
|
||||||
|
|
||||||
final List<String> newContent = <String>[
|
final List<String> newContent = <String>[
|
||||||
' $_flutterPluginsSwiftPackageProductDependencyIdentifer /* FlutterGeneratedPluginSwiftPackage */ = {',
|
' $_flutterPluginsSwiftPackageProductDependencyIdentifier /* FlutterGeneratedPluginSwiftPackage */ = {',
|
||||||
' isa = XCSwiftPackageProductDependency;',
|
' isa = XCSwiftPackageProductDependency;',
|
||||||
' productName = FlutterGeneratedPluginSwiftPackage;',
|
' productName = FlutterGeneratedPluginSwiftPackage;',
|
||||||
' };',
|
' };',
|
||||||
|
@ -875,7 +875,7 @@ $javaGradleCompatUrl
|
|||||||
}
|
}
|
||||||
for (final XmlElement metaData in document.findAllElements('meta-data')) {
|
for (final XmlElement metaData in document.findAllElements('meta-data')) {
|
||||||
final String? name = metaData.getAttribute('android:name');
|
final String? name = metaData.getAttribute('android:name');
|
||||||
// External code checks for this string to indentify flutter android apps.
|
// External code checks for this string to identify flutter android apps.
|
||||||
// See cl/667760684 as an example.
|
// See cl/667760684 as an example.
|
||||||
if (name == 'flutterEmbedding') {
|
if (name == 'flutterEmbedding') {
|
||||||
final String? embeddingVersionString = metaData.getAttribute('android:value');
|
final String? embeddingVersionString = metaData.getAttribute('android:value');
|
||||||
|
@ -113,7 +113,7 @@ void main() {
|
|||||||
String configuration, {
|
String configuration, {
|
||||||
bool verbose = false,
|
bool verbose = false,
|
||||||
void Function(List<String> command)? onRun,
|
void Function(List<String> command)? onRun,
|
||||||
List<String>? additionalCommandArguements,
|
List<String>? additionalCommandArguments,
|
||||||
}) {
|
}) {
|
||||||
final FlutterProject flutterProject = FlutterProject.fromDirectory(fileSystem.currentDirectory);
|
final FlutterProject flutterProject = FlutterProject.fromDirectory(fileSystem.currentDirectory);
|
||||||
final Directory flutterBuildDir = fileSystem.directory(getMacOSBuildDirectory());
|
final Directory flutterBuildDir = fileSystem.directory(getMacOSBuildDirectory());
|
||||||
@ -134,8 +134,8 @@ void main() {
|
|||||||
else
|
else
|
||||||
'-quiet',
|
'-quiet',
|
||||||
'COMPILER_INDEX_STORE_ENABLE=NO',
|
'COMPILER_INDEX_STORE_ENABLE=NO',
|
||||||
if (additionalCommandArguements != null)
|
if (additionalCommandArguments != null)
|
||||||
...additionalCommandArguements,
|
...additionalCommandArguments,
|
||||||
],
|
],
|
||||||
stdout: '''
|
stdout: '''
|
||||||
STDOUT STUFF
|
STDOUT STUFF
|
||||||
@ -769,7 +769,7 @@ STDERR STUFF
|
|||||||
ProcessManager: () => FakeProcessManager.list(<FakeCommand>[
|
ProcessManager: () => FakeProcessManager.list(<FakeCommand>[
|
||||||
setUpFakeXcodeBuildHandler(
|
setUpFakeXcodeBuildHandler(
|
||||||
'Debug',
|
'Debug',
|
||||||
additionalCommandArguements: <String>[
|
additionalCommandArguments: <String>[
|
||||||
'CODE_SIGN_ENTITLEMENTS=/.tmp_rand0/flutter_disable_sandbox_entitlement.rand0/DebugProfileWithDisabledSandboxing.entitlements',
|
'CODE_SIGN_ENTITLEMENTS=/.tmp_rand0/flutter_disable_sandbox_entitlement.rand0/DebugProfileWithDisabledSandboxing.entitlements',
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -838,7 +838,7 @@ STDERR STUFF
|
|||||||
ProcessManager: () => FakeProcessManager.list(<FakeCommand>[
|
ProcessManager: () => FakeProcessManager.list(<FakeCommand>[
|
||||||
setUpFakeXcodeBuildHandler(
|
setUpFakeXcodeBuildHandler(
|
||||||
'Release',
|
'Release',
|
||||||
additionalCommandArguements: <String>[
|
additionalCommandArguments: <String>[
|
||||||
'CODE_SIGN_ENTITLEMENTS=/.tmp_rand0/flutter_disable_sandbox_entitlement.rand0/ReleaseWithDisabledSandboxing.entitlements',
|
'CODE_SIGN_ENTITLEMENTS=/.tmp_rand0/flutter_disable_sandbox_entitlement.rand0/ReleaseWithDisabledSandboxing.entitlements',
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -300,7 +300,7 @@ void main() {
|
|||||||
|
|
||||||
group('Impeller AndroidManifest.xml setting', () {
|
group('Impeller AndroidManifest.xml setting', () {
|
||||||
// Adds a key-value `<meta-data>` pair to the `<application>` tag in the
|
// Adds a key-value `<meta-data>` pair to the `<application>` tag in the
|
||||||
// cooresponding `AndroidManifest.xml` file, right before the closing
|
// corresponding `AndroidManifest.xml` file, right before the closing
|
||||||
// `</application>` tag.
|
// `</application>` tag.
|
||||||
void writeManifestMetadata({
|
void writeManifestMetadata({
|
||||||
required String projectPath,
|
required String projectPath,
|
||||||
|
@ -25,7 +25,7 @@ const String _dartBin = 'bin/cache/dart-sdk/bin/dart';
|
|||||||
// pubspec.yaml
|
// pubspec.yaml
|
||||||
// /package_a
|
// /package_a
|
||||||
// pubspec.yaml
|
// pubspec.yaml
|
||||||
// /pacakge_b
|
// /package_b
|
||||||
// pubspec.yaml
|
// pubspec.yaml
|
||||||
// /package_c
|
// /package_c
|
||||||
// pubspec.yaml
|
// pubspec.yaml
|
||||||
|
@ -683,7 +683,7 @@ exit code: 66
|
|||||||
logger.warningText,
|
logger.warningText,
|
||||||
contains('git remote set-url upstream'),
|
contains('git remote set-url upstream'),
|
||||||
reason:
|
reason:
|
||||||
'When update-packages fails, it is often because of missing an upsteam remote.',
|
'When update-packages fails, it is often because of missing an upstream remote.',
|
||||||
);
|
);
|
||||||
expect(processManager, hasNoRemainingExpectations);
|
expect(processManager, hasNoRemainingExpectations);
|
||||||
});
|
});
|
||||||
|
@ -403,7 +403,7 @@ void main() {
|
|||||||
expect(processManager, hasNoRemainingExpectations);
|
expect(processManager, hasNoRemainingExpectations);
|
||||||
})));
|
})));
|
||||||
|
|
||||||
// Wait until all asyncronous time has been elapsed.
|
// Wait until all asynchronous time has been elapsed.
|
||||||
do {
|
do {
|
||||||
fakeAsync.elapse(const Duration(seconds: 2));
|
fakeAsync.elapse(const Duration(seconds: 2));
|
||||||
} while (fakeAsync.pendingTimers.isNotEmpty);
|
} while (fakeAsync.pendingTimers.isNotEmpty);
|
||||||
|
@ -157,7 +157,7 @@ void main() {
|
|||||||
'@rpath/libfoo.dylib',
|
'@rpath/libfoo.dylib',
|
||||||
].join('\n'),
|
].join('\n'),
|
||||||
),
|
),
|
||||||
// Change the instal name of the binary itself and of its dependencies.
|
// Change the install name of the binary itself and of its dependencies.
|
||||||
// We pass the old to new install name mappings of all native assets dylibs,
|
// We pass the old to new install name mappings of all native assets dylibs,
|
||||||
// even for the dylib that is being updated, since the `-change` option
|
// even for the dylib that is being updated, since the `-change` option
|
||||||
// is ignored if the dylib does not depend on the target dylib.
|
// is ignored if the dylib does not depend on the target dylib.
|
||||||
|
@ -353,7 +353,7 @@ void main() {
|
|||||||
project.xcodeProjectSchemeFile().writeAsStringSync('''
|
project.xcodeProjectSchemeFile().writeAsStringSync('''
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "${_runnerNativeTargetIdentifer(platform)}"
|
BlueprintIdentifier = "${_runnerNativeTargetIdentifier(platform)}"
|
||||||
BlueprintName = "Runner"
|
BlueprintName = "Runner"
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
@ -389,7 +389,7 @@ void main() {
|
|||||||
project.xcodeProjectSchemeFile().writeAsStringSync('''
|
project.xcodeProjectSchemeFile().writeAsStringSync('''
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "${_runnerNativeTargetIdentifer(platform)}"
|
BlueprintIdentifier = "${_runnerNativeTargetIdentifier(platform)}"
|
||||||
BuildableName = "Runner.app"
|
BuildableName = "Runner.app"
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
@ -425,7 +425,7 @@ void main() {
|
|||||||
project.xcodeProjectSchemeFile().writeAsStringSync('''
|
project.xcodeProjectSchemeFile().writeAsStringSync('''
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "${_runnerNativeTargetIdentifer(platform)}"
|
BlueprintIdentifier = "${_runnerNativeTargetIdentifier(platform)}"
|
||||||
BuildableName = "Runner.app"
|
BuildableName = "Runner.app"
|
||||||
BlueprintName = "Runner">
|
BlueprintName = "Runner">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
@ -1051,7 +1051,7 @@ void main() {
|
|||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
/* End PBXFrameworksBuildPhase section */
|
/* End PBXFrameworksBuildPhase section */
|
||||||
/* Begin NonExistant section */
|
/* Begin NonExistant section */
|
||||||
${_runnerFrameworksBuildPhaseIdentifer(platform)} /* Frameworks */ = {
|
${_runnerFrameworksBuildPhaseIdentifier(platform)} /* Frameworks */ = {
|
||||||
};
|
};
|
||||||
/* End NonExistant section */
|
/* End NonExistant section */
|
||||||
''';
|
''';
|
||||||
@ -1436,7 +1436,7 @@ void main() {
|
|||||||
/* Begin PBXNativeTarget section */
|
/* Begin PBXNativeTarget section */
|
||||||
/* End PBXNativeTarget section */
|
/* End PBXNativeTarget section */
|
||||||
/* Begin NonExistant section */
|
/* Begin NonExistant section */
|
||||||
${_runnerNativeTargetIdentifer(platform)} /* Runner */ = {
|
${_runnerNativeTargetIdentifier(platform)} /* Runner */ = {
|
||||||
};
|
};
|
||||||
/* End NonExistant section */
|
/* End NonExistant section */
|
||||||
''';
|
''';
|
||||||
@ -2565,7 +2565,7 @@ String _validBuildActions(
|
|||||||
<EnvironmentBuildable>
|
<EnvironmentBuildable>
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "${_runnerNativeTargetIdentifer(platform)}"
|
BlueprintIdentifier = "${_runnerNativeTargetIdentifier(platform)}"
|
||||||
BuildableName = "Runner.app"
|
BuildableName = "Runner.app"
|
||||||
BlueprintName = "Runner"
|
BlueprintName = "Runner"
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
@ -2601,7 +2601,7 @@ String _validBuildableReference(SupportedPlatform platform) {
|
|||||||
return '''
|
return '''
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "${_runnerNativeTargetIdentifer(platform)}"
|
BlueprintIdentifier = "${_runnerNativeTargetIdentifier(platform)}"
|
||||||
BuildableName = "Runner.app"
|
BuildableName = "Runner.app"
|
||||||
BlueprintName = "Runner"
|
BlueprintName = "Runner"
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
@ -2677,13 +2677,13 @@ ${objects.join('\n')}
|
|||||||
''';
|
''';
|
||||||
}
|
}
|
||||||
|
|
||||||
String _runnerFrameworksBuildPhaseIdentifer(SupportedPlatform platform) {
|
String _runnerFrameworksBuildPhaseIdentifier(SupportedPlatform platform) {
|
||||||
return platform == SupportedPlatform.ios
|
return platform == SupportedPlatform.ios
|
||||||
? '97C146EB1CF9000F007C117D'
|
? '97C146EB1CF9000F007C117D'
|
||||||
: '33CC10EA2044A3C60003C045';
|
: '33CC10EA2044A3C60003C045';
|
||||||
}
|
}
|
||||||
|
|
||||||
String _runnerNativeTargetIdentifer(SupportedPlatform platform) {
|
String _runnerNativeTargetIdentifier(SupportedPlatform platform) {
|
||||||
return platform == SupportedPlatform.ios
|
return platform == SupportedPlatform.ios
|
||||||
? '97C146ED1CF9000F007C117D'
|
? '97C146ED1CF9000F007C117D'
|
||||||
: '33CC10EC2044A3C60003C045';
|
: '33CC10EC2044A3C60003C045';
|
||||||
@ -2740,7 +2740,7 @@ String unmigratedFrameworksBuildPhaseSection(
|
|||||||
}) {
|
}) {
|
||||||
return <String>[
|
return <String>[
|
||||||
'/* Begin PBXFrameworksBuildPhase section */',
|
'/* Begin PBXFrameworksBuildPhase section */',
|
||||||
' ${_runnerFrameworksBuildPhaseIdentifer(platform)} /* Frameworks */ = {',
|
' ${_runnerFrameworksBuildPhaseIdentifier(platform)} /* Frameworks */ = {',
|
||||||
' isa = PBXFrameworksBuildPhase;',
|
' isa = PBXFrameworksBuildPhase;',
|
||||||
' buildActionMask = 2147483647;',
|
' buildActionMask = 2147483647;',
|
||||||
if (!missingFiles) ...<String>[
|
if (!missingFiles) ...<String>[
|
||||||
@ -2769,7 +2769,7 @@ String migratedFrameworksBuildPhaseSection(
|
|||||||
];
|
];
|
||||||
return <String>[
|
return <String>[
|
||||||
'/* Begin PBXFrameworksBuildPhase section */',
|
'/* Begin PBXFrameworksBuildPhase section */',
|
||||||
' ${_runnerFrameworksBuildPhaseIdentifer(platform)} /* Frameworks */ = {',
|
' ${_runnerFrameworksBuildPhaseIdentifier(platform)} /* Frameworks */ = {',
|
||||||
if (missingFiles) ...filesField,
|
if (missingFiles) ...filesField,
|
||||||
' isa = PBXFrameworksBuildPhase;',
|
' isa = PBXFrameworksBuildPhase;',
|
||||||
' buildActionMask = 2147483647;',
|
' buildActionMask = 2147483647;',
|
||||||
@ -2786,7 +2786,7 @@ String unmigratedFrameworksBuildPhaseSectionAsJson(
|
|||||||
bool missingFiles = false,
|
bool missingFiles = false,
|
||||||
}) {
|
}) {
|
||||||
return <String>[
|
return <String>[
|
||||||
' "${_runnerFrameworksBuildPhaseIdentifer(platform)}" : {',
|
' "${_runnerFrameworksBuildPhaseIdentifier(platform)}" : {',
|
||||||
' "buildActionMask" : "2147483647",',
|
' "buildActionMask" : "2147483647",',
|
||||||
if (!missingFiles) ...<String>[
|
if (!missingFiles) ...<String>[
|
||||||
' "files" : [',
|
' "files" : [',
|
||||||
@ -2801,7 +2801,7 @@ String unmigratedFrameworksBuildPhaseSectionAsJson(
|
|||||||
|
|
||||||
String migratedFrameworksBuildPhaseSectionAsJson(SupportedPlatform platform) {
|
String migratedFrameworksBuildPhaseSectionAsJson(SupportedPlatform platform) {
|
||||||
return '''
|
return '''
|
||||||
"${_runnerFrameworksBuildPhaseIdentifer(platform)}" : {
|
"${_runnerFrameworksBuildPhaseIdentifier(platform)}" : {
|
||||||
"buildActionMask" : "2147483647",
|
"buildActionMask" : "2147483647",
|
||||||
"files" : [
|
"files" : [
|
||||||
"78A318202AECB46A00862997"
|
"78A318202AECB46A00862997"
|
||||||
@ -2819,13 +2819,13 @@ String unmigratedNativeTargetSection(
|
|||||||
}) {
|
}) {
|
||||||
return <String>[
|
return <String>[
|
||||||
'/* Begin PBXNativeTarget section */',
|
'/* Begin PBXNativeTarget section */',
|
||||||
' ${_runnerNativeTargetIdentifer(platform)} /* Runner */ = {',
|
' ${_runnerNativeTargetIdentifier(platform)} /* Runner */ = {',
|
||||||
' isa = PBXNativeTarget;',
|
' isa = PBXNativeTarget;',
|
||||||
' buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;',
|
' buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;',
|
||||||
' buildPhases = (',
|
' buildPhases = (',
|
||||||
' 9740EEB61CF901F6004384FC /* Run Script */,',
|
' 9740EEB61CF901F6004384FC /* Run Script */,',
|
||||||
' 97C146EA1CF9000F007C117D /* Sources */,',
|
' 97C146EA1CF9000F007C117D /* Sources */,',
|
||||||
' ${_runnerFrameworksBuildPhaseIdentifer(platform)} /* Frameworks */,',
|
' ${_runnerFrameworksBuildPhaseIdentifier(platform)} /* Frameworks */,',
|
||||||
' 97C146EC1CF9000F007C117D /* Resources */,',
|
' 97C146EC1CF9000F007C117D /* Resources */,',
|
||||||
' 9705A1C41CF9048500538489 /* Embed Frameworks */,',
|
' 9705A1C41CF9048500538489 /* Embed Frameworks */,',
|
||||||
' 3B06AD1E1E4923F5004D2608 /* Thin Binary */,',
|
' 3B06AD1E1E4923F5004D2608 /* Thin Binary */,',
|
||||||
@ -2863,14 +2863,14 @@ String migratedNativeTargetSection(
|
|||||||
];
|
];
|
||||||
return <String>[
|
return <String>[
|
||||||
'/* Begin PBXNativeTarget section */',
|
'/* Begin PBXNativeTarget section */',
|
||||||
' ${_runnerNativeTargetIdentifer(platform)} /* Runner */ = {',
|
' ${_runnerNativeTargetIdentifier(platform)} /* Runner */ = {',
|
||||||
if (missingPackageProductDependencies) ...packageDependencies,
|
if (missingPackageProductDependencies) ...packageDependencies,
|
||||||
' isa = PBXNativeTarget;',
|
' isa = PBXNativeTarget;',
|
||||||
' buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;',
|
' buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;',
|
||||||
' buildPhases = (',
|
' buildPhases = (',
|
||||||
' 9740EEB61CF901F6004384FC /* Run Script */,',
|
' 9740EEB61CF901F6004384FC /* Run Script */,',
|
||||||
' 97C146EA1CF9000F007C117D /* Sources */,',
|
' 97C146EA1CF9000F007C117D /* Sources */,',
|
||||||
' ${_runnerFrameworksBuildPhaseIdentifer(platform)} /* Frameworks */,',
|
' ${_runnerFrameworksBuildPhaseIdentifier(platform)} /* Frameworks */,',
|
||||||
' 97C146EC1CF9000F007C117D /* Resources */,',
|
' 97C146EC1CF9000F007C117D /* Resources */,',
|
||||||
' 9705A1C41CF9048500538489 /* Embed Frameworks */,',
|
' 9705A1C41CF9048500538489 /* Embed Frameworks */,',
|
||||||
' 3B06AD1E1E4923F5004D2608 /* Thin Binary */,',
|
' 3B06AD1E1E4923F5004D2608 /* Thin Binary */,',
|
||||||
@ -2894,12 +2894,12 @@ String unmigratedNativeTargetSectionAsJson(
|
|||||||
bool missingPackageProductDependencies = false,
|
bool missingPackageProductDependencies = false,
|
||||||
}) {
|
}) {
|
||||||
return <String>[
|
return <String>[
|
||||||
' "${_runnerNativeTargetIdentifer(platform)}" : {',
|
' "${_runnerNativeTargetIdentifier(platform)}" : {',
|
||||||
' "buildConfigurationList" : "97C147051CF9000F007C117D",',
|
' "buildConfigurationList" : "97C147051CF9000F007C117D",',
|
||||||
' "buildPhases" : [',
|
' "buildPhases" : [',
|
||||||
' "9740EEB61CF901F6004384FC",',
|
' "9740EEB61CF901F6004384FC",',
|
||||||
' "97C146EA1CF9000F007C117D",',
|
' "97C146EA1CF9000F007C117D",',
|
||||||
' "${_runnerFrameworksBuildPhaseIdentifer(platform)}",',
|
' "${_runnerFrameworksBuildPhaseIdentifier(platform)}",',
|
||||||
' "97C146EC1CF9000F007C117D",',
|
' "97C146EC1CF9000F007C117D",',
|
||||||
' "9705A1C41CF9048500538489",',
|
' "9705A1C41CF9048500538489",',
|
||||||
' "3B06AD1E1E4923F5004D2608"',
|
' "3B06AD1E1E4923F5004D2608"',
|
||||||
@ -2923,12 +2923,12 @@ String unmigratedNativeTargetSectionAsJson(
|
|||||||
|
|
||||||
String migratedNativeTargetSectionAsJson(SupportedPlatform platform) {
|
String migratedNativeTargetSectionAsJson(SupportedPlatform platform) {
|
||||||
return '''
|
return '''
|
||||||
"${_runnerNativeTargetIdentifer(platform)}" : {
|
"${_runnerNativeTargetIdentifier(platform)}" : {
|
||||||
"buildConfigurationList" : "97C147051CF9000F007C117D",
|
"buildConfigurationList" : "97C147051CF9000F007C117D",
|
||||||
"buildPhases" : [
|
"buildPhases" : [
|
||||||
"9740EEB61CF901F6004384FC",
|
"9740EEB61CF901F6004384FC",
|
||||||
"97C146EA1CF9000F007C117D",
|
"97C146EA1CF9000F007C117D",
|
||||||
"${_runnerFrameworksBuildPhaseIdentifer(platform)}",
|
"${_runnerFrameworksBuildPhaseIdentifier(platform)}",
|
||||||
"97C146EC1CF9000F007C117D",
|
"97C146EC1CF9000F007C117D",
|
||||||
"9705A1C41CF9048500538489",
|
"9705A1C41CF9048500538489",
|
||||||
"3B06AD1E1E4923F5004D2608"
|
"3B06AD1E1E4923F5004D2608"
|
||||||
@ -2967,9 +2967,9 @@ String unmigratedProjectSection(
|
|||||||
' TargetAttributes = {',
|
' TargetAttributes = {',
|
||||||
' 331C8080294A63A400263BE5 = {',
|
' 331C8080294A63A400263BE5 = {',
|
||||||
' CreatedOnToolsVersion = 14.0;',
|
' CreatedOnToolsVersion = 14.0;',
|
||||||
' TestTargetID = ${_runnerNativeTargetIdentifer(platform)};',
|
' TestTargetID = ${_runnerNativeTargetIdentifier(platform)};',
|
||||||
' };',
|
' };',
|
||||||
' ${_runnerNativeTargetIdentifer(platform)} = {',
|
' ${_runnerNativeTargetIdentifier(platform)} = {',
|
||||||
' CreatedOnToolsVersion = 7.3.1;',
|
' CreatedOnToolsVersion = 7.3.1;',
|
||||||
' LastSwiftMigration = 1100;',
|
' LastSwiftMigration = 1100;',
|
||||||
' };',
|
' };',
|
||||||
@ -2994,7 +2994,7 @@ String unmigratedProjectSection(
|
|||||||
' projectDirPath = "";',
|
' projectDirPath = "";',
|
||||||
' projectRoot = "";',
|
' projectRoot = "";',
|
||||||
' targets = (',
|
' targets = (',
|
||||||
' ${_runnerNativeTargetIdentifer(platform)} /* Runner */,',
|
' ${_runnerNativeTargetIdentifier(platform)} /* Runner */,',
|
||||||
' 331C8080294A63A400263BE5 /* RunnerTests */,',
|
' 331C8080294A63A400263BE5 /* RunnerTests */,',
|
||||||
' );',
|
' );',
|
||||||
' };',
|
' };',
|
||||||
@ -3026,9 +3026,9 @@ String migratedProjectSection(
|
|||||||
' TargetAttributes = {',
|
' TargetAttributes = {',
|
||||||
' 331C8080294A63A400263BE5 = {',
|
' 331C8080294A63A400263BE5 = {',
|
||||||
' CreatedOnToolsVersion = 14.0;',
|
' CreatedOnToolsVersion = 14.0;',
|
||||||
' TestTargetID = ${_runnerNativeTargetIdentifer(platform)};',
|
' TestTargetID = ${_runnerNativeTargetIdentifier(platform)};',
|
||||||
' };',
|
' };',
|
||||||
' ${_runnerNativeTargetIdentifer(platform)} = {',
|
' ${_runnerNativeTargetIdentifier(platform)} = {',
|
||||||
' CreatedOnToolsVersion = 7.3.1;',
|
' CreatedOnToolsVersion = 7.3.1;',
|
||||||
' LastSwiftMigration = 1100;',
|
' LastSwiftMigration = 1100;',
|
||||||
' };',
|
' };',
|
||||||
@ -3048,7 +3048,7 @@ String migratedProjectSection(
|
|||||||
' projectDirPath = "";',
|
' projectDirPath = "";',
|
||||||
' projectRoot = "";',
|
' projectRoot = "";',
|
||||||
' targets = (',
|
' targets = (',
|
||||||
' ${_runnerNativeTargetIdentifer(platform)} /* Runner */,',
|
' ${_runnerNativeTargetIdentifier(platform)} /* Runner */,',
|
||||||
' 331C8080294A63A400263BE5 /* RunnerTests */,',
|
' 331C8080294A63A400263BE5 /* RunnerTests */,',
|
||||||
' );',
|
' );',
|
||||||
' };',
|
' };',
|
||||||
@ -3067,13 +3067,13 @@ String unmigratedProjectSectionAsJson(
|
|||||||
' "LastUpgradeCheck" : "1510",',
|
' "LastUpgradeCheck" : "1510",',
|
||||||
' "ORGANIZATIONNAME" : "",',
|
' "ORGANIZATIONNAME" : "",',
|
||||||
' "TargetAttributes" : {',
|
' "TargetAttributes" : {',
|
||||||
' "${_runnerNativeTargetIdentifer(platform)}" : {',
|
' "${_runnerNativeTargetIdentifier(platform)}" : {',
|
||||||
' "CreatedOnToolsVersion" : "7.3.1",',
|
' "CreatedOnToolsVersion" : "7.3.1",',
|
||||||
' "LastSwiftMigration" : "1100"',
|
' "LastSwiftMigration" : "1100"',
|
||||||
' },',
|
' },',
|
||||||
' "331C8080294A63A400263BE5" : {',
|
' "331C8080294A63A400263BE5" : {',
|
||||||
' "CreatedOnToolsVersion" : "14.0",',
|
' "CreatedOnToolsVersion" : "14.0",',
|
||||||
' "TestTargetID" : "${_runnerNativeTargetIdentifer(platform)}"',
|
' "TestTargetID" : "${_runnerNativeTargetIdentifier(platform)}"',
|
||||||
' }',
|
' }',
|
||||||
' }',
|
' }',
|
||||||
' },',
|
' },',
|
||||||
@ -3095,7 +3095,7 @@ String unmigratedProjectSectionAsJson(
|
|||||||
' "projectDirPath" : "",',
|
' "projectDirPath" : "",',
|
||||||
' "projectRoot" : "",',
|
' "projectRoot" : "",',
|
||||||
' "targets" : [',
|
' "targets" : [',
|
||||||
' "${_runnerNativeTargetIdentifer(platform)}",',
|
' "${_runnerNativeTargetIdentifier(platform)}",',
|
||||||
' "331C8080294A63A400263BE5"',
|
' "331C8080294A63A400263BE5"',
|
||||||
' ]',
|
' ]',
|
||||||
' }',
|
' }',
|
||||||
@ -3110,13 +3110,13 @@ String migratedProjectSectionAsJson(SupportedPlatform platform) {
|
|||||||
"LastUpgradeCheck" : "1510",
|
"LastUpgradeCheck" : "1510",
|
||||||
"ORGANIZATIONNAME" : "",
|
"ORGANIZATIONNAME" : "",
|
||||||
"TargetAttributes" : {
|
"TargetAttributes" : {
|
||||||
"${_runnerNativeTargetIdentifer(platform)}" : {
|
"${_runnerNativeTargetIdentifier(platform)}" : {
|
||||||
"CreatedOnToolsVersion" : "7.3.1",
|
"CreatedOnToolsVersion" : "7.3.1",
|
||||||
"LastSwiftMigration" : "1100"
|
"LastSwiftMigration" : "1100"
|
||||||
},
|
},
|
||||||
"331C8080294A63A400263BE5" : {
|
"331C8080294A63A400263BE5" : {
|
||||||
"CreatedOnToolsVersion" : "14.0",
|
"CreatedOnToolsVersion" : "14.0",
|
||||||
"TestTargetID" : "${_runnerNativeTargetIdentifer(platform)}"
|
"TestTargetID" : "${_runnerNativeTargetIdentifier(platform)}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -3137,7 +3137,7 @@ String migratedProjectSectionAsJson(SupportedPlatform platform) {
|
|||||||
"projectDirPath" : "",
|
"projectDirPath" : "",
|
||||||
"projectRoot" : "",
|
"projectRoot" : "",
|
||||||
"targets" : [
|
"targets" : [
|
||||||
"${_runnerNativeTargetIdentifer(platform)}",
|
"${_runnerNativeTargetIdentifier(platform)}",
|
||||||
"331C8080294A63A400263BE5"
|
"331C8080294A63A400263BE5"
|
||||||
]
|
]
|
||||||
}''';
|
}''';
|
||||||
|
@ -206,7 +206,7 @@ dependencies:
|
|||||||
/// Project that load's a plugin from the specified path.
|
/// Project that load's a plugin from the specified path.
|
||||||
class PluginWithPathAndroidProjectWithoutDeferred extends PluginProject {
|
class PluginWithPathAndroidProjectWithoutDeferred extends PluginProject {
|
||||||
// Intentionally omit; this test case has nothing to do with deferred
|
// Intentionally omit; this test case has nothing to do with deferred
|
||||||
// components and a DefererdComponentsConfig will cause duplicates of files
|
// components and a DeferredComponentsConfig will cause duplicates of files
|
||||||
// such as build.gradle{.kts}, settings.gradle{kts} and related to be
|
// such as build.gradle{.kts}, settings.gradle{kts} and related to be
|
||||||
// generated, which in turn adds ambiguity to how the tests are built and
|
// generated, which in turn adds ambiguity to how the tests are built and
|
||||||
// executed.
|
// executed.
|
||||||
|
@ -467,7 +467,7 @@ void expectCCompilerIsConfigured(Directory appDirectory) {
|
|||||||
for (final Directory subDir in nativeAssetsBuilderDir.listSync().whereType<Directory>()) {
|
for (final Directory subDir in nativeAssetsBuilderDir.listSync().whereType<Directory>()) {
|
||||||
// We only want to look at build/link hook invocation directories. The
|
// We only want to look at build/link hook invocation directories. The
|
||||||
// `/shared/*` directory allows the individual hooks to store data that is
|
// `/shared/*` directory allows the individual hooks to store data that is
|
||||||
// reusable across different build/link confiurations.
|
// reusable across different build/link configurations.
|
||||||
if (subDir.path.endsWith('shared')) {
|
if (subDir.path.endsWith('shared')) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ import 'native_assets_test_utils.dart';
|
|||||||
/// combinations that could trigger this error.
|
/// combinations that could trigger this error.
|
||||||
///
|
///
|
||||||
/// The version of `native_assets_cli` is derived from the template used by
|
/// The version of `native_assets_cli` is derived from the template used by
|
||||||
/// `flutter create --type=pacakges_ffi`. See
|
/// `flutter create --type=packages_ffi`. See
|
||||||
/// [_getPackageFfiTemplatePubspecVersion].
|
/// [_getPackageFfiTemplatePubspecVersion].
|
||||||
void main() {
|
void main() {
|
||||||
if (!platform.isMacOS && !platform.isLinux && !platform.isWindows) {
|
if (!platform.isMacOS && !platform.isLinux && !platform.isWindows) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user