@@ -95,26 +95,12 @@ class Scrollbar extends StatelessWidget {
95
95
this .notificationPredicate,
96
96
this .interactive,
97
97
this .scrollbarOrientation,
98
- @Deprecated (
99
- 'Use thumbVisibility instead. '
100
- 'This feature was deprecated after v2.9.0-1.0.pre.' ,
101
- )
102
- this .isAlwaysShown,
103
98
@Deprecated (
104
99
'Use ScrollbarThemeData.trackVisibility to resolve based on the current state instead. '
105
100
'This feature was deprecated after v3.4.0-19.0.pre.' ,
106
101
)
107
102
this .showTrackOnHover,
108
- @Deprecated (
109
- 'Use ScrollbarThemeData.thickness to resolve based on the current state instead. '
110
- 'This feature was deprecated after v2.9.0-1.0.pre.' ,
111
- )
112
- this .hoverThickness,
113
- }) : assert (
114
- thumbVisibility == null || isAlwaysShown == null ,
115
- 'Scrollbar thumb appearance should only be controlled with thumbVisibility, '
116
- 'isAlwaysShown is deprecated.'
117
- );
103
+ });
118
104
119
105
/// {@macro flutter.widgets.Scrollbar.child}
120
106
final Widget child;
@@ -131,20 +117,8 @@ class Scrollbar extends StatelessWidget {
131
117
/// If the thumb visibility is related to the scrollbar's material state,
132
118
/// use the global [ScrollbarThemeData.thumbVisibility] or override the
133
119
/// sub-tree's theme data.
134
- ///
135
- /// Replaces deprecated [isAlwaysShown] .
136
120
final bool ? thumbVisibility;
137
121
138
- /// {@macro flutter.widgets.Scrollbar.isAlwaysShown}
139
- ///
140
- /// To show the scrollbar thumb based on a [MaterialState] , use
141
- /// [ScrollbarThemeData.thumbVisibility] .
142
- @Deprecated (
143
- 'Use thumbVisibility instead. '
144
- 'This feature was deprecated after v2.9.0-1.0.pre.' ,
145
- )
146
- final bool ? isAlwaysShown;
147
-
148
122
/// {@macro flutter.widgets.Scrollbar.trackVisibility}
149
123
///
150
124
/// If this property is null, then [ScrollbarThemeData.trackVisibility] of
@@ -172,21 +146,6 @@ class Scrollbar extends StatelessWidget {
172
146
)
173
147
final bool ? showTrackOnHover;
174
148
175
- /// The thickness of the scrollbar when a hover state is active and
176
- /// [showTrackOnHover] is true.
177
- ///
178
- /// If this property is null, then [ScrollbarThemeData.thickness] of
179
- /// [ThemeData.scrollbarTheme] is used to resolve a thickness. If that is also
180
- /// null, the default value is 12.0 pixels.
181
- ///
182
- /// This is deprecated, use [ScrollbarThemeData.thickness] to resolve based on
183
- /// the current state instead.
184
- @Deprecated (
185
- 'Use ScrollbarThemeData.thickness to resolve based on the current state instead. '
186
- 'This feature was deprecated after v2.9.0-1.0.pre.' ,
187
- )
188
- final double ? hoverThickness;
189
-
190
149
/// The thickness of the scrollbar in the cross axis of the scrollable.
191
150
///
192
151
/// If null, the default value is platform dependent. On [TargetPlatform.android] ,
@@ -216,7 +175,7 @@ class Scrollbar extends StatelessWidget {
216
175
Widget build (BuildContext context) {
217
176
if (Theme .of (context).platform == TargetPlatform .iOS) {
218
177
return CupertinoScrollbar (
219
- thumbVisibility: isAlwaysShown ?? thumbVisibility ?? false ,
178
+ thumbVisibility: thumbVisibility ?? false ,
220
179
thickness: thickness ?? CupertinoScrollbar .defaultThickness,
221
180
thicknessWhileDragging: thickness ?? CupertinoScrollbar .defaultThicknessWhileDragging,
222
181
radius: radius ?? CupertinoScrollbar .defaultRadius,
@@ -229,10 +188,9 @@ class Scrollbar extends StatelessWidget {
229
188
}
230
189
return _MaterialScrollbar (
231
190
controller: controller,
232
- thumbVisibility: isAlwaysShown ?? thumbVisibility,
191
+ thumbVisibility: thumbVisibility,
233
192
trackVisibility: trackVisibility,
234
193
showTrackOnHover: showTrackOnHover,
235
- hoverThickness: hoverThickness,
236
194
thickness: thickness,
237
195
radius: radius,
238
196
notificationPredicate: notificationPredicate,
@@ -250,7 +208,6 @@ class _MaterialScrollbar extends RawScrollbar {
250
208
super .thumbVisibility,
251
209
super .trackVisibility,
252
210
this .showTrackOnHover,
253
- this .hoverThickness,
254
211
super .thickness,
255
212
super .radius,
256
213
ScrollNotificationPredicate ? notificationPredicate,
@@ -264,7 +221,6 @@ class _MaterialScrollbar extends RawScrollbar {
264
221
);
265
222
266
223
final bool ? showTrackOnHover;
267
- final double ? hoverThickness;
268
224
269
225
@override
270
226
_MaterialScrollbarState createState () => _MaterialScrollbarState ();
@@ -280,7 +236,7 @@ class _MaterialScrollbarState extends RawScrollbarState<_MaterialScrollbar> {
280
236
late bool _useAndroidScrollbar;
281
237
282
238
@override
283
- bool get showScrollbar => widget.thumbVisibility ?? _scrollbarTheme.thumbVisibility? .resolve (_states) ?? _scrollbarTheme.isAlwaysShown ?? false ;
239
+ bool get showScrollbar => widget.thumbVisibility ?? _scrollbarTheme.thumbVisibility? .resolve (_states) ?? false ;
284
240
285
241
@override
286
242
bool get enableGestures => widget.interactive ?? _scrollbarTheme.interactive ?? ! _useAndroidScrollbar;
@@ -370,8 +326,7 @@ class _MaterialScrollbarState extends RawScrollbarState<_MaterialScrollbar> {
370
326
MaterialStateProperty <double > get _thickness {
371
327
return MaterialStateProperty .resolveWith ((Set <MaterialState > states) {
372
328
if (states.contains (MaterialState .hovered) && _trackVisibility.resolve (states)) {
373
- return widget.hoverThickness
374
- ?? _scrollbarTheme.thickness? .resolve (states)
329
+ return _scrollbarTheme.thickness? .resolve (states)
375
330
?? _kScrollbarThicknessWithTrack;
376
331
}
377
332
// The default scrollbar thickness is smaller on mobile.
0 commit comments