enable lint prefer_generic_function_type_aliases (#21680)
This commit is contained in:
committed by
GitHub
parent
6c3adcf60f
commit
a07d3719a1
@@ -10,8 +10,8 @@ enum _Location {
|
||||
Bermuda
|
||||
}
|
||||
|
||||
typedef Widget DemoItemBodyBuilder<T>(DemoItem<T> item);
|
||||
typedef String ValueToString<T>(T value);
|
||||
typedef DemoItemBodyBuilder<T> = Widget Function(DemoItem<T> item);
|
||||
typedef ValueToString<T> = String Function(T value);
|
||||
|
||||
class DualHeaderWithHint extends StatelessWidget {
|
||||
const DualHeaderWithHint({
|
||||
|
||||
@@ -10,7 +10,7 @@ enum GridDemoTileStyle {
|
||||
twoLine
|
||||
}
|
||||
|
||||
typedef void BannerTapCallback(Photo photo);
|
||||
typedef BannerTapCallback = void Function(Photo photo);
|
||||
|
||||
const double _kMinFlingVelocity = 800.0;
|
||||
const String _kGalleryAssetsPackage = 'flutter_gallery_assets';
|
||||
|
||||
@@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
typedef Future<String> UpdateUrlFetcher();
|
||||
typedef UpdateUrlFetcher = Future<String> Function();
|
||||
|
||||
class Updater extends StatefulWidget {
|
||||
const Updater({ @required this.updateUrlFetcher, this.child, Key key })
|
||||
|
||||
@@ -9,8 +9,8 @@ import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
typedef void OnProgressListener(double completed, double total);
|
||||
typedef void OnResultListener(String result);
|
||||
typedef OnProgressListener = void Function(double completed, double total);
|
||||
typedef OnResultListener = void Function(String result);
|
||||
|
||||
// An encapsulation of a large amount of synchronous processing.
|
||||
//
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
typedef Widget _TextTransformer(String name, String text);
|
||||
typedef _TextTransformer = Widget Function(String name, String text);
|
||||
|
||||
// From https://en.wikiquote.org/wiki/2001:_A_Space_Odyssey_(film)
|
||||
const String _kDialogText = '''
|
||||
|
||||
@@ -11,7 +11,7 @@ import 'stock_strings.dart';
|
||||
import 'stock_symbol_viewer.dart';
|
||||
import 'stock_types.dart';
|
||||
|
||||
typedef void ModeUpdater(StockMode mode);
|
||||
typedef ModeUpdater = void Function(StockMode mode);
|
||||
|
||||
enum _StockMenuItem { autorefresh, refresh, speedUp, speedDown }
|
||||
enum StockHomeTab { market, portfolio }
|
||||
|
||||
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
|
||||
import 'stock_arrow.dart';
|
||||
import 'stock_data.dart';
|
||||
|
||||
typedef void StockRowActionCallback(Stock stock);
|
||||
typedef StockRowActionCallback = void Function(Stock stock);
|
||||
|
||||
class StockRow extends StatelessWidget {
|
||||
StockRow({
|
||||
|
||||
Reference in New Issue
Block a user