change TextureDetails to ValueNotifier and add MethodChannel listener on Dart side for resize (Windows only)

This commit is contained in:
Nick Fisher
2023-10-24 12:23:20 +11:00
parent 65426aa075
commit 537f0e1c8e
2 changed files with 29 additions and 17 deletions

View File

@@ -1,6 +1,7 @@
import 'dart:async';
import 'dart:ui' as ui;
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'package:polyvox_filament/animations/animation_data.dart';
@@ -22,7 +23,8 @@ abstract class FilamentController {
/// The Flutter texture ID and dimensions for current texture in use.
/// This is only used by [FilamentWidget]; you shouldn't need to access directly yourself.
///
TextureDetails? get textureDetails;
final textureDetails = ValueNotifier<TextureDetails?>(null);
///
/// A stream to indicate whether a FilamentViewer is available.