class TestActive extends StatefulWidget
{
TestActive();
@override
TestActiveState createState() => new TestActiveState();
}
class TestActiveState extends State<TestActive> with SingleTickerProviderStateMixin,CommonMixin
{
TestActiveState()
{
}
@override
void initState()
{
super.initState();
}
@override
void dispose() {
super.dispose();
}
String getText()
{
showDialog(context: context, builder:(BuildContext context){ return myWidgets.getBusyDialog();});
return "Hello";
}
@override
Widget build(BuildContext context)
{
return new Scaffold(
body: new Container(
child: new Column(
children: <Widget>[
new Text(getText()),
],
),
),
);
}
}
flutter: The following assertion was thrown building TestActive(dirty, state: TestActiveState#c01af):
flutter: setState() or markNeedsBuild() called during build.
flutter: This Overlay widget cannot be marked as needing to build because the framework is already in the
flutter: process of building widgets. A widget can be marked as needing to be built during the build phase
flutter: only if one of its ancestors is currently building. This exception is allowed because the framework
flutter: builds parent widgets before children, which means a dirty descendant will always be built.
flutter: Otherwise, the framework might not visit this widget during this build phase.
flutter: The widget on which setState() or markNeedsBuild() was called was:
flutter: Overlay-[LabeledGlobalKey<OverlayState>#96e49](state: OverlayState#7aab6(entries:
flutter: [OverlayEntry#ff9bb(opaque: false; maintainState: false), OverlayEntry#ee5ca(opaque: false;