Permalink
Browse files

enable lint prefer_generic_function_type_aliases (#21680)

  • Loading branch information...
a14n committed Sep 14, 2018
1 parent 6c3adcf commit a07d3719a1fe58c0c43ffde7079be291640fa98b
Showing with 217 additions and 217 deletions.
  1. +1 −1 analysis_options.yaml
  2. +1 −1 dev/bots/analyze.dart
  3. +1 −1 dev/bots/prepare_package.dart
  4. +1 −1 dev/bots/test.dart
  5. +1 −1 dev/bots/test/fake_process_manager.dart
  6. +1 −1 dev/devicelab/lib/framework/framework.dart
  7. +1 −1 dev/devicelab/test/adb_test.dart
  8. +1 −1 dev/integration_tests/channels/lib/src/test_step.dart
  9. +1 −1 dev/integration_tests/platform_interaction/lib/src/test_step.dart
  10. +1 −1 dev/manual_tests/lib/material_arc.dart
  11. +1 −1 dev/manual_tests/lib/overlay_geometry.dart
  12. +2 −2 examples/flutter_gallery/lib/demo/material/expansion_panels_demo.dart
  13. +1 −1 examples/flutter_gallery/lib/demo/material/grid_list_demo.dart
  14. +1 −1 examples/flutter_gallery/lib/gallery/updater.dart
  15. +2 −2 examples/layers/services/isolate.dart
  16. +1 −1 examples/layers/widgets/styled_text.dart
  17. +1 −1 examples/stocks/lib/stock_home.dart
  18. +1 −1 examples/stocks/lib/stock_row.dart
  19. +1 −1 packages/flutter/lib/src/animation/animation.dart
  20. +2 −2 packages/flutter/lib/src/cupertino/refresh.dart
  21. +1 −1 packages/flutter/lib/src/cupertino/segmented_control.dart
  22. +2 −2 packages/flutter/lib/src/foundation/assertions.dart
  23. +7 −7 packages/flutter/lib/src/foundation/basic_types.dart
  24. +1 −1 packages/flutter/lib/src/foundation/binding.dart
  25. +1 −1 packages/flutter/lib/src/foundation/diagnostics.dart
  26. +1 −1 packages/flutter/lib/src/foundation/isolates.dart
  27. +1 −1 packages/flutter/lib/src/foundation/licenses.dart
  28. +1 −1 packages/flutter/lib/src/foundation/print.dart
  29. +3 −3 packages/flutter/lib/src/gestures/drag_details.dart
  30. +1 −1 packages/flutter/lib/src/gestures/long_press.dart
  31. +2 −2 packages/flutter/lib/src/gestures/monodrag.dart
  32. +1 −1 packages/flutter/lib/src/gestures/multidrag.dart
  33. +5 −5 packages/flutter/lib/src/gestures/multitap.dart
  34. +1 −1 packages/flutter/lib/src/gestures/pointer_router.dart
  35. +1 −1 packages/flutter/lib/src/gestures/recognizer.dart
  36. +3 −3 packages/flutter/lib/src/gestures/scale.dart
  37. +4 −4 packages/flutter/lib/src/gestures/tap.dart
  38. +2 −2 packages/flutter/lib/src/material/animated_icons/animated_icons.dart
  39. +1 −1 packages/flutter/lib/src/material/arc.dart
  40. +1 −1 packages/flutter/lib/src/material/data_table.dart
  41. +1 −1 packages/flutter/lib/src/material/date_picker.dart
  42. +1 −1 packages/flutter/lib/src/material/drawer.dart
  43. +2 −2 packages/flutter/lib/src/material/expansion_panel.dart
  44. +1 −1 packages/flutter/lib/src/material/material.dart
  45. +3 −3 packages/flutter/lib/src/material/popup_menu.dart
  46. +1 −1 packages/flutter/lib/src/material/refresh_indicator.dart
  47. +1 −1 packages/flutter/lib/src/material/reorderable_list.dart
  48. +1 −1 packages/flutter/lib/src/material/slider.dart
  49. +1 −1 packages/flutter/lib/src/material/tabs.dart
  50. +2 −2 packages/flutter/lib/src/painting/image_stream.dart
  51. +1 −1 packages/flutter/lib/src/rendering/custom_paint.dart
  52. +2 −2 packages/flutter/lib/src/rendering/editable.dart
  53. +1 −1 packages/flutter/lib/src/rendering/flex.dart
  54. +1 −1 packages/flutter/lib/src/rendering/list_body.dart
  55. +1 −1 packages/flutter/lib/src/rendering/list_wheel_viewport.dart
  56. +3 −3 packages/flutter/lib/src/rendering/object.dart
  57. +1 −1 packages/flutter/lib/src/rendering/platform_view.dart
  58. +5 −5 packages/flutter/lib/src/rendering/proxy_box.dart
  59. +3 −3 packages/flutter/lib/src/scheduler/binding.dart
  60. +1 −1 packages/flutter/lib/src/scheduler/ticker.dart
  61. +4 −4 packages/flutter/lib/src/semantics/semantics.dart
  62. +1 −1 packages/flutter/lib/src/services/platform_messages.dart
  63. +1 −1 packages/flutter/lib/src/services/platform_views.dart
  64. +1 −1 packages/flutter/lib/src/services/text_formatter.dart
  65. +1 −1 packages/flutter/lib/src/widgets/animated_cross_fade.dart
  66. +2 −2 packages/flutter/lib/src/widgets/animated_list.dart
  67. +2 −2 packages/flutter/lib/src/widgets/animated_switcher.dart
  68. +2 −2 packages/flutter/lib/src/widgets/app.dart
  69. +1 −1 packages/flutter/lib/src/widgets/async.dart
  70. +1 −1 packages/flutter/lib/src/widgets/basic.dart
  71. +1 −1 packages/flutter/lib/src/widgets/dismissible.dart
  72. +6 −6 packages/flutter/lib/src/widgets/drag_target.dart
  73. +1 −1 packages/flutter/lib/src/widgets/editable_text.dart
  74. +1 −1 packages/flutter/lib/src/widgets/fade_in_image.dart
  75. +3 −3 packages/flutter/lib/src/widgets/form.dart
  76. +6 −6 packages/flutter/lib/src/widgets/framework.dart
  77. +2 −2 packages/flutter/lib/src/widgets/gesture_detector.dart
  78. +3 −3 packages/flutter/lib/src/widgets/heroes.dart
  79. +2 −2 packages/flutter/lib/src/widgets/implicit_animations.dart
  80. +1 −1 packages/flutter/lib/src/widgets/layout_builder.dart
  81. +3 −3 packages/flutter/lib/src/widgets/navigator.dart
  82. +2 −2 packages/flutter/lib/src/widgets/nested_scroll_view.dart
  83. +1 −1 packages/flutter/lib/src/widgets/notification_listener.dart
  84. +1 −1 packages/flutter/lib/src/widgets/orientation_builder.dart
  85. +2 −2 packages/flutter/lib/src/widgets/routes.dart
  86. +1 −1 packages/flutter/lib/src/widgets/scroll_notification.dart
  87. +1 −1 packages/flutter/lib/src/widgets/scrollable.dart
  88. +1 −1 packages/flutter/lib/src/widgets/text_selection.dart
  89. +1 −1 packages/flutter/lib/src/widgets/value_listenable_builder.dart
  90. +3 −3 packages/flutter/lib/src/widgets/widget_inspector.dart
  91. +1 −1 packages/flutter/test/gestures/arena_test.dart
  92. +1 −1 packages/flutter/test/gestures/gesture_binding_test.dart
  93. +1 −1 packages/flutter/test/gestures/gesture_tester.dart
  94. +1 −1 packages/flutter/test/gestures/locking_test.dart
  95. +1 −1 packages/flutter/test/gestures/team_test.dart
  96. +1 −1 packages/flutter/test/material/feedback_test.dart
  97. +1 −1 packages/flutter/test/material/tabs_test.dart
  98. +3 −3 packages/flutter/test/rendering/mock_canvas.dart
  99. +1 −1 packages/flutter/test/widgets/dismissible_test.dart
  100. +1 −1 packages/flutter/test/widgets/dispose_ancestor_lookup_test.dart
  101. +2 −2 packages/flutter/test/widgets/navigator_test.dart
  102. +1 −1 packages/flutter/test/widgets/semantics_traversal_test.dart
  103. +1 −1 packages/flutter/test/widgets/shape_decoration_test.dart
  104. +1 −1 packages/flutter/test/widgets/widget_inspector_test.dart
  105. +2 −2 packages/flutter_driver/lib/src/driver/driver.dart
  106. +4 −4 packages/flutter_driver/lib/src/extension/extension.dart
  107. +2 −2 packages/flutter_test/lib/src/finders.dart
  108. +2 −2 packages/flutter_test/lib/src/matchers.dart
  109. +1 −1 packages/flutter_test/lib/src/test_exception_reporter.dart
  110. +2 −2 packages/flutter_test/lib/src/test_pointer.dart
  111. +2 −2 packages/flutter_test/lib/src/widget_tester.dart
  112. +1 −1 packages/flutter_tools/lib/src/base/context.dart
  113. +1 −1 packages/flutter_tools/lib/src/base/fingerprint.dart
  114. +1 −1 packages/flutter_tools/lib/src/base/io.dart
  115. +1 −1 packages/flutter_tools/lib/src/base/logger.dart
  116. +1 −1 packages/flutter_tools/lib/src/base/net.dart
  117. +2 −2 packages/flutter_tools/lib/src/base/process.dart
  118. +1 −1 packages/flutter_tools/lib/src/base/utils.dart
  119. +4 −4 packages/flutter_tools/lib/src/commands/daemon.dart
  120. +4 −4 packages/flutter_tools/lib/src/commands/drive.dart
  121. +1 −1 packages/flutter_tools/lib/src/compile.dart
  122. +1 −1 packages/flutter_tools/lib/src/dart/pub.dart
  123. +1 −1 packages/flutter_tools/lib/src/test/flutter_platform.dart
  124. +3 −3 packages/flutter_tools/lib/src/vmservice.dart
  125. +1 −1 packages/flutter_tools/test/base/flags_test.dart
  126. +1 −1 packages/flutter_tools/test/dart/pub_get_test.dart
  127. +1 −1 packages/flutter_tools/test/ios/cocoapods_test.dart
  128. +1 −1 packages/flutter_tools/test/runner/flutter_command_test.dart
  129. +1 −1 packages/flutter_tools/test/src/context.dart
  130. +1 −1 packages/flutter_tools/test/src/mocks.dart
  131. +1 −1 packages/fuchsia_remote_debug_protocol/lib/src/common/logging.dart
  132. +1 −1 packages/fuchsia_remote_debug_protocol/lib/src/dart/dart_vm.dart
  133. +1 −1 packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart
View
@@ -128,7 +128,7 @@ linter:
- prefer_final_locals
- prefer_foreach
# - prefer_function_declarations_over_variables # not yet tested
# - prefer_generic_function_type_aliases # not yet tested
- prefer_generic_function_type_aliases
- prefer_initializing_formals
# - prefer_interpolation_to_compose_strings # not yet tested
- prefer_is_empty
View
@@ -11,7 +11,7 @@ import 'package:meta/meta.dart';
import 'run_command.dart';
typedef Future<Null> ShardRunner();
typedef ShardRunner = Future<Null> Function();
final String flutterRoot = path.dirname(path.dirname(path.dirname(path.fromUri(Platform.script))));
final String flutter = path.join(flutterRoot, 'bin', Platform.isWindows ? 'flutter.bat' : 'flutter');
@@ -175,7 +175,7 @@ class ProcessRunner {
}
}
typedef Future<Uint8List> HttpReader(Uri url, {Map<String, String> headers});
typedef HttpReader = Future<Uint8List> Function(Uri url, {Map<String, String> headers});
/// Creates a pre-populated Flutter archive from a git repo.
class ArchiveCreator {
View
@@ -9,7 +9,7 @@ import 'package:path/path.dart' as path;
import 'run_command.dart';
typedef Future<Null> ShardRunner();
typedef ShardRunner = Future<Null> Function();
final String flutterRoot = path.dirname(path.dirname(path.dirname(path.fromUri(Platform.script))));
final String flutter = path.join(flutterRoot, 'bin', Platform.isWindows ? 'flutter.bat' : 'flutter');
@@ -151,7 +151,7 @@ class FakeProcess extends Mock implements Process {
}
/// Callback used to receive stdin input when it occurs.
typedef void StringReceivedCallback(String received);
typedef StringReceivedCallback = void Function(String received);
/// A stream consumer class that consumes UTF8 strings as lists of ints.
class StringStreamConsumer implements StreamConsumer<List<int>> {
@@ -20,7 +20,7 @@ const Duration _kDefaultTaskTimeout = Duration(minutes: 15);
/// Represents a unit of work performed in the CI environment that can
/// succeed, fail and be retried independently of others.
typedef Future<TaskResult> TaskFunction();
typedef TaskFunction = Future<TaskResult> Function();
bool _isTaskRegistered = false;
@@ -122,7 +122,7 @@ CommandArgs cmd({
);
}
typedef dynamic ExitErrorFactory();
typedef ExitErrorFactory = dynamic Function();
class CommandArgs {
CommandArgs({ this.command, this.arguments, this.environment });
@@ -11,7 +11,7 @@ import 'pair.dart';
enum TestStatus { ok, pending, failed, complete }
typedef Future<TestStepResult> TestStep();
typedef TestStep = Future<TestStepResult> Function();
const String nothing = '-';
@@ -8,7 +8,7 @@ import 'package:flutter/material.dart';
enum TestStatus { ok, pending, failed, complete }
typedef Future<TestStepResult> TestStep();
typedef TestStep = Future<TestStepResult> Function();
const String nothing = '-';
@@ -396,7 +396,7 @@ class _RectangleDemoState extends State<_RectangleDemo> {
}
}
typedef Widget _DemoBuilder(_ArcDemo demo);
typedef _DemoBuilder = Widget Function(_ArcDemo demo);
class _ArcDemo {
_ArcDemo(this.title, this.builder, TickerProvider vsync)
@@ -92,7 +92,7 @@ class OverlayGeometryApp extends StatefulWidget {
OverlayGeometryAppState createState() => OverlayGeometryAppState();
}
typedef void CardTapCallback(GlobalKey targetKey, Offset globalPosition);
typedef CardTapCallback = void Function(GlobalKey targetKey, Offset globalPosition);
class CardBuilder extends SliverChildDelegate {
CardBuilder({ this.cardModels, this.onTapUp });
@@ -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({
@@ -22,7 +22,7 @@ enum AnimationStatus {
}
/// Signature for listeners attached using [Animation.addStatusListener].
typedef void AnimationStatusListener(AnimationStatus status);
typedef AnimationStatusListener = void Function(AnimationStatus status);
/// An animation with a value of type `T`.
///
@@ -209,7 +209,7 @@ enum RefreshIndicatorMode {
///
/// The `pulledExtent` parameter is the currently available space either from
/// overscrolling or as held by the sliver during refresh.
typedef Widget RefreshControlIndicatorBuilder(
typedef RefreshControlIndicatorBuilder = Widget Function(
BuildContext context,
RefreshIndicatorMode refreshState,
double pulledExtent,
@@ -221,7 +221,7 @@ typedef Widget RefreshControlIndicatorBuilder(
/// pulled a `refreshTriggerPullDistance`. Must return a [Future]. Upon
/// completion of the [Future], the [CupertinoSliverRefreshControl] enters the
/// [RefreshIndicatorMode.done] state and will start to go away.
typedef Future<void> RefreshCallback();
typedef RefreshCallback = Future<void> Function();
/// A sliver widget implementing the iOS-style pull to refresh content control.
///
@@ -441,7 +441,7 @@ class _SegmentedControlContainerBoxParentData extends ContainerBoxParentData<Ren
RRect surroundingRect;
}
typedef RenderBox _NextChild(RenderBox child);
typedef _NextChild = RenderBox Function(RenderBox child);
class _RenderSegmentedControl<T> extends RenderBox
with ContainerRenderObjectMixin<RenderBox, ContainerBoxParentData<RenderBox>>,
@@ -6,11 +6,11 @@ import 'basic_types.dart';
import 'print.dart';
/// Signature for [FlutterError.onError] handler.
typedef void FlutterExceptionHandler(FlutterErrorDetails details);
typedef FlutterExceptionHandler = void Function(FlutterErrorDetails details);
/// Signature for [FlutterErrorDetails.informationCollector] callback
/// and other callbacks that collect information into a string buffer.
typedef void InformationCollector(StringBuffer information);
typedef InformationCollector = void Function(StringBuffer information);
/// Class for information provided to [FlutterExceptionHandler] callbacks.
///
@@ -12,7 +12,7 @@ export 'dart:ui' show VoidCallback;
/// Signature for callbacks that report that an underlying value has changed.
///
/// See also [ValueSetter].
typedef void ValueChanged<T>(T value);
typedef ValueChanged<T> = void Function(T value);
/// Signature for callbacks that report that a value has been set.
///
@@ -26,18 +26,18 @@ typedef void ValueChanged<T>(T value);
///
/// * [ValueGetter], the getter equivalent of this signature.
/// * [AsyncValueSetter], an asynchronous version of this signature.
typedef void ValueSetter<T>(T value);
typedef ValueSetter<T> = void Function(T value);
/// Signature for callbacks that are to report a value on demand.
///
/// See also:
///
/// * [ValueSetter], the setter equivalent of this signature.
/// * [AsyncValueGetter], an asynchronous version of this signature.
typedef T ValueGetter<T>();
typedef ValueGetter<T> = T Function();
/// Signature for callbacks that filter an iterable.
typedef Iterable<T> IterableFilter<T>(Iterable<T> input);
typedef IterableFilter<T> = Iterable<T> Function(Iterable<T> input);
/// Signature of callbacks that have no arguments and return no data, but that
/// return a [Future] to indicate when their work is complete.
@@ -47,7 +47,7 @@ typedef Iterable<T> IterableFilter<T>(Iterable<T> input);
/// * [VoidCallback], a synchronous version of this signature.
/// * [AsyncValueGetter], a signature for asynchronous getters.
/// * [AsyncValueSetter], a signature for asynchronous setters.
typedef Future<Null> AsyncCallback();
typedef AsyncCallback = Future<Null> Function();
/// Signature for callbacks that report that a value has been set and return a
/// [Future] that completes when the value has been saved.
@@ -56,15 +56,15 @@ typedef Future<Null> AsyncCallback();
///
/// * [ValueSetter], a synchronous version of this signature.
/// * [AsyncValueGetter], the getter equivalent of this signature.
typedef Future<Null> AsyncValueSetter<T>(T value);
typedef AsyncValueSetter<T> = Future<Null> Function(T value);
/// Signature for callbacks that are to asynchronously report a value on demand.
///
/// See also:
///
/// * [ValueGetter], a synchronous version of this signature.
/// * [AsyncValueSetter], the setter equivalent of this signature.
typedef Future<T> AsyncValueGetter<T>();
typedef AsyncValueGetter<T> = Future<T> Function();
// BITFIELD
@@ -22,7 +22,7 @@ import 'print.dart';
/// "type" key will be set to the string `_extensionType` to indicate
/// that this is a return value from a service extension, and the
/// "method" key will be set to the full name of the method.
typedef Future<Map<String, dynamic>> ServiceExtensionCallback(Map<String, String> parameters);
typedef ServiceExtensionCallback = Future<Map<String, dynamic>> Function(Map<String, String> parameters);
/// Base class for mixins that provide singleton services (also known as
/// "bindings").
@@ -1661,7 +1661,7 @@ class ObjectFlagProperty<T> extends DiagnosticsProperty<T> {
/// May throw exception if accessing the property would throw an exception
/// and callers must handle that case gracefully. For example, accessing a
/// property may trigger an assert that layout constraints were violated.
typedef T ComputePropertyValueCallback<T>();
typedef ComputePropertyValueCallback<T> = T Function();
/// Property with a [value] of type [T].
///
@@ -18,7 +18,7 @@ import 'profile.dart';
/// of classes, not closures or instance methods of objects.
///
/// {@macro flutter.foundation.compute.limitations}
typedef R ComputeCallback<Q, R>(Q message);
typedef ComputeCallback<Q, R> = R Function(Q message);
/// Spawn an isolate, run `callback` on that isolate, passing it `message`, and
/// (eventually) return the value returned by `callback`.
@@ -5,7 +5,7 @@
import 'dart:async';
/// Signature for callbacks passed to [LicenseRegistry.addLicense].
typedef Stream<LicenseEntry> LicenseEntryCollector();
typedef LicenseEntryCollector = Stream<LicenseEntry> Function();
/// A string that represents one paragraph in a [LicenseEntry].
///
@@ -6,7 +6,7 @@ import 'dart:async';
import 'dart:collection';
/// Signature for [debugPrint] implementations.
typedef void DebugPrintCallback(String message, { int wrapWidth });
typedef DebugPrintCallback = void Function(String message, { int wrapWidth });
/// Prints a message to the console, which you can access using the "flutter"
/// tool's "logs" command ("flutter logs").
@@ -38,7 +38,7 @@ class DragDownDetails {
/// The `details` object provides the position of the touch.
///
/// See [DragGestureRecognizer.onDown].
typedef void GestureDragDownCallback(DragDownDetails details);
typedef GestureDragDownCallback = void Function(DragDownDetails details);
/// Details object for callbacks that use [GestureDragStartCallback].
///
@@ -80,7 +80,7 @@ class DragStartDetails {
/// touched the surface.
///
/// See [DragGestureRecognizer.onStart].
typedef void GestureDragStartCallback(DragStartDetails details);
typedef GestureDragStartCallback = void Function(DragStartDetails details);
/// Details object for callbacks that use [GestureDragUpdateCallback].
///
@@ -150,7 +150,7 @@ class DragUpdateDetails {
/// has travelled since the last update.
///
/// See [DragGestureRecognizer.onUpdate].
typedef void GestureDragUpdateCallback(DragUpdateDetails details);
typedef GestureDragUpdateCallback = void Function(DragUpdateDetails details);
/// Details object for callbacks that use [GestureDragEndCallback].
///
@@ -9,7 +9,7 @@ import 'recognizer.dart';
/// Signature for when a pointer has remained in contact with the screen at the
/// same location for a long period of time.
typedef void GestureLongPressCallback();
typedef GestureLongPressCallback = void Function();
/// Recognizes when the user has pressed down at the same location for a long
/// period of time.
@@ -22,13 +22,13 @@ enum _DragState {
/// the screen is available in the `details`.
///
/// See [DragGestureRecognizer.onEnd].
typedef void GestureDragEndCallback(DragEndDetails details);
typedef GestureDragEndCallback = void Function(DragEndDetails details);
/// Signature for when the pointer that previously triggered a
/// [GestureDragDownCallback] did not complete.
///
/// See [DragGestureRecognizer.onCancel].
typedef void GestureDragCancelCallback();
typedef GestureDragCancelCallback = void Function();
/// Recognizes movement.
///
@@ -17,7 +17,7 @@ import 'recognizer.dart';
import 'velocity_tracker.dart';
/// Signature for when [MultiDragGestureRecognizer] recognizes the start of a drag gesture.
typedef Drag GestureMultiDragStartCallback(Offset position);
typedef GestureMultiDragStartCallback = Drag Function(Offset position);
/// Per-pointer state for a [MultiDragGestureRecognizer].
///
Oops, something went wrong.

0 comments on commit a07d371

Please sign in to comment.