-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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-refactoringIssues with analysis server refactoringsIssues with analysis server refactoringstype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
error: (error, stackTrace) => Center(
child: Text(
'Error: $error',
style: const TextStyle(color: CupertinoColors.systemRed),
),
),
extract the widget on the Center widget
class A extends StatelessWidget {
const A({
super.key,
});
@override
Widget build(BuildContext context) {
return Center(
child: Text(
'Error: $error',
style: const TextStyle(color: CupertinoColors.systemRed),
),
);
}
}
Undefined name 'error'. Try correcting the name to one that is defined, or defining the name.
expected code:
class FavoriteFoldersErrorWidget extends StatelessWidget {
final Object error;
const FavoriteFoldersErrorWidget({
required this.error,
super.key,
});
@override
Widget build(BuildContext context) {
return Center(
child: Text(
'Error: $error',
style: const TextStyle(color: CupertinoColors.systemRed),
),
);
}
}
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-refactoringIssues with analysis server refactoringsIssues with analysis server refactoringstype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)