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 create(double width, double height) async { final version = await methodChannel.invokeMethod('create', { 'width': width, 'height': height, }); return version; } @override Future remove(int textureId) async { await methodChannel.invokeMethod('remove', { 'textureId': textureId, }); } }