createGroup method

Future<FilterGroup> createGroup()

Implementation

Future<FilterGroup> createGroup() async {
  try {
    final index = await _methodChannel.invokeMethod('create');
    if (defaultTargetPlatform == TargetPlatform.iOS) {
      return _CIFilterGroup(index);
    }
    if (defaultTargetPlatform == TargetPlatform.android) {
      return _GPUImageFilterGroup(index);
    }
  } catch (error) {
    print(error);
    rethrow;
  }
  throw UnsupportedError('$defaultTargetPlatform');
}