-
Couldn't load subscription status.
- Fork 335
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 bugrelies 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
Input:
var snackBarData = await _executeConversionWithExceptionAsValue(
() async {
await JxlToJpeg.convert(
jxlFile,
outputPath: path_lib.join(
selectedOutputDirPath,
path_lib.setExtension(path_lib.basename(jxlFile.path), '.jpg'),
),
);
},
);
if (snackBarData != null) {
displayFeedbackForTheUser(snackBarData);
}
_progress.value += 1;extract method _abc
Result:
Future<void> _abc(File jxlFile, String selectedOutputDirPath, void displayFeedbackForTheUser(SnackBarData )) async {
var snackBarData = await _executeConversionWithExceptionAsValue(
() async {
await JxlToJpeg.convert(
jxlFile,
outputPath: path_lib.join(
selectedOutputDirPath,
path_lib.setExtension(path_lib.basename(jxlFile.path), '.jpg'),
),
);
},
);
if (snackBarData != null) {
displayFeedbackForTheUser(snackBarData);
}
_progress.value += 1;
}The argument type 'void Function(SnackBarData)' can't be assigned to the parameter type 'void Function(dynamic)'.
Correct output:
Future<void> _abc(File jxlFile, String selectedOutputDirPath, void Function(SnackBarData) displayFeedbackForTheUser) async {
var snackBarData = await _executeConversionWithExceptionAsValue(
() async {
await JxlToJpeg.convert(
jxlFile,
outputPath: path_lib.join(
selectedOutputDirPath,
path_lib.setExtension(path_lib.basename(jxlFile.path), '.jpg'),
),
);
},
);
if (snackBarData != null) {
displayFeedbackForTheUser(snackBarData);
}
_progress.value += 1;
}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 bugrelies 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