consultarStatusSat method

  1. @override
Future<ResponseStatus?> consultarStatusSat({
  1. int? numeroSessao,
  2. required String codigoAtivacao,
})
override

Implementation

@override
Future<ResponseStatus?> consultarStatusSat(
    {int? numeroSessao, required codigoAtivacao}) async {
  final consultaSat = await methodChannel.invokeMethod<String>(
      'statusOperacional',
      {'numeroSessao': numeroSessao, 'codigoAtivacao': codigoAtivacao});
  if (consultaSat != null) {
    List<String?> consulta = consultaSat.split('|');
    if (consulta.length < 2) {
      log(consulta.toString());
      return null;
    }
    return ResponseStatus.fromSat(consulta);
  } else {
    return null;
  }
}