hexIntoName method

Future<String?> hexIntoName(
  1. String value
)

Implementation

Future<String?> hexIntoName(String value) async {
  try {
    final response = await _apiService.getColorName(value.removeHexPrefix());
    return response.isNotEmpty ? response[0].name : "";
  } catch (e) {
    if (kDebugMode) {
      print("Error: $e");
    }
    return "";
  }
}