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
I thought there was an email about supporting that
blehn
@blehn
is there a way to use hot reload with "flutter run --release", or to run from IntelliJ in release mode?
Adam Barth
@abarth
nope
Eric Seidel
@eseidelGoogle
So intellij --release mode is in the works
hot-reload only works in --debug mode
(by design)
Adam Barth
@abarth
release uses the AOT compiler, which is better for production but doesn't support hot reload
blehn
@blehn
rats
Eric Seidel
@eseidelGoogle
Launching in --profile or --release mode from intellij looks to be flutter/flutter-intellij#930
Adam Barth
@abarth
why do you want to hot reload release mode?
Eric Seidel
@eseidelGoogle
looks like it worked but was disabled
blehn
@blehn
I was thinking that debug mode is reduced performance... wrong?
Eric Seidel
@eseidelGoogle
It makes tradeoffs to optimize for ease of development, including some performance, yes
for example --debug turns on asserts which are useful, enables the JIT compiler (which makes hot-reload possible) and enables the debugger (which is insecure to ship with, but useful for debugging) and various other tradeoffs.
Adam Barth
@abarth
there's another mode we could expose
which is JIT without asserts
we just don't expose it to keep the matrix of configurations under control
otherwise it gets too confusing
Eric Seidel
@eseidelGoogle
lol. "under control". Our matrix is impressive as-is. :)
@blehn https://github.com/flutter/flutter/wiki/Flutter%27s-modes is a wiki page on the --debug vs. --release divide
blehn
@blehn
Thanks guys. I guess what's important to me is that debug mode isn't hampering scrolling, animations, etc... because I'd want to be able to evaluate that type of performance, without losing hot reloading.
Eric Seidel
@eseidelGoogle
@blehn which config are you using? simulator? device?
Adam Barth
@abarth
that's tough because support hot reload implies a performance trade-off
the --release code is going to run smoother than the debug code
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