load method

  1. @override
Future<int> load(
  1. List<Map<String, dynamic>> clips, {
  2. Map<String, dynamic>? config,
})
override

Implementation

@override
Future<int> load(
  List<Map<String, dynamic>> clips, {
  Map<String, dynamic>? config,
}) async {
  final textureId = await methodChannel.invokeMethod<int>(
    'load',
    <String, Object?>{
      'clips': clips,
      'config': config ?? TimelineCompositionConfig().toJson(),
    },
  );
  if (textureId == null) {
    throw StateError('Native timeline load did not return a texture id.');
  }
  return textureId;
}