readDeviceLabel method

String readDeviceLabel({
  1. String? description,
})

Implementation

String readDeviceLabel({String? description}) {
  logger.info(
    description ??
        'Please enter the label of the device, which is a slightly more verbose name for the device. (example: Raspberry Pi Model 4B)',
  );
  final label = inputWithValidation(
    'Device label:',
    validator: (s) {
      if (s.trim().isNotEmpty) {
        return null;
      }
      return 'Input is empty. Please try again.';
    },
  );

  logger.spaces();

  return label;
}