Enable use_function_type_syntax_for_parameters lint (#77163)
This commit is contained in:
committed by
GitHub
parent
8f9c6af2dd
commit
7b251f5f37
@@ -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;
|
||||
|
||||
@@ -53,7 +53,7 @@ class TestAssetBundle extends AssetBundle {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<T> loadStructuredData<T>(String key, Future<T> parser(String value)) async {
|
||||
Future<T> loadStructuredData<T>(String key, Future<T> Function(String value) parser) async {
|
||||
return parser(await loadString(key));
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ class _LiveWidgetController extends LiveWidgetController {
|
||||
bool frameSync = true;
|
||||
|
||||
/// Waits until at the end of a frame the provided [condition] is [true].
|
||||
Future<void> _waitUntilFrame(bool condition(), [Completer<void>? completer]) {
|
||||
Future<void> _waitUntilFrame(bool Function() condition, [Completer<void>? completer]) {
|
||||
completer ??= Completer<void>();
|
||||
if (!condition()) {
|
||||
SchedulerBinding.instance!.addPostFrameCallback((Duration timestamp) {
|
||||
|
||||
Reference in New Issue
Block a user