Automatically migrate ClipboardData.text to non-null (#129567)
https://github.com/flutter/flutter/pull/122446 was a breaking change in Flutter 3.10 that made the `ClipboardData` constructor's `text` argument a required non-nullable argument. This leverages `dart fix`'s new automatic migration to, well, automatically migrate affected users. Manual migration docs: https://docs.flutter.dev/release/breaking-changes/clipboard-data-required Follow-up to https://github.com/flutter/flutter/pull/122446 Part of https://github.com/flutter/flutter/issues/121976
This commit is contained in:
parent
ca6f23e8af
commit
5a5b58a993
@ -18,6 +18,20 @@
|
||||
# * Fixes in this file are from the Services library. *
|
||||
version: 1
|
||||
transforms:
|
||||
# Changes made in https://github.com/flutter/flutter/pull/122446
|
||||
- title: "Migrate to empty 'text' string"
|
||||
date: 2023-06-26
|
||||
element:
|
||||
uris: [ 'services.dart' ]
|
||||
constructor: ''
|
||||
inClass: 'ClipboardData'
|
||||
changes:
|
||||
- kind: 'changeParameterType'
|
||||
name: 'text'
|
||||
nullability: 'non_null'
|
||||
argumentValue:
|
||||
expression: "''"
|
||||
|
||||
# Changes made in https://github.com/flutter/flutter/pull/60320
|
||||
- title: "Migrate to 'viewId'"
|
||||
date: 2020-07-05
|
||||
|
@ -5,6 +5,10 @@
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
void main() {
|
||||
// Changes made in https://github.com/flutter/flutter/pull/122446
|
||||
final clipboardData1 = ClipboardData();
|
||||
final clipboardData2 = ClipboardData(text: null);
|
||||
|
||||
// Changes made in https://github.com/flutter/flutter/pull/60320
|
||||
final SurfaceAndroidViewController surfaceController = SurfaceAndroidViewController(
|
||||
viewId: 10,
|
||||
|
@ -5,6 +5,10 @@
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
void main() {
|
||||
// Changes made in https://github.com/flutter/flutter/pull/122446
|
||||
final clipboardData1 = ClipboardData(text: '');
|
||||
final clipboardData2 = ClipboardData(text: '');
|
||||
|
||||
// Changes made in https://github.com/flutter/flutter/pull/60320
|
||||
final SurfaceAndroidViewController surfaceController = SurfaceAndroidViewController(
|
||||
viewId: 10,
|
||||
|
Loading…
x
Reference in New Issue
Block a user