Git Product home page Git Product logo

boundary's People

Contributors

rrousselgit avatar shyndman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

boundary's Issues

Constraints being loosened by boundary

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:

  • Stack
    • Positioned.fromRect // tight constraints
      • Boundary // constraints loosened
        • DecoratedBox // sizes to zero

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.

License?

Hi Remi,

I know this library is experimental and all that, but would it be possible to add a license?

Thanks :)

Are boundaries impossible?

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.

Catch exceptions

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;
            }),
          ),
        ),
      ),
    );
  }
}

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.