CropController constructor

CropController({
  1. double? aspectRatio,
  2. Rect defaultCrop = const Rect.fromLTWH(0, 0, 1, 1),
})

Implementation

CropController({
  double? aspectRatio,
  Rect defaultCrop = const Rect.fromLTWH(0, 0, 1, 1),
})  : assert(defaultCrop.left >= 0 && defaultCrop.left <= 1,
          'left should be 0..1'),
      assert(defaultCrop.right >= 0 && defaultCrop.right <= 1,
          'right should be 0..1'),
      assert(
          defaultCrop.top >= 0 && defaultCrop.top <= 1, 'top should be 0..1'),
      assert(defaultCrop.bottom >= 0 && defaultCrop.bottom <= 1,
          'bottom should be 0..1'),
      assert(defaultCrop.left < defaultCrop.right,
          'left must be less than right'),
      assert(defaultCrop.top < defaultCrop.bottom,
          'top must be less than bottom'),
      super(_CropControllerValue(aspectRatio, defaultCrop));