-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-quick-fixIssues with analysis server (quick) fixesIssues with analysis server (quick) fixestype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
child: IconButton(
icon: Icon(
Icons.delete_outline,
color: isProcessing
? Colors.grey.withValues(alpha: 0.3)
: Colors.redAccent,
),
onPressed: isProcessing
? null
: () async {
final favoriteFoldersNotifier =
ref.read(favoriteFoldersProvider.notifier);
await favoriteFoldersNotifier.removeFavoriteFolders(folder);
},
),Specify the type of a local variable when the type is non-obvious. Try adding a type annotation.
apply quick fix:
child: IconButton(
icon: Icon(
Icons.delete_outline,
color: isProcessing
? Colors.grey.withValues(alpha: 0.3)
: Colors.redAccent,
),
onPressed: isProcessing
? null
: () async {
final AsyncNotifier<List<Directory>> favoriteFoldersNotifier =
ref.read(favoriteFoldersProvider.notifier);
await favoriteFoldersNotifier.removeFavoriteFolders(folder);
},
),The method 'removeFavoriteFolders' isn't defined for the type 'AsyncNotifier'. Try correcting the name to the name of an existing method, or defining a method named 'removeFavoriteFolders'.
Here the type should be _FavoriteFoldersAsyncNotifierInterface. I think the lint gets confused because the type is private (it shouldn't)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-quick-fixIssues with analysis server (quick) fixesIssues with analysis server (quick) fixestype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)