rrousselgit / boundary Goto Github PK
View Code? Open in Web Editor NEWError Boundaries for Flutter
License: MIT License
Error Boundaries for Flutter
License: MIT License
I actually encountered this awhile back, but it slipped my mind to report...but then it popped back in, so here I am. :)
The Stack
being used in the boundary is modifying constraints, so when the boundary is applied, a widget will sometimes render differently than it would without.
I encountered this with a situation similar to:
I suspect this isn't desired. If you agree, happy to send a PR.
I'm finding this very useful, btw. We work with widgets that can't be trusted, and boundary is keeping them in line.
Hi Remi,
I know this library is experimental and all that, but would it be possible to add a license?
Thanks :)
Hi,
I see that this project is still experimental, do you have any plan to make a stable version?
If not do you have any idea how you could approach this? I mean overlay is not ideal because you might create a duplicate GlobalKey right?
I saw your discussion with the flutter team about enabling support for boundaries, especially to handle error in the build method. As you mentioned, this is sometimes used as a feature is React and I think I need this for one of my project.
What is the reasoning behind f81146f? Catching exceptions sounded like one of the main points of this project.
Or do I miss something and the following code should still show the fallback widget?
import 'package:boundary/boundary.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('hello')),
body: Boundary(
fallbackBuilder: (context, error) {
return const Center(child: Text('Oops'));
},
child: Container(
color: Colors.red,
padding: const EdgeInsets.all(50),
child: Builder(builder: (_) {
throw 42;
}),
),
),
),
);
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.