Unverified Commit 5a5b58a9 authored by Loïc Sharma's avatar Loïc Sharma Committed by GitHub

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
parent ca6f23e8
...@@ -18,6 +18,20 @@ ...@@ -18,6 +18,20 @@
# * Fixes in this file are from the Services library. * # * Fixes in this file are from the Services library. *
version: 1 version: 1
transforms: 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 # Changes made in https://github.com/flutter/flutter/pull/60320
- title: "Migrate to 'viewId'" - title: "Migrate to 'viewId'"
date: 2020-07-05 date: 2020-07-05
......
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
void main() { 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 // Changes made in https://github.com/flutter/flutter/pull/60320
final SurfaceAndroidViewController surfaceController = SurfaceAndroidViewController( final SurfaceAndroidViewController surfaceController = SurfaceAndroidViewController(
viewId: 10, viewId: 10,
......
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
void main() { 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 // Changes made in https://github.com/flutter/flutter/pull/60320
final SurfaceAndroidViewController surfaceController = SurfaceAndroidViewController( final SurfaceAndroidViewController surfaceController = SurfaceAndroidViewController(
viewId: 10, viewId: 10,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment