feat!: resize canvas on web

This commit is contained in:
Nick Fisher
2024-08-17 11:43:43 +08:00
parent c367824041
commit 1051b1bb0e
2 changed files with 18 additions and 5 deletions

View File

@@ -83,9 +83,11 @@ class _ThermionWidgetState extends State<ThermionWidget> {
@override
Widget build(BuildContext context) {
if (_texture?.usesBackingWindow == true) {
return Stack(children: [
return ResizeObserver(
onResized: _resizeTexture,
child: Stack(children: [
Positioned.fill(child: CustomPaint(painter: TransparencyPainter()))
]);
]));
}
if (_texture == null || _resizing) {