Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/flet/lib/src/controls/button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class _ButtonControlState extends State<ButtonControl> with FletStoreMixin {
var theme = Theme.of(context);

var style = parseButtonStyle(
widget.control.internals?["style"],
widget.control.internals?["style"] ?? widget.control.get("style"),
theme,
defaultForegroundColor:
widget.control.getColor("color", context, theme.colorScheme.primary)!,
Expand Down
5 changes: 5 additions & 0 deletions packages/flet/lib/src/controls/dropdown.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import '../utils/buttons.dart';
import '../utils/colors.dart';
import '../utils/edge_insets.dart';
import '../utils/form_field.dart';
import '../utils/layout.dart';
import '../utils/menu.dart';
import '../utils/numbers.dart';
import '../utils/text.dart';
Expand Down Expand Up @@ -270,6 +271,9 @@ class _DropdownControlState extends State<DropdownControl> {

_focusNode.canRequestFocus = editable;

int expand = widget.control.getExpand("expand", 0)!;
EdgeInsets? expandedInsets = expand > 0 ? EdgeInsets.zero : null;

Widget dropDown = DropdownMenu<String>(
enabled: !widget.control.disabled,
focusNode: _focusNode,
Expand All @@ -291,6 +295,7 @@ class _DropdownControlState extends State<DropdownControl> {
hintText: widget.control.getString("hint_text"),
helperText: widget.control.getString("helper_text"),
menuStyle: menuStyle,
expandedInsets: expandedInsets,
inputDecorationTheme: inputDecorationTheme,
inputFormatters: inputFormatters.isEmpty ? null : inputFormatters,
onSelected: widget.control.disabled
Expand Down
Loading