Skip to content

Commit

Permalink
Fix gap on flex extension
Browse files Browse the repository at this point in the history
  • Loading branch information
sunarya-thito committed Nov 1, 2024
1 parent 91cb6d8 commit f1b0077
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/src/util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,9 @@ class _SeparatedFlexState extends State<SeparatedFlex> {

extension FlexExtension on Flex {
Widget gap(double gap) {
return separator(SizedBox(width: gap));
return separator(direction == Axis.vertical
? SizedBox(height: gap)
: SizedBox(width: gap));
}

Widget separator(Widget separator) {
Expand Down

0 comments on commit f1b0077

Please sign in to comment.