Add dart fix for AndroidViewController.id (#85246)
This commit is contained in:
@@ -15,6 +15,28 @@
|
||||
version: 1
|
||||
transforms:
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/60320
|
||||
- title: "Migrate to 'viewId'"
|
||||
date: 2020-07-05
|
||||
element:
|
||||
uris: [ 'services.dart' ]
|
||||
getter: id
|
||||
inClass: 'TextureAndroidViewController'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'viewId'
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/60320
|
||||
- title: "Migrate to 'viewId'"
|
||||
date: 2020-07-05
|
||||
element:
|
||||
uris: [ 'services.dart' ]
|
||||
getter: id
|
||||
inClass: 'SurfaceAndroidViewController'
|
||||
changes:
|
||||
- kind: 'rename'
|
||||
newName: 'viewId'
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/81858
|
||||
- title: "Migrate to 'supportedDevices'"
|
||||
date: 2021-05-04
|
||||
|
||||
21
packages/flutter/test_fixes/services.dart
Normal file
21
packages/flutter/test_fixes/services.dart
Normal file
@@ -0,0 +1,21 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
void main() {
|
||||
// Changes made in https://github.com/flutter/flutter/pull/60320
|
||||
final SurfaceAndroidViewController surfaceController = SurfaceAndroidViewController(
|
||||
viewId: 10,
|
||||
viewType: 'FixTester',
|
||||
layoutDirection: TextDirection.ltr,
|
||||
);
|
||||
int viewId = surfaceController.id;
|
||||
final TextureAndroidViewController textureController = TextureAndroidViewController(
|
||||
viewId: 10,
|
||||
viewType: 'FixTester',
|
||||
layoutDirection: TextDirection.ltr,
|
||||
);
|
||||
viewId = textureController.id;
|
||||
}
|
||||
21
packages/flutter/test_fixes/services.dart.expect
Normal file
21
packages/flutter/test_fixes/services.dart.expect
Normal file
@@ -0,0 +1,21 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
void main() {
|
||||
// Changes made in https://github.com/flutter/flutter/pull/60320
|
||||
final SurfaceAndroidViewController surfaceController = SurfaceAndroidViewController(
|
||||
viewId: 10,
|
||||
viewType: 'FixTester',
|
||||
layoutDirection: TextDirection.ltr,
|
||||
);
|
||||
int viewId = surfaceController.viewId;
|
||||
final TextureAndroidViewController textureController = TextureAndroidViewController(
|
||||
viewId: 10,
|
||||
viewType: 'FixTester',
|
||||
layoutDirection: TextDirection.ltr,
|
||||
);
|
||||
viewId = textureController.viewId;
|
||||
}
|
||||
Reference in New Issue
Block a user