From c0b5db6c0ec437448aafbeef3168a1e0b265917c Mon Sep 17 00:00:00 2001 From: Kate Lovett Date: Tue, 23 Feb 2021 12:16:05 -0600 Subject: [PATCH] Add fix for BottomNavigationBarItem.title -> label (#76339) --- packages/flutter/lib/fix_data.yaml | 23 +++++++++++++++++++ packages/flutter/test_fixes/cupertino.dart | 4 ++++ .../flutter/test_fixes/cupertino.dart.expect | 4 ++++ packages/flutter/test_fixes/material.dart | 4 ++++ .../flutter/test_fixes/material.dart.expect | 4 ++++ packages/flutter/test_fixes/widgets.dart | 4 ++++ .../flutter/test_fixes/widgets.dart.expect | 4 ++++ 7 files changed, 47 insertions(+) diff --git a/packages/flutter/lib/fix_data.yaml b/packages/flutter/lib/fix_data.yaml index 8162ed2c65..7a4626ab98 100644 --- a/packages/flutter/lib/fix_data.yaml +++ b/packages/flutter/lib/fix_data.yaml @@ -11,6 +11,29 @@ version: 1 transforms: + # Changes made in https://github.com/flutter/flutter/pull/59127 + - title: "Migrate to 'label'" + date: 2020-07-09 + element: + uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] + field: 'title' + inClass: 'BottomNavigationBarItem' + changes: + - kind: 'rename' + newName: 'label' + + # Changes made in https://github.com/flutter/flutter/pull/59127 + - title: "Migrate to 'label'" + date: 2020-07-09 + element: + uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] + constructor: '' + inClass: 'BottomNavigationBarItem' + changes: + - kind: 'renameParameter' + oldName: 'title' + newName: 'label' + # Changes made in https://github.com/flutter/flutter/pull/66043 - title: "Use withKind" date: 2020-09-17 diff --git a/packages/flutter/test_fixes/cupertino.dart b/packages/flutter/test_fixes/cupertino.dart index e28b50ae5b..508c2062d0 100644 --- a/packages/flutter/test_fixes/cupertino.dart +++ b/packages/flutter/test_fixes/cupertino.dart @@ -123,4 +123,8 @@ void main() { CupertinoTextField.borderless(maxLengthEnforced: false); final CupertinoTextField textField; textField.maxLengthEnforced; + + // Changes made in https://github.com/flutter/flutter/pull/59127 + const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(title: myTitle); + bottomNavigationBarItem.title; } diff --git a/packages/flutter/test_fixes/cupertino.dart.expect b/packages/flutter/test_fixes/cupertino.dart.expect index dfa24a2bd9..ee725c30d6 100644 --- a/packages/flutter/test_fixes/cupertino.dart.expect +++ b/packages/flutter/test_fixes/cupertino.dart.expect @@ -123,4 +123,8 @@ void main() { CupertinoTextField.borderless(maxLengthEnforcement: MaxLengthEnforcement.none); final CupertinoTextField textField; textField.maxLengthEnforcement; + + // Changes made in https://github.com/flutter/flutter/pull/59127 + const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(label: myTitle); + bottomNavigationBarItem.label; } diff --git a/packages/flutter/test_fixes/material.dart b/packages/flutter/test_fixes/material.dart index fe57ff3a60..b7174f5ef1 100644 --- a/packages/flutter/test_fixes/material.dart +++ b/packages/flutter/test_fixes/material.dart @@ -174,4 +174,8 @@ void main() { textField.maxLengthEnforced; TextFormField(maxLengthEnforced: true); TextFormField(maxLengthEnforced: false); + + // Changes made in https://github.com/flutter/flutter/pull/59127 + const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(title: myTitle); + bottomNavigationBarItem.title; } diff --git a/packages/flutter/test_fixes/material.dart.expect b/packages/flutter/test_fixes/material.dart.expect index ad0370aa19..b727755485 100644 --- a/packages/flutter/test_fixes/material.dart.expect +++ b/packages/flutter/test_fixes/material.dart.expect @@ -174,4 +174,8 @@ void main() { textField.maxLengthEnforcement; TextFormField(maxLengthEnforcement: MaxLengthEnforcement.enforce); TextFormField(maxLengthEnforcement: MaxLengthEnforcement.none); + + // Changes made in https://github.com/flutter/flutter/pull/59127 + const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(label: myTitle); + bottomNavigationBarItem.label; } diff --git a/packages/flutter/test_fixes/widgets.dart b/packages/flutter/test_fixes/widgets.dart index c882ee80af..82ac8c12fd 100644 --- a/packages/flutter/test_fixes/widgets.dart +++ b/packages/flutter/test_fixes/widgets.dart @@ -91,4 +91,8 @@ void main() { AnimatedList.of(context, nullOk: false); SliverAnimatedList.of(context, nullOk: true); SliverAnimatedList.of(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/59127 + const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(title: myTitle); + bottomNavigationBarItem.title; } diff --git a/packages/flutter/test_fixes/widgets.dart.expect b/packages/flutter/test_fixes/widgets.dart.expect index 4f0378c060..14d40385ca 100644 --- a/packages/flutter/test_fixes/widgets.dart.expect +++ b/packages/flutter/test_fixes/widgets.dart.expect @@ -91,4 +91,8 @@ void main() { AnimatedList.of(context); SliverAnimatedList.maybeOf(context); SliverAnimatedList.of(context); + + // Changes made in https://github.com/flutter/flutter/pull/59127 + const BottomNavigationBarItem bottomNavigationBarItem = BottomNavigationBarItem(label: myTitle); + bottomNavigationBarItem.label; }