Skip to content

Commit 11732fd

Browse files
authored
Fix deprecated_member_use (ubuntu-flutter-community#84)
info • 'toolbarOptions' is deprecated and shouldn't be used. Use `contextMenuBuilder` instead. This feature was deprecated after v3.3.0-0.5.pre • lib/src/cupertino/spin_box.dart:256:31 • deprecated_member_use info • 'ToolbarOptions' is deprecated and shouldn't be used. Use `contextMenuBuilder` instead. This feature was deprecated after v3.3.0-0.5.pre • lib/src/cupertino/spin_box.dart:257:9 • deprecated_member_use info • 'toolbarOptions' is deprecated and shouldn't be used. Use `contextMenuBuilder` instead. This feature was deprecated after v3.3.0-0.5.pre • lib/src/cupertino/spin_box.dart:284:9 • deprecated_member_use info • 'toolbarOptions' is deprecated and shouldn't be used. Use `contextMenuBuilder` instead. This feature was deprecated after v3.3.0-0.5.pre • lib/src/material/spin_box.dart:264:22 • deprecated_member_use info • 'ToolbarOptions' is deprecated and shouldn't be used. Use `contextMenuBuilder` instead. This feature was deprecated after v3.3.0-0.5.pre • lib/src/material/spin_box.dart:265:9 • deprecated_member_use info • 'caption' is deprecated and shouldn't be used. Use bodySmall instead. This feature was deprecated after v3.1.0-0.0.pre • lib/src/material/spin_box.dart:351:39 • deprecated_member_use info • 'toolbarOptions' is deprecated and shouldn't be used. Use `contextMenuBuilder` instead. This feature was deprecated after v3.3.0-0.5.pre • lib/src/material/spin_box.dart:412:9 • deprecated_member_use
1 parent 23dfb09 commit 11732fd

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

lib/src/cupertino/spin_box.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class CupertinoSpinBox extends BaseSpinBox {
7474
this.direction = Axis.horizontal,
7575
this.textAlign = TextAlign.center,
7676
this.textStyle,
77-
this.toolbarOptions,
77+
this.contextMenuBuilder,
7878
this.showCursor,
7979
this.cursorColor,
8080
this.enableInteractiveSelection = true,
@@ -253,8 +253,8 @@ class CupertinoSpinBox extends BaseSpinBox {
253253
/// See [CupertinoTextField.style].
254254
final TextStyle? textStyle;
255255

256-
/// See [CupertinoTextField.toolbarOptions].
257-
final ToolbarOptions? toolbarOptions;
256+
/// See [CupertinoTextField.contextMenuBuilder].
257+
final EditableTextContextMenuBuilder? contextMenuBuilder;
258258

259259
/// See [TextField.onSubmitted].
260260
///
@@ -281,7 +281,7 @@ class _CupertinoSpinBoxState extends State<CupertinoSpinBox> with SpinBoxMixin {
281281
textAlign: widget.textAlign,
282282
keyboardType: widget.keyboardType,
283283
textInputAction: widget.textInputAction,
284-
toolbarOptions: widget.toolbarOptions,
284+
contextMenuBuilder: widget.contextMenuBuilder,
285285
keyboardAppearance: widget.keyboardAppearance,
286286
inputFormatters: [formatter],
287287
prefix: Row(

lib/src/material/spin_box.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class SpinBox extends BaseSpinBox {
7676
this.textAlign = TextAlign.center,
7777
this.textDirection = TextDirection.ltr,
7878
this.textStyle,
79-
this.toolbarOptions,
79+
this.contextMenuBuilder,
8080
this.showCursor,
8181
this.cursorColor,
8282
this.enableInteractiveSelection = true,
@@ -261,8 +261,8 @@ class SpinBox extends BaseSpinBox {
261261
/// See [TextField.style].
262262
final TextStyle? textStyle;
263263

264-
/// See [TextField.toolbarOptions].
265-
final ToolbarOptions? toolbarOptions;
264+
/// See [TextField.contextMenuBuilder].
265+
final EditableTextContextMenuBuilder? contextMenuBuilder;
266266

267267
/// See [TextField.onSubmitted].
268268
///
@@ -348,7 +348,7 @@ class _SpinBoxState extends State<SpinBox> with SpinBoxMixin {
348348
final isHorizontal = widget.direction == Axis.horizontal;
349349

350350
if (isHorizontal) {
351-
final caption = theme.textTheme.caption;
351+
final caption = theme.textTheme.bodySmall;
352352
if (errorText != null) {
353353
bottom = _textHeight(errorText, caption!.merge(decoration.errorStyle));
354354
}
@@ -409,7 +409,7 @@ class _SpinBoxState extends State<SpinBox> with SpinBoxMixin {
409409
textDirection: widget.textDirection,
410410
keyboardType: widget.keyboardType,
411411
textInputAction: widget.textInputAction,
412-
toolbarOptions: widget.toolbarOptions,
412+
contextMenuBuilder: widget.contextMenuBuilder,
413413
keyboardAppearance: widget.keyboardAppearance,
414414
inputFormatters: [formatter],
415415
decoration: inputDecoration,

0 commit comments

Comments
 (0)