Skip to content

Commit cb2a1eb

Browse files
feat: improve docs
1 parent 2e69a96 commit cb2a1eb

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

lib/flutter_form_builder.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ export 'src/fields/form_builder_text_field.dart';
1919
export 'src/widgets/grouped_checkbox.dart';
2020
export 'src/widgets/grouped_radio.dart';
2121
export 'src/options/form_builder_chip_option.dart';
22+
export 'src/options/display_values_enum.dart';

lib/src/fields/form_builder_switch.dart

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,16 @@ class FormBuilderSwitch extends FormBuilderField<bool> {
6464
/// is used.
6565
final EdgeInsets contentPadding;
6666

67-
/// {@macro flutter.cupertino.switch.dragStartBehavior}
67+
/// Where to place the control in widgets that use [ListTile] to position a
68+
/// control next to a label.
69+
///
70+
/// See also:
71+
///
72+
/// * [CheckboxListTile], which combines a [ListTile] with a [Checkbox].
73+
/// * [RadioListTile], which combines a [ListTile] with a [Radio] button.
74+
/// * [SwitchListTile], which combines a [ListTile] with a [Switch].
75+
/// * [ExpansionTile], which combines a [ListTile] with a button that expands
76+
/// or collapses the tile to reveal or hide the children.
6877
final ListTileControlAffinity controlAffinity;
6978

7079
/// Whether to render icons and text in the [activeColor].
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/// Configuration to what values show on sliders
2+
///
3+
/// - `all`: Show all values
4+
/// - `current`: Show only the current value (middle)
5+
/// - `minMax`: Show only the min and max values (start and finish)
6+
/// - `none`: No show any values
7+
enum DisplayValues { all, current, minMax, none }

0 commit comments

Comments
 (0)