Example of updating pop-up window content by fluent (valid for personal test)


What is flutter

Fluent is a mobile UI development framework launched by Google, which can quickly build high-quality native user interfaces on IOS and Android.

Flutter can work with existing code, and flutter is completely free and open source.

In summary:

Fluent is a mobile application SDK, including frameworks, widgets and tools, which provides developers with a simple and efficient way to build and deploy exquisite mobile applications on Android and IOS.

Flutter’s advantages

Rapid development

Millisecond hot overload. After modification, your application interface will be updated immediately. Build a native interface in minutes with rich, fully customizable widgets.

Expressive and flexible UI

Quickly release features that focus on native experiences. The layered architecture allows you to completely customize, enabling incredibly fast rendering and expressive and flexible design.

Native performance

Fluent contains many core widgets, such as scrolling, navigation, icons and fonts, which can achieve the same performance as native applications on IOS and Android.

In the shuttle, the general method to change the value is

setState(() {
// do something

However, this method does not work for pop-up windows. Some people say setstate (() {}); This method changes the value of the current window, and the pop-up window does not belong to the current window, so it does not take effect;

The following is an example of changing the contents of the pop-up window

Var titletext = "before Title Change“

//Pop up method
  void show(BuildContext context) async {
        context: context,
        builder: (ctx) {
          return StatefulBuilder(builder: (context, state) {
            return AlertDialog(
              title: Text(titleText),
              content: Container(
                Child: text ("I am the content"),
              actions: <Widget>[
                  child: FlatButton(
                    Child: text ('change title text '),
                    onPressed: () {
                      state(() {
                        Titletext = "after changing the title";

Call Popup

This is the end of this article about the example of the updated pop-up content of the flutter implementation (effective in the personal test). For more information about the updated pop-up content of the flutter, please search the previous articles of developeppaer or continue to browse the relevant articles below. I hope you will support developeppaer in the future!