createSurface method
Implementation
@override
Future<int> createSurface(int width, int height) async {
int? textureId;
try {
textureId = await methodChannel.invokeMethod<int>('createSurface', {
'width': width,
'height': height,
});
} on PlatformException catch (e) {
debugPrint(e.toString());
return -1;
}
return textureId ?? -1;
}