Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Oof, I thought Flutter was supposed to make programmatic UI more readable/easy?

    body: Stack(
          children: <Widget>[
            LayoutBuilder(
              builder: (ctx, constraints) => Container(
                width: double.infinity,
                height: constraints.maxHeight - 67.0,
                padding: const EdgeInsets.fromLTRB(20.0, 20.0, 20.0, 0.0),
                child: Column(
                  mainAxisSize: MainAxisSize.min,
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: <Widget>[
                    Column(
                      mainAxisSize: MainAxis
                     ....


You can hide that in a smaller widget called SomethingWidget(param:...) to make it more readable.

From my experience, using the above style with its data binding is nicer than hunting through XML or whatever GUI you use and seeing how that relates to your code.

Easier to navigate and debug. But I agree it can look overwhelming if it’s not split into smaller widgets.


I built a few apps with it. It starts to feel more streamlined once you work in it for a couple days, but whenever I go to make an edit it takes me about an hour of saying "what in the..." before it starts to click.

What I always wish I had was a better way to create functions that build smaller units so I didn't have be so many tabs deep. It can be done, but it's not fun or straightforward.


Yikes, that’s quite something




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: