Stateful widget state losing issue fix.#168
Conversation
|
Hello bro @rayliverified, I am waiting follow up from you for my pull request. |
|
KK, taking a look. Thank you for raising this issue. |
|
I don't understand what Flex solves here. Can you help me understand? |
|
@rayliverified If we put a StatefulWidget under a ResponsiveRowColumn widget, the stateful widget loses state when the ResponsiveRowColumn layout change from Row to Column, and vice versa. This is because the inner widget tree of the ResponsiveRowColumn changes when Row or Column is being conditionally rendered. To Solve this issue, I proposed to use Flex in place of using Row and Column. Flex have the same constructor arguments as Row or Column. The only difference is that we need to define the direction argument, which is used to decide whether to render as Row or Column. In that way, the inner widget tree of the ResponsiveRowColumn will remain intact even the layout changes. The state losing issue is prevented. |
|
bro @rayliverified . I am waiting response from you. :) |
|
Will merge today, thank you.
…On Fri, 23 Feb 2024, 1:21 am Ninja260, ***@***.***> wrote:
bro @rayliverified <https://github.com/rayliverified> . I am waiting
response from you. :)
—
Reply to this email directly, view it on GitHub
<#168 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEXZO3R45MQKJNYPEZNQENDYVA7ORAVCNFSM6AAAAABCKHYPUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRQHA2DAMBVGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
No description provided.