Enable use_function_type_syntax_for_parameters lint (#77163)

This commit is contained in:
Michael Goderbauer
2021-03-04 08:59:17 -08:00
committed by GitHub
parent 8f9c6af2dd
commit 7b251f5f37
68 changed files with 119 additions and 119 deletions

View File

@@ -78,7 +78,7 @@ class DessertDataSource extends DataTableSource {
Dessert('Coconut slice and KitKat', 677, 41.0, 72, 8.5, 63, 12, 12),
];
void _sort<T>(Comparable<T> getField(Dessert d), bool ascending) {
void _sort<T>(Comparable<T> Function(Dessert d) getField, bool ascending) {
_desserts.sort((Dessert a, Dessert b) {
if (!ascending) {
final Dessert c = a;
@@ -156,7 +156,7 @@ class _DataTableDemoState extends State<DataTableDemo> {
bool _sortAscending = true;
final DessertDataSource _dessertsDataSource = DessertDataSource();
void _sort<T>(Comparable<T> getField(Dessert d), int columnIndex, bool ascending) {
void _sort<T>(Comparable<T> Function(Dessert d) getField, int columnIndex, bool ascending) {
_dessertsDataSource._sort<T>(getField, ascending);
setState(() {
_sortColumnIndex = columnIndex;