filename property

  1. @override
String get filename
override

Icon file name

Implementation

@override
String get filename {
  var isDarkAppearance = appearances != null &&
      appearances!
          .any((e) => e.appearance == 'luminosity' && e.value == 'dark');

  var isTintedAppearance = appearances != null &&
      appearances!
          .any((e) => e.appearance == 'luminosity' && e.value == 'tinted');

  var defaultName = IOS_DEFAULT_ICON_NAME;
  if (isDarkAppearance) {
    defaultName = '$defaultName-Dark';
  } else if (isTintedAppearance) {
    defaultName = '$defaultName-Tinted';
  }

  if (scale == 0) {
    return '$defaultName-$sizeName.png';
  } else {
    return '$defaultName-$sizeName@${scale}x.png';
  }
}