Skip to content

Commit 52b066d

Browse files
Myo Min Heinrayliverified
authored andcommitted
Stateful Widget state losing issue fix.
1 parent 30d58df commit 52b066d

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

lib/responsive_row_column.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ enum ResponsiveRowColumnType {
88
COLUMN,
99
}
1010

11-
/// A convenience wrapper for responsive [Row] and
12-
/// [Column] switching with padding and spacing.
11+
/// A convenience wrapper that use [Flex] for responsive horizontal and
12+
/// vertical layout switching with padding and spacing.
1313
///
1414
/// ResponsiveRowColumn combines responsiveness
1515
/// behaviors for managing rows and columns into one
@@ -72,7 +72,8 @@ class ResponsiveRowColumn extends StatelessWidget {
7272
if (layout == ResponsiveRowColumnType.ROW) {
7373
return Padding(
7474
padding: rowPadding,
75-
child: Row(
75+
child: Flex(
76+
direction: Axis.horizontal,
7677
mainAxisAlignment: rowMainAxisAlignment,
7778
mainAxisSize: rowMainAxisSize,
7879
crossAxisAlignment: rowCrossAxisAlignment,
@@ -88,7 +89,8 @@ class ResponsiveRowColumn extends StatelessWidget {
8889

8990
return Padding(
9091
padding: columnPadding,
91-
child: Column(
92+
child: Flex(
93+
direction: Axis.vertical,
9294
mainAxisAlignment: columnMainAxisAlignment,
9395
mainAxisSize: columnMainAxisSize,
9496
crossAxisAlignment: columnCrossAxisAlignment,

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: responsive_framework
22
description: Easily make Flutter apps responsive. Automatically adapt UI to different screen sizes. Responsiveness made simple.
3-
version: 1.1.1
3+
version: 1.1.2
44
homepage: https://codelessly.com
55
repository: https://github.com/Codelessly/ResponsiveFramework
66
documentation: https://github.com/Codelessly/ResponsiveFramework

0 commit comments

Comments
 (0)