Fix landscape issues

setting_page
Elham Rababah 6 years ago
parent 43d4002abc
commit 1ae437507a

File diff suppressed because one or more lines are too long

@ -1,3 +1,4 @@
import 'package:driverapp/config/size_config.dart';
import 'package:driverapp/core/enum/viewstate.dart'; import 'package:driverapp/core/enum/viewstate.dart';
import 'package:driverapp/core/viewModels/orders_view_model.dart'; import 'package:driverapp/core/viewModels/orders_view_model.dart';
import 'package:driverapp/pages/base/base_view.dart'; import 'package:driverapp/pages/base/base_view.dart';
@ -20,7 +21,9 @@ class CustomDialog extends StatelessWidget {
return BaseView<OrdersViewModel>( return BaseView<OrdersViewModel>(
builder: (_, model, w) => Center( builder: (_, model, w) => Center(
child: Container( child: Container(
height: MediaQuery.of(context).size.height * 0.50, height: SizeConfig.isPortrait
? MediaQuery.of(context).size.height * 0.43
: MediaQuery.of(context).size.height * 0.90,
width: MediaQuery.of(context).size.width * 0.95, width: MediaQuery.of(context).size.width * 0.95,
child: Dialog( child: Dialog(
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
@ -50,7 +53,7 @@ class CustomDialog extends StatelessWidget {
height: 40, height: 40,
), ),
FractionallySizedBox( FractionallySizedBox(
widthFactor: 0.8, widthFactor: SizeConfig.isPortrait ? 0.9 : 0.8,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[ children: <Widget>[
@ -64,6 +67,10 @@ class CustomDialog extends StatelessWidget {
SizedBox( SizedBox(
height: 10, height: 10,
), ),
FractionallySizedBox(
widthFactor: 0.9,
child: Column(
children: <Widget>[
SecondaryButton( SecondaryButton(
label: TranslationBase label: TranslationBase
.of(context) .of(context)
@ -73,8 +80,7 @@ class CustomDialog extends StatelessWidget {
model.setState(ViewState.BusyLocal); model.setState(ViewState.BusyLocal);
callService(); callService();
}, },
), ), SizedBox(
SizedBox(
height: 10, height: 10,
), ),
SecondaryButton( SecondaryButton(
@ -88,6 +94,10 @@ class CustomDialog extends StatelessWidget {
), ),
], ],
), ),
),
],
),
) )
], ],
), ),

Loading…
Cancel
Save