resolve method Null safety

  1. @override
BorderRadius resolve(
  1. TextDirection? direction

Convert this instance into a BorderRadius, so that the radii are expressed for specific physical corners (top-left, top-right, etc) rather than in a direction-dependent manner.

See also:


BorderRadius resolve(TextDirection? direction) {
  assert(direction != null);
  switch (direction!) {
    case TextDirection.rtl:
      return BorderRadius.only(
        topLeft: topEnd,
        topRight: topStart,
        bottomLeft: bottomEnd,
        bottomRight: bottomStart,
    case TextDirection.ltr:
      return BorderRadius.only(
        topLeft: topStart,
        topRight: topEnd,
        bottomLeft: bottomStart,
        bottomRight: bottomEnd,