FPickerStyle.new constructor - FPickerStyle - forui.widgets.picker library (original) (raw)
constFPickerStyle({
- required TextStyle textStyle,
- required BorderRadiusGeometry selectionBorderRadius,
- required Color selectionColor,
- required FFocusedOutlineStyle focusedOutlineStyle,
- double diameterRatio = 1.07,
- double squeeze = 1,
- double magnification = 1,
- double overAndUnderCenterOpacity = 0.25,
- double spacing = 5,
- TextHeightBehavior textHeightBehavior = const TextHeightBehavior(applyHeightToFirstAscent: false, applyHeightToLastDescent: false),
- 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.');