Git Product home page Git Product logo

Comments (3)

rrousselGit avatar rrousselGit commented on July 29, 2024

You can still make the following code by overriding ErrorWidget.builder to:

ErrorWidget.builder = (details) => Defer(details.exception);
FlutterError.onError = null;

But the library won't do it for you anymore, because this is "a bit too unsafe" to catch any exception.
By doing such code, this also catches exceptions in initState or similar life-cycles, which may be undesired as it leaves the throwing widget in an unstable state.

from boundary.

cbenhagen avatar cbenhagen commented on July 29, 2024

Thanks. I am using Crashlytics to handle FlutterError.onError. So I will just use the first line. My main goal using this library is to provide some nice fallback on any uncaught errors which provides a way to contact support with added details about what happened instead of an ugly red screen. Hope this is one of the goals you had in mind when starting this experiment.

from boundary.

rrousselGit avatar rrousselGit commented on July 29, 2024

I am using Crashlytics to handle FlutterError.onError

Technically speaking, that'd become the job of this library

The current setting of FlutterError.onError and ErrorWidget.builder is basically:

Boundary(
  fallbackBuilder: (_, err) {
    FlutterError.dumbErrorToConsole(err);
    return ErrorWidget(err);
  },
  child: MaterialApp()
);

from boundary.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.