UnitRuler constructor
const
UnitRuler({
- Key? key,
- required ValueChangedCallback onValueChanged,
- required double width,
- required ScaleUnit scaleUnit,
- required EdgeInsetsGeometry? scalePadding,
- required Alignment scaleAlignment,
- required Axis scrollDirection,
- required double scaleMarkerPositionTop,
- required double scaleMarkerPositionLeft,
- required double height,
- required String scaleIntervalText(),
- required double scaleIntervalTextPosition,
- double scaleMargin = 0,
- List<
ScaleIntervalStyle> scaleIntervalStyles = const [ScaleIntervalStyle(scale: 0, color: Color.fromARGB(255, 188, 194, 203), width: 2, height: 32), ScaleIntervalStyle(color: Color.fromARGB(255, 188, 194, 203), width: 1, height: 20)], - TextStyle scaleIntervalTextStyle = const TextStyle(color: Color.fromARGB(255, 188, 194, 203), fontSize: 14),
- Widget? scaleMarker,
- Color backgroundColor = Colors.white,
- ScaleController? controller,
Creates an instance of the UnitRuler. This constructor initializes the ruler with default settings.
Implementation
const UnitRuler({
super.key,
required this.onValueChanged,
required this.width,
required this.scaleUnit,
required this.scalePadding,
required this.scaleAlignment,
required this.scrollDirection,
required this.scaleMarkerPositionTop,
required this.scaleMarkerPositionLeft,
required this.height,
required this.scaleIntervalText,
required this.scaleIntervalTextPosition,
this.scaleMargin = 0,
this.scaleIntervalStyles = const [
ScaleIntervalStyle(
scale: 0,
color: Color.fromARGB(255, 188, 194, 203),
width: 2,
height: 32),
ScaleIntervalStyle(
color: Color.fromARGB(255, 188, 194, 203), width: 1, height: 20),
],
this.scaleIntervalTextStyle = const TextStyle(
color: Color.fromARGB(255, 188, 194, 203),
fontSize: 14,
),
this.scaleMarker,
this.backgroundColor = Colors.white,
this.controller,
});