flutter: Only DropArea creates the stack now

It was a bad default. Other widgets can fill parent.
This commit is contained in:
Sergio Martins
2022-08-19 20:53:54 +01:00
parent 8e5e4d9d0e
commit b0f98dfd2d
2 changed files with 10 additions and 6 deletions

View File

@@ -21,6 +21,10 @@ class DropArea_flutter extends View_flutter {
: super(controller, type, parent, windowFlags: windowFlags) {
print("DropArea_flutter CTOR");
}
Widget createFlutterWidget() {
return DropAreaWidget(kddwView, this, key: widgetKey);
}
}
class DropAreaWidget extends PositionedWidget {
@@ -42,6 +46,10 @@ class DockWidgetPositionedWidgetState extends PositionedWidgetState {
@override
Widget buildContents() {
return super.buildContents();
return Container(
color: kddwView.m_color,
child: Stack(
children: kddwView.childWidgets,
));
}
}

View File

@@ -100,11 +100,7 @@ class PositionedWidgetState extends State<PositionedWidget>
/// This is factored-out from build() so derived classes can return something else
Widget buildContents() {
return Container(
color: kddwView.m_color,
child: Stack(
children: kddwView.childWidgets,
));
return Container(color: kddwView.m_color);
}
@override