getScannerInfo method

dynamic getScannerInfo(
  1. dynamic callback(
    1. bool isSuccess
    )
)

Implementation

getScannerInfo(Function(bool isSuccess) callback) {
  UnitsForNetwork.getHttpForDevice(
    getDeviceDetailApi,
    parameters: {},
    onSuccess: (res) {
      UnitsDataTool.saveString(LESN_MODEL, res["model"], '');
      callback(true);
      debugPrint(res.toString());
    },
    onError: (error) {
      callback(false);
      debugPrint(error.toString());
    },
  );
}