roundCorner static method

String roundCorner(
  1. int radiusInner,
  2. int radiusOuter,
  3. int color
)

Implementation

static String roundCorner(int radiusInner, int radiusOuter, int color) {
  if (radiusInner < 1) {
    throw ArgumentError('Radius must be greater than zero.');
  }
  if (radiusOuter < 0) {
    throw ArgumentError(
      'Outer radius must be greater than or equal to zero.',
    );
  }

  var builder = '$_filterRoundCorner($radiusInner';

  if (radiusOuter > 0) {
    builder += '|';
    builder += '$radiusOuter';
  }
  final r = (color & 0xFF0000) >> 16;
  final g = (color & 0xFF00) >> 8;
  final b = color & 0xFF;

  return builder += ',$r,$g,$b)';
}