logSat method

  1. @override
Future<ResponseLog?> logSat(
  1. String codigoAtivacao
)
override

Implementation

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