Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Adam Barth
@abarth
because the compiler spends more time processing it and optimizing it
the hot reload runs the compiler for a tiny amount of time (that's why its so fast)
and doesn't optimize it much (that's how you're able to change it with out re-running the optimization pass on the rest of the code)
blehn
@blehn
I'm using both, but device currently. Android simulator just obliterates my CPU.
Eric Seidel
@eseidelGoogle
There is an old related bug: flutter/flutter#5581
blehn
@blehn
got it, thanks for the quick replies! I don't mean to suggest that hot reloading in release mode is essential... just wishful thinking, coming from the web world where hot reloading is taken for granted.
Eric Seidel
@eseidel
hot reload is a bit different on the web no? :)
I mean, you can reload
but it’s not really “hot”. state is not preserved
As abarth suggests, we could create a no-asserts debug mode which would be a little faster in some ways
Eh, I guess JS does have some sort of support for module reloading now, but the frameworks may not. The DOM doesn’t, etc. There are a lot of details (for better or worse) to make this all work nice :)
Regardless, the feedback is valuable, thank you!
Marian
@cortexdesign
is there any timeline when firebase will work with the current flutter version?
Ghost
@ghost~584d0d9dd73408ce4f3c36b5
natively not sure but you can already use Platform plugins if you wish
Marian
@cortexdesign
https://github.com/flutter/firebase_database is not working with the current flutter version. Is there any other plugin?
Ghost
@ghost~584d0d9dd73408ce4f3c36b5
hum I wasn"t aware of this plugin we wrote our own calls
Donny Velazquez
@donnyv
Is there a WebView in flutter? Was going to use this to show a map using MapboxGL
blehn
@blehn
It's not clear to me why padding isn't a property of any widget. The Container widget seems like the spacer.gif of Flutter... adding extra nodes and complexity where there shouldn't be
Eric Seidel
@eseidelGoogle
@donnyv you can put up a full-screen mapview, or full-screen WebView, it's not currently possible to layout a WebView or MapView inside other flutter content.
blehn
@blehn
@eseidelGoogle so I'd still have to nest a widget inside a Padding class like I would with a Container?
The docs seem to suggest it's not much different from a Container. My issue is that it forces you to create wrapper Containers/Paddings solely for the sake of padding
Adam Barth
@abarth
@blehn yes, the framework works by composition
it's very common to wrap widgets with other widgets
blehn
@blehn
I get that, but let's say I wrap a two Columns inside a Row. In order to get a sensible layout, I have to wrap the two Columns inside a Padding and then wrap the contents of each Column inside a Padding. The nesting gets very hairy very quickly.
And that doesn't really answer the first question — if Container is a widget that accepts a padding attribute, why not let any widget accept a padding attribute?
Adam Barth
@abarth
It's common to have fairly deeply nested build functions. if you put trailing commas at the end of the argument lists, the formatter will format them pretty cleanly
you can alway break up complex build functions by extracting reusable components into widgets
or putting some parts in different functions
depend on what's most aesthetic
to answer your question
we could add a padding attribute to every widget
each widget could start with if (padding != null) return new Padding(padding: padding, child: <whatever it would return otherwise>)
a couple widgets that can do something more efficient than that do have a padding attribute
otherwise, you might as well put the Padding outside the widget
because otherwise you'll be constantly checking whether the client wants padding even though they usually don't
you can try out different styles with your own widgets
and form your own conclusions about what patterns are more effective
but we've found that having simpler widgets that compose easily is a more effective pattern than having big complex widgets that are more difficult to compose
Adam Barth
@abarth
Container itself is a bit of a beginner tool. It's very useful to give beginner a foothold into the system, but most developers end up using the component pieces directly as they become more advance because that's the more flexible/powerful approach
Padding tends to be the stepping stone in that direction
hence the long design discussion in the docs for Padding
blehn
@blehn
gotcha, thanks
Donny Velazquez
@donnyv
@eseidel do you have a sample anywhere with that?
Eric Seidel
@eseidelGoogle
@donnyv I'm forgetting the question? Which sample are you looking for? :)
Jaap Vermeulen
@jacoplane
@cortexdesign I presume the Firebase plugin will work soon since there's an event about Flutter & Firebase in less than a month at I/O: https://events.google.com/io/schedule/?section=may-19&sid=496d01fb-2139-4fd6-84b2-e585d1a20e61
Donny Velazquez
@donnyv
@eseidelGoogle adding a WebView
Hadrien Lejard
@lejard-h
@donnyv I am working on a webview plugin, I hope it will be available soon (at least for Android), but to be sure what are your needs ? Having a fullscreen web view in a different activity or, a full screen web view with flutter widgets on top ?
Donny Velazquez
@donnyv
Having a full screen WebView in its own activity is fine. I can always add additional UI elements using html. I know you can't add flutter widgets right now but is there a way for javascript code in a WebView to reach back out to Dart code?
Ghost
@ghost~584d0d9dd73408ce4f3c36b5
Hi