Loïc Sharma 5a5b58a993
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
2023-06-27 21:07:14 +00:00

39 lines
1.5 KiB
Dart

// 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/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,
viewType: 'FixTester',
layoutDirection: TextDirection.ltr,
);
int viewId = surfaceController.id;
final SurfaceAndroidViewController surfaceController = SurfaceAndroidViewController(
error: '',
);
final TextureAndroidViewController textureController = TextureAndroidViewController(
error: '',
);
final TextureAndroidViewController textureController = TextureAndroidViewController(
viewId: 10,
viewType: 'FixTester',
layoutDirection: TextDirection.ltr,
);
viewId = textureController.id;
// Changes made in https://github.com/flutter/flutter/pull/81303
await SystemChrome.setEnabledSystemUIOverlays(<SystemUiOverlay>[SystemUiOverlay.top]);
await SystemChrome.setEnabledSystemUIOverlays(<SystemUiOverlay>[SystemUiOverlay.bottom]);
await SystemChrome.setEnabledSystemUIOverlays(<SystemUiOverlay>[SystemUiOverlay.top, SystemUiOverlay.bottom]);
await SystemChrome.setEnabledSystemUIOverlays(<SystemUiOverlay>[]);
await SystemChrome.setEnabledSystemUIOverlays(error: '');
}