validate static method

dynamic validate(
  1. String uri, {
  2. bool dry = false,
})

validates if uri is available for usage/ if dry == true, it validates through logic and check if it will work or not. running validate with dry == false will actually create the widget, runs a full validation

Implementation

static validate(String uri, {bool dry = false}) {
  // todo: implement dry run
  try {
    XIcon(XIconData.fromUri(uri));
    return true;
  } catch (e) {
    return false;
  }
}