IconToo.tall constructor

const IconToo.tall(
  1. IconData? icon, {
  2. Key? key,
  3. @Deprecated(_DEPRECATED) Size? trueSize,
  4. double? sizeX,
  5. double? sizeY,
  6. Color? color,
  7. List<Shadow>? shadows,
  8. AlignmentGeometry? alignment,
  9. String? semanticLabel,
  10. TextDirection? textDirection,
})

🙋‍♂️ I'm an Icon Too!

An extended Icon "too" for those that are not actually square, because Flutter's native Icon "assumes that the rendered icon is squared", plus 👥 shadows support.

This IconToo is dictated to be taller than it is wide.

The default constructor assumes a non-square icon (though the icon may be square) is "wider" by assigning super Icon.size: sizeX ?? sizeY.

The only difference in this IconToo.tall is the order of assignment: sizeY ?? sizeX.

See default constructor IconToo for more information.

Implementation

const IconToo.tall(
  this.icon, {
  Key? key,
  @Deprecated(_DEPRECATED) Size? trueSize,
  double? sizeX,
  double? sizeY,
  this.color,
  this.shadows,
  this.alignment,
  this.semanticLabel,
  this.textDirection,
})  : assert((sizeX ?? 0) >= 0 && (sizeY ?? 0) >= 0,
          '[IconToo.tall] > Provide non-negative dimensions.'),
      _sizeX = sizeX,
      _sizeY = sizeY,
      _trueSize = trueSize,
      super(
        icon,
        key: key,
        size: sizeY ?? sizeX, // Dictated as taller ╠░╣
        color: color,
        semanticLabel: semanticLabel,
        textDirection: textDirection,
      );