-
Notifications
You must be signed in to change notification settings - Fork 139
Open
Labels
enhancementNew feature or requestNew feature or requestguidanceQuestion that needs advice or information.Question that needs advice or information.
Description
Is there a parameter that I am missing to make the content align with the label while still having a left padding?
The content padding seems to have a much larger impact on the content than on the label right now.
dropdown_button2 version: 2.3.7
My code:
DropdownButtonFormField2(
value: "content1",
autovalidateMode: AutovalidateMode.always,
validator: (value) => value == null ? "Please select something" : null,
isExpanded: false,
isDense: true,
buttonStyleData: ButtonStyleData(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
),
),
dropdownStyleData: DropdownStyleData(
padding: EdgeInsets.only(left: 0, right: 0, top: 0, bottom: 0),
//openInterval: Interval(0, 1), //timing of the dropdown open animation
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
),
),
// menuItemStyleData: MenuItemStyleData(
// padding: EdgeInsets.only(left: 10, right: 10, top: 0, bottom: 0),
// ),
decoration: InputDecoration(
floatingLabelAlignment: FloatingLabelAlignment.start,
floatingLabelBehavior: FloatingLabelBehavior.always,
alignLabelWithHint: false,
isDense: true,
contentPadding: const EdgeInsets.only(
left: 10, right: 0, top: 14, bottom: 14), //padding of label and content
labelText: "I am a label",
border: OutlineInputBorder(borderRadius: BorderRadius.circular(10.0)),
),
items:
["content1", "content2"].map((e) => DropdownMenuItem(value: e, child: Text(e))).toList()),
adnan-nazir
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestguidanceQuestion that needs advice or information.Question that needs advice or information.