By default, the AppBar will be removed when the focus is lost, leaving more operable space for the main interface content, but in some cases, the AppBar needs to be persistently displayed, for example: on the modification and deletion interfaces, users may not know the existence of the button to click the "finish" button on the AppBar after the operation is complete, we need to display the appbar permanently on the interface.
The specific method is as follows:
AppBar has an issticky attribute to control whether the AppBar is permanently displayed. If the value is true, the appbar can be permanently displayed. The default value is false. If you right-click the persistent display or slide down the screen (the same as opening the AppBar), The AppBar still performs the corresponding operation.
Maybe everyone uses this attribute in their own applications, but do you find any bugs?
If you haveProgramWrite
Bottomappbar. isopen =True; Bottomappbar. issticky=True;
When you click a button, you will encounter a bug where the first click is always invalid and the second operation is required to respond. In fact, the problem lies in the order of statements:
If you put the above two linesCodeIf the order is reversed, this bug will be solved.