Simplify layout
This commit is contained in:
parent
253c6b2075
commit
863afcae4f
@ -77,6 +77,7 @@ class _WonderEventsState extends State<WonderEvents> {
|
|||||||
|
|
||||||
/// Landscape layout is a row, with the WonderImage on left and EventsList on the right
|
/// Landscape layout is a row, with the WonderImage on left and EventsList on the right
|
||||||
Widget _buildTwoColumn(BuildContext context) {
|
Widget _buildTwoColumn(BuildContext context) {
|
||||||
|
final double timelineImageSize = (context.heightPx - 350).clamp(200, 500);
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsets.all($styles.insets.lg),
|
padding: EdgeInsets.all($styles.insets.lg),
|
||||||
child: Row(
|
child: Row(
|
||||||
@ -85,25 +86,16 @@ class _WonderEventsState extends State<WonderEvents> {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: CenteredBox(
|
child: CenteredBox(
|
||||||
width: $styles.sizes.maxContentWidth3,
|
width: $styles.sizes.maxContentWidth3,
|
||||||
child: Column(
|
child: Padding(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
padding: EdgeInsets.symmetric(vertical: $styles.insets.lg),
|
||||||
mainAxisSize: MainAxisSize.min,
|
child: Column(
|
||||||
children: [
|
mainAxisSize: MainAxisSize.min,
|
||||||
Gap($styles.insets.lg),
|
children: [
|
||||||
Expanded(
|
_WonderImageWithTimeline(data: _data, height: timelineImageSize),
|
||||||
child: Center(
|
Gap($styles.insets.lg),
|
||||||
child: Column(
|
SizedBox(width: 400, child: _TimelineBtn(type: widget.type)),
|
||||||
mainAxisSize: MainAxisSize.min,
|
],
|
||||||
children: [
|
),
|
||||||
_WonderImageWithTimeline(data: _data, height: min(500, context.heightPx - 300)),
|
|
||||||
Gap($styles.insets.lg),
|
|
||||||
SizedBox(width: 400, child: _TimelineBtn(type: widget.type)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Gap($styles.insets.lg),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user