FPickerStyle.new constructor - FPickerStyle - forui.widgets.picker library (original) (raw)

constFPickerStyle({

  1. required TextStyle textStyle,
  2. required BorderRadiusGeometry selectionBorderRadius,
  3. required Color selectionColor,
  4. required FFocusedOutlineStyle focusedOutlineStyle,
  5. double diameterRatio = 1.07,
  6. double squeeze = 1,
  7. double magnification = 1,
  8. double overAndUnderCenterOpacity = 0.25,
  9. double spacing = 5,
  10. TextHeightBehavior textHeightBehavior = const TextHeightBehavior(applyHeightToFirstAscent: false, applyHeightToLastDescent: false),
  11. double selectionHeightAdjustment = 0,

})

Implementation

const FPickerStyle({
  required this.textStyle,
  required this.selectionBorderRadius,
  required this.selectionColor,
  required this.focusedOutlineStyle,
  this.diameterRatio = 1.07,
  this.squeeze = 1,
  this.magnification = 1,
  this.overAndUnderCenterOpacity = 0.25,
  this.spacing = 5,
  this.textHeightBehavior = const TextHeightBehavior(
    applyHeightToFirstAscent: false,
    applyHeightToLastDescent: false,
  ),
  this.selectionHeightAdjustment = 0,
}) : assert(0 < diameterRatio, 'The diameter ratio must be greater than 0.'),
     assert(0 < squeeze, 'The squeeze must be greater than 0.'),
     assert(0 < magnification, 'The magnification must be greater than 0.'),
     assert(
       0 <= overAndUnderCenterOpacity && overAndUnderCenterOpacity <= 1,
       'The over and under center opacity must be between 0 and 1.',
     ),
     assert(spacing >= 0, 'The spacing must be greater than or equal to 0.');