add integration tests and update README
This commit is contained in:
@@ -198,9 +198,16 @@ class FilamentControllerFFI extends FilamentController {
|
||||
///
|
||||
@override
|
||||
Future resize(int width, int height, {double scaleFactor = 1.0}) async {
|
||||
if (_textureId == null) {
|
||||
print("No texture created, ignoring call to resize.");
|
||||
return;
|
||||
}
|
||||
_resizing = true;
|
||||
setRendering(false);
|
||||
_lib.destroy_swap_chain(_viewer!);
|
||||
if (_viewer != null) {
|
||||
_lib.destroy_swap_chain(_viewer!);
|
||||
}
|
||||
|
||||
await destroyTexture();
|
||||
size = ui.Size(width * _pixelRatio, height * _pixelRatio);
|
||||
|
||||
|
||||
@@ -183,6 +183,7 @@ class _FilamentWidgetState extends State<FilamentWidget> {
|
||||
_resizeTimer?.cancel();
|
||||
|
||||
_resizeTimer = Timer(Duration(milliseconds: 500), () async {
|
||||
print("Resizing to $newSize");
|
||||
await widget.controller
|
||||
.resize(newSize.width.toInt(), newSize.height.toInt());
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||
|
||||
Reference in New Issue
Block a user