feat: texture rgba interface

This commit is contained in:
Kingtous 2023-02-19 19:14:48 -08:00
parent 44d3a78b9b
commit 6fd900c479
4 changed files with 78 additions and 34 deletions

View file

@ -1,4 +1,8 @@
// ignore: unused_import
import 'dart:io';
// Compatible with lint in Flutter 3.0.5
// ignore: unused_import
import 'dart:typed_data';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
@ -41,9 +45,6 @@ class MethodChannelTextureRgbaRenderer extends TextureRgbaRendererPlatform {
@override
Future<int> getTexturePtr(int key) async {
if (Platform.isMacOS) {
return -1;
}
final ptr =
await methodChannel.invokeMethod('getTexturePtr', {"key": key}) ??
false;