Skip to content

Commit

Permalink
Type Function variables with actual function signatures (#6944)
Browse files Browse the repository at this point in the history
  • Loading branch information
srawlins authored Dec 11, 2023
1 parent af32dfb commit 88709a8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class _MyHomePageState extends State<MyHomePage> {
}
}

Map<String, Function> navigateCallbacks = {};
Map<String, void Function()> navigateCallbacks = {};

// Hook to navigate to a specific screen.
void navigateToScreen(String title) {
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools_app_shared/lib/src/ui/dialogs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ final class DialogCancelButton extends StatelessWidget {
final class DialogApplyButton extends StatelessWidget {
const DialogApplyButton({super.key, required this.onPressed});

final Function onPressed;
final void Function() onPressed;

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions packages/devtools_test/lib/src/helpers/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ final screenIds = <String>[
/// Tests that `listener` has actually been invoked.
Future<void> addListenerScope({
required Listenable listenable,
required Function listener,
required Function callback,
required void Function() listener,
required Future<void> Function() callback,
}) async {
bool listenerCalled = false;
void listenerWrapped() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class FakeServiceManager extends Fake

final List<String> availableLibraries;

final Function? onVmServiceOpened;
final void Function()? onVmServiceOpened;

final Map<String, Response> serviceExtensionResponses;

Expand Down

0 comments on commit 88709a8

Please sign in to comment.