consultarSat method

  1. @override
Future<ResponseStatus?> consultarSat({
  1. int? numeroSessao,
})
override

Implementation

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