fix resizing
This commit is contained in:
@@ -103,14 +103,19 @@ class _FilamentWidgetState extends State<FilamentWidget> {
|
||||
width: constraints.maxWidth,
|
||||
child: ResizeObserver(
|
||||
onResized: (Size oldSize, Size newSize) async {
|
||||
// setState(() {
|
||||
// _resizing = true;
|
||||
// });
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||
setState(() {
|
||||
_resizing = true;
|
||||
});
|
||||
|
||||
await widget.controller.resize(
|
||||
newSize.width.toInt(), newSize.height.toInt());
|
||||
setState(() {
|
||||
_resizing = false;
|
||||
await widget.controller.resize(
|
||||
newSize.width.toInt(), newSize.height.toInt());
|
||||
WidgetsBinding.instance
|
||||
.addPostFrameCallback((_) async {
|
||||
setState(() {
|
||||
_resizing = false;
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
child: Platform.isLinux
|
||||
|
||||
Reference in New Issue
Block a user