getEffectDuration method Null safety

Future<int> getEffectDuration(
  1. int effectId
)

Get the duration of an audio effect file. The method gets the duration of an audio effect file. Unit: milliseconds effectId ID of a specified audio effect. Each audio effect has a unique ID.

Implementation

Future<int> getEffectDuration(int effectId) async {
  IntValue reply = await _api.getEffectDuration(IntValue()..value = effectId);
  return reply.value ?? -1;
}