Closed fernando-s97 closed 4 years ago
As per my debug, the ScrollPicker class constructor should be
ScrollPicker({
Key key,
@required this.items,
@required this.initialValue,
@required this.onChanged,
**bool showDivider,**
}) : assert(items != null),
**showDivider = showDivider ?? true,**
super(key: key);
instead of
ScrollPicker({
Key key,
@required this.items,
@required this.initialValue,
@required this.onChanged,
this.showDivider: true,
}) : assert(items != null),
super(key: key);
Fixed in 1.7.4
With the following code
I'm receiving the following exception:
═══════════════════════════════════════════════════════ The following assertion was thrown building LayoutBuilder: Failed assertion: boolean expression must not be null
The relevant error-causing widget was: MaterialApp file:..../lib/presentation/core/app_widget.dart:61:14 When the exception was thrown, this was the stack:
0 _ScrollPickerState.build. (package:flutter_material_pickers/pickers/scroll_picker.dart:92:34)
1 _LayoutBuilderElement._layout. (package:flutter/src/widgets/layout_builder.dart:121:33)
2 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2620:19)
3 _LayoutBuilderElement._layout (package:flutter/src/widgets/layout_builder.dart:117:11)
4 RenderObject.invokeLayoutCallback. (package:flutter/src/rendering/object.dart:1868:58)
... ═══════════════════════════════════════════════════════
I need to manually set
showDivider
to eithertrue
orfalse
. The defaulttrue
value isn't workingOBS: version 1.7.3