I am using GetX to develop an App. I have several pages that should show the same text value(Every page has its own text widget, and these text widgets should show the same value). When I click a button in Setting Page. These pages should change the text value at the same time?
How to accomplish global notification in GetX.
You should declare the value you want to show across your app to be observable so the controller can keep track of it
String sameValue = "same value".obs;
and the way you want show it on the UI is like
Obx(() => Text("${your_controller.sameValue}"))
I try to create a flutter application UI with the App bar and Bottom sheet. I want to update the app bar item count according to the bottom sheet values. Is there any way to do this?
I want to do it without refresh the page.
I'm building multiple form pages in one class, I create 4 widgets each widgets is represent a page with text fields or cards or radio buttons.
and I create a method to switch between pages when. I press next.
This works as expected ^^
My issue UI inside first page is not refreshed unless I press ctrl + S,,
inside the first page of the form, I have created custom radio buttons they're simply cards.
and when tap on any card, there's set state method, to highlight the selected card by changing its style..
This works perfectly! at the beginning when I call the first page 1 directly as a child inside the scaffold..
However, after I created the method to switch between pages.. The UI in page 1 does not refresh..
I will put a picture..
Picture of the method to switch pages
Picture of pages widgets
picture of scaffold and how I call the widget pages
this is a picture of custom radio button which has cards, the card color change if it's selected
I tried many ways! but it didn't work..
Is what I'm trying to do correct? I'm a beginner in flutter
& I have a project to submit :(
I couldn't find a solution in google,,
Try making the widgets StatefulWidget and call setState((){}) inside the widget when you tap on the cards.
So here's what I did ^^
because the issue was just in page 1, so I in the scaffold I added page 1 as it's child directly without Switch page method..
Then inside page1, a button that will navigate to another class,
the second class has exactly the same scaffold and app bar as previous page.. But, in it's child I added calledWidget which switch between pages from 2 to 4 in my case ^^
So short words, I put page 1 in a separate page and the rest of the pages in a switch method in separate class
it works, but I hope I don't find any difficulties When saving values & integrating API to post the values
what you think?
radio button on flutter won't change data (using WebView)
I have a simple quiz application using a radio button on flutter, temporary dummy data is used and displayed in the form of a webview. but when I try to click next, only a few questions change.
Next Question Quiz
display quiz in the form of webview
I want create verticaly scrolling pageView and want change page change animation, I want swiping page come over another page. How can I do this?