Add fix for BottomNavigationBarItem.title -> label (#76339)

This commit is contained in:
Kate Lovett 2021-02-23 12:16:05 -06:00 committed by GitHub
parent 9ce3f76c53
commit c0b5db6c0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 47 additions and 0 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}