Этот репозиторий содержит Flutter плагины для платформы ОС Аврора.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

27 lines
808 B

import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'embedder_texture_platform_interface.dart';
/// An implementation of [LinuxOpenglPlatform] that uses method channels.
class MethodChannelEmbedderTexture extends EmbedderTexturePlatform {
/// The method channel used to interact with the native platform.
@visibleForTesting
final methodChannel = const MethodChannel('embedder_texture');
@override
Future<int?> create(double width, double height) async {
final version = await methodChannel.invokeMethod<int>('create', {
'width': width,
'height': height,
});
return version;
}
@override
Future<void> remove(int textureId) async {
await methodChannel.invokeMethod<int>('remove', {
'textureId': textureId,
});
}
}