@@ -16,6 +16,9 @@ class SizePicker extends StatefulWidget {
16
16
17
17
@override
18
18
State <SizePicker > createState () => _SizePickerState ();
19
+
20
+ static const double smallLength = 25 ;
21
+ static const double largeLength = 150 ;
19
22
}
20
23
21
24
/// Returns a string representation of [num] that:
@@ -75,9 +78,6 @@ class _SizeSlider extends StatelessWidget {
75
78
final Axis axis;
76
79
final void Function (void Function ()) setState;
77
80
78
- static const double _smallLength = 25 ;
79
- static const double _largeLength = 150 ;
80
-
81
81
/// [percent] is a value between 0 and 1
82
82
/// where 0 is the start of the slider and 1 is the end.
83
83
///
@@ -97,21 +97,25 @@ class _SizeSlider extends StatelessWidget {
97
97
final colorScheme = Theme .of (context).colorScheme;
98
98
return GestureDetector (
99
99
onHorizontalDragStart: axis == Axis .horizontal
100
- ? (details) => onDrag (details.localPosition.dx / _largeLength)
100
+ ? (details) =>
101
+ onDrag (details.localPosition.dx / SizePicker .largeLength)
101
102
: null ,
102
103
onHorizontalDragUpdate: axis == Axis .horizontal
103
- ? (details) => onDrag (details.localPosition.dx / _largeLength)
104
+ ? (details) =>
105
+ onDrag (details.localPosition.dx / SizePicker .largeLength)
104
106
: null ,
105
107
onVerticalDragStart: axis == Axis .vertical
106
- ? (details) => onDrag (details.localPosition.dy / _largeLength)
108
+ ? (details) =>
109
+ onDrag (details.localPosition.dy / SizePicker .largeLength)
107
110
: null ,
108
111
onVerticalDragUpdate: axis == Axis .vertical
109
- ? (details) => onDrag (details.localPosition.dy / _largeLength)
112
+ ? (details) =>
113
+ onDrag (details.localPosition.dy / SizePicker .largeLength)
110
114
: null ,
111
115
child: RotatedBox (
112
116
quarterTurns: axis == Axis .horizontal ? 0 : 1 ,
113
117
child: CustomPaint (
114
- size: const Size (_largeLength, _smallLength ),
118
+ size: const Size (SizePicker .largeLength, SizePicker .smallLength ),
115
119
painter: _SizeSliderPainter (
116
120
axis: axis,
117
121
minSize: pen.sizeMin,
0 commit comments