From ea8da05f25492ef49c1550b87b06a319bfe58f62 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Fri, 1 Sep 2017 22:01:17 -0700 Subject: [PATCH] Add RTL support to Stepper (#11873) Fixes #11379 --- packages/flutter/lib/src/material/stepper.dart | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/packages/flutter/lib/src/material/stepper.dart b/packages/flutter/lib/src/material/stepper.dart index e83c47e914..8a0c229660 100644 --- a/packages/flutter/lib/src/material/stepper.dart +++ b/packages/flutter/lib/src/material/stepper.dart @@ -354,7 +354,7 @@ class _StepperState extends State with TickerProviderStateMixin { child: const Text('CONTINUE'), ), new Container( - margin: const EdgeInsets.only(left: 8.0), + margin: const EdgeInsetsDirectional.only(start: 8.0), child: new FlatButton( onPressed: widget.onStepCancel, textColor: cancelColor, @@ -457,9 +457,7 @@ class _StepperState extends State with TickerProviderStateMixin { ] ), new Container( - margin: const EdgeInsets.only( - left: 12.0 - ), + margin: const EdgeInsetsDirectional.only(start: 12.0), child: _buildHeaderText(index) ) ] @@ -470,8 +468,8 @@ class _StepperState extends State with TickerProviderStateMixin { Widget _buildVerticalBody(int index) { return new Stack( children: [ - new Positioned( - left: 24.0, + new PositionedDirectional( + start: 24.0, top: 0.0, bottom: 0.0, child: new SizedBox( @@ -489,9 +487,9 @@ class _StepperState extends State with TickerProviderStateMixin { new AnimatedCrossFade( firstChild: new Container(height: 0.0), secondChild: new Container( - margin: const EdgeInsets.only( - left: 60.0, - right: 24.0, + margin: const EdgeInsetsDirectional.only( + start: 60.0, + end: 24.0, bottom: 24.0, ), child: new Column( @@ -565,7 +563,7 @@ class _StepperState extends State with TickerProviderStateMixin { ), ), new Container( - margin: const EdgeInsets.only(left: 12.0), + margin: const EdgeInsetsDirectional.only(start: 12.0), child: _buildHeaderText(i), ), ],