fix Windows build.dart to avoid native_assets fork; add implementations for ThermionFlutterWindows

This commit is contained in:
Nick Fisher
2024-10-12 02:14:37 +11:00
parent 6d1e56caac
commit e2d11014d0
23 changed files with 524 additions and 215 deletions

View File

@@ -4,6 +4,7 @@ import 'package:thermion_dart/thermion_dart.dart' as t;
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
import 'package:thermion_dart/thermion_dart.dart';
import 'thermion_flutter_texture.dart';
import 'thermion_flutter_window.dart';
class ThermionFlutterOptions {
final String? uberarchivePath;
@@ -41,7 +42,13 @@ abstract class ThermionFlutterPlatform extends PlatformInterface {
t.View view, int width, int height);
///
/// Create a rendering window.
///
/// This is internal; unless you are [thermion_*] package developer, don't
/// call this yourself. May not be supported on all platforms.
///
Future resizeWindow(int width, int height, int offsetTop, int offsetRight);
Future<ThermionFlutterWindow> createWindow(
int width, int height, int offsetLeft, int offsetTop);
}

View File

@@ -0,0 +1,16 @@
abstract class ThermionFlutterWindow {
int get width;
int get height;
int get handle;
///
/// Destroy a texture and clean up the texture cache (if applicable).
///
Future destroy();
Future resize(int width, int height, int left, int top);
Future markFrameAvailable();
}