-
Notifications
You must be signed in to change notification settings - Fork 344
Closed
Labels
in editorRelates to code editing or language featuresRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serverSomething to be fixed in the Dart analysis serveris enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.An enhancement or improvement that should be listed in release notes but is not a bug fix.relies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become availableSomething that requires changes in the Dart/Flutter SDK to ship before it will become available
Milestone
Description
Is your feature request related to a problem? Please describe.
I have the following class in my Flutter project:
class DataRowCubit<T> extends Cubit<List<DataRow>> {
DataRowCubit({
required DataRow Function({
required bool selected,
required T data,
required int index,
// ignore: avoid_positional_boolean_parameters, single parameter
required void Function(bool?) onSelectionChanged,
}) dataRow,
void Function({
required bool? selection,
required int index,
required List<bool> list,
})? onSelectionChanged,
List<T>? list,
})
//...But when I write down the constructor to create a new instance, the suggested fillings for the lambdas are the following:
This creates a minor inconvenience that I then need to write down the requireds myself in all of the non-null parameters:
Describe the solution you'd like
I would like for the suggested code to follow the required keyword.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
in editorRelates to code editing or language featuresRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serverSomething to be fixed in the Dart analysis serveris enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.An enhancement or improvement that should be listed in release notes but is not a bug fix.relies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become availableSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

