exception_widget 2.0.0 copy "exception_widget: ^2.0.0" to clipboard
exception_widget: ^2.0.0 copied to clipboard

Flutter package that allows to deal with different widgets mapped by exception

exception_widget #

Flutter package that allows to deal with different widgets mapped by exception

Features #

ExceptionWidget #

This widget can be used in that situations where you need to handle multiple exception and return a specific view for each one (eg when dealing with a Future result). You only have to pass the exception you need to deal with and a map of Type: Widget to define which widget to return when error is of that type.

If the current error is not mapped a Container will be returned.

ExceptionWidget(
  error: snapshot.error,
  errorMap: {
    FooException: Text('FooException handled'),
    BarException: Text('BarException handled'),
  },
)

This way you don't need to manually check the exception type to return the desired view

3
likes
140
pub points
0%
popularity

Publisher

unverified uploader

Flutter package that allows to deal with different widgets mapped by exception

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on exception_widget