exception_widget 1.0.0
exception_widget: ^1.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

2
likes
110
pub points
0%
popularity

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

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

dariof28.dev@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on exception_widget