-
Notifications
You must be signed in to change notification settings - Fork 29.1k
Closed
Labels
c: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.
Description
@eseidelGoogle As discussed here is the issue:
Currently we don't have a possibility to handle Exceptions that happens inside a Widget somewhere down the widget tree. I would propose a Widget that allows that. Something like
typedef ExceptionHandler = void Function( ex)
typedef AlternativeBuilder = void Function(BuildingContext context, ex)
ExceptionHandledBuilder(
List<Object> exceptionsToCatch, // Exceptions that should behandled (It's really a pity that Dart doesen't have a common Exception base class)
HandlerFunction: onException, // get's called to allow logging or what else
AlternativeBuilder: alternativeBuilder, // Builder that get's invoked while executing the normal builder method
AsyncWidgetBuilder<T>: builder); // the default builder that tryies to bild the child widget tree.
I'm not sure if something like this is possible.
What are your thoughts?
rrousselGit and secretwpn
Metadata
Metadata
Assignees
Labels
c: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.