Offstage Widget

138 views
Skip to first unread message

Harsh Bhikadia

unread,
Jul 29, 2018, 1:52:36 AM7/29/18
to flutt...@googlegroups.com
I am new to flutter.

Does Offstage Widget lazy build (when first time visible) the child or it is loaded at the beginning only?

--

Ian Hickson

unread,
Jul 29, 2018, 7:30:46 PM7/29/18
to Harsh Bhikadia, flutt...@googlegroups.com
Offstage is the same as any other widget, the only difference is that its contents don't paint. It's only useful in rare situations where you want to layout and measure a child without painting it.


--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

--
Ian Hickson

😸

Harsh Bhikadia

unread,
Jul 30, 2018, 5:55:48 AM7/30/18
to i...@hixie.ch, flutt...@googlegroups.com
Can it be used for navigation of sister pages (like tabs or drawer?)

In my app i have a backdrop, i want to use backlayer for displaying navigation menu (5 screens) and front layer to display that page. is using a stack of offpage children a good idea to do that? or should use Navigator ??
--

Ian Hickson

unread,
Jul 30, 2018, 2:49:26 PM7/30/18
to Harsh Bhikadia, flutt...@googlegroups.com
I'm not sure how OffStage could be used to do what you describe.

Harsh Bhikadia

unread,
Jul 30, 2018, 2:50:34 PM7/30/18
to Ian Hickson, flutt...@googlegroups.com
displaying the layer which is at the time currently selected and others are "offstage"
--

Ian Hickson

unread,
Jul 30, 2018, 6:47:49 PM7/30/18
to Harsh Bhikadia, flutt...@googlegroups.com
If the others aren't needed, just don't include them in the build at all, no need for Offstage.

Harsh Bhikadia

unread,
Jul 31, 2018, 1:21:31 AM7/31/18
to Ian Hickson, flutt...@googlegroups.com
I want the backdrop animation, backlayer to remain as it is, just to change the frontlayer of backdrop layout.

How can I use Navigator to just update that part of the screen. Is it even possible? The tutorials is see on internet about Navigator are all updating the complete screen.

I come from android background, we used to do it with fragments.

I saw this article though : https://medium.com/coding-with-flutter/flutter-case-study-multiple-navigators-with-bottomnavigationbar-90eb6caa6dbf  where he drops in a Navigator Widget inside the body of Scaffold. Do you think it will work for me?
--

Ian Hickson

unread,
Jul 31, 2018, 3:01:16 AM7/31/18
to Harsh Bhikadia, flutt...@googlegroups.com
I'm not really sure I understand what effect you're trying to do. If you just want to put things on top of other things, Stack is the usual solution, maybe with an AnimatedPosition if you have an animation.
--

--
Ian Hickson

😸
Reply all
Reply to author
Forward
0 new messages