feat: support multiple ThermionWidget on Android

This commit is contained in:
Nick Fisher
2024-09-30 18:20:05 +08:00
parent e1efd5e4e0
commit 50ed0bdfda
25 changed files with 418 additions and 549 deletions

View File

@@ -1,5 +1,6 @@
import 'dart:async';
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';
@@ -36,11 +37,11 @@ abstract class ThermionFlutterPlatform extends PlatformInterface {
/// This is internal; unless you are [thermion_*] package developer, don't
/// call this yourself. May not be supported on all platforms.
///
Future<ThermionFlutterTexture?> createTexture(int width, int height);
Future<ThermionFlutterTexture?> createTexture(
t.View view, int width, int height);
///
///
///
Future resizeWindow(
int width, int height, int offsetTop, int offsetRight);
Future resizeWindow(int width, int height, int offsetTop, int offsetRight);
}

View File

@@ -1,18 +1,5 @@
// class ThermionFlutterTextureImpl {
// final int width;
// final int height;
// final int? flutterTextureId;
// final int? hardwareTextureId;
// final int? surfaceAddress;
// bool get usesBackingWindow => flutterTextureId == null;
// ThermionFlutterTexture(this.flutterTextureId, this.hardwareTextureId,
// this.width, this.height, this.surfaceAddress) {
// }
// }
abstract class ThermionFlutterTexture {
int get width;
int get height;