changeFilter method

Future changeFilter(
  1. int p
)

Implementation

Future changeFilter(int p) async {
  int sendNative = p;
  if (_cameraDeepArState.supportedEffects.isNotEmpty) {
    Filters e = _cameraDeepArState.supportedFilters[p];
    sendNative = Filters.values.indexOf(e);
  }
  if (p > Filters.values.length - 1) p = 0;
  return channel.invokeMethod('changeFilter', <String, dynamic>{
    'filter': sendNative,
  });
}