Skip to content

Commit

Permalink
Make language selection in main menu scrollable
Browse files Browse the repository at this point in the history
Fix main menu overflow error when too many languages are downloaded.
However the UI is not very ideal and should be improved in the future.
  • Loading branch information
holybiber committed Oct 27, 2023
1 parent 9a45efb commit 227b606
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions lib/widgets/upward_expansion_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -492,21 +492,24 @@ class _UpwardExpansionTileState extends State<UpwardExpansionTile>
final bool shouldRemoveChildren = closed && !widget.maintainState;

final Widget result = Offstage(
offstage: closed,
child: TickerMode(
enabled: !closed,
child: Padding(
padding: widget.childrenPadding ??
expansionTileTheme.childrenPadding ??
EdgeInsets.zero,
child: Column(
crossAxisAlignment:
widget.expandedCrossAxisAlignment ?? CrossAxisAlignment.center,
children: widget.children,
),
),
),
);
offstage: closed,
child: TickerMode(
enabled: !closed,
child: Padding(
padding: widget.childrenPadding ??
expansionTileTheme.childrenPadding ??
EdgeInsets.zero,
child: SingleChildScrollView(
child: ConstrainedBox(
constraints: const BoxConstraints(
maxHeight: 400,
),
child: ListView(
children: widget.children,
),
),
),
)));

return AnimatedBuilder(
animation: _controller.view,
Expand Down

0 comments on commit 227b606

Please sign in to comment.