|
|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
import 'package:driverapp/config/size_config.dart';
|
|
|
|
|
import 'package:driverapp/core/enum/viewstate.dart';
|
|
|
|
|
import 'package:driverapp/core/viewModels/orders_view_model.dart';
|
|
|
|
|
import 'package:driverapp/pages/base/base_view.dart';
|
|
|
|
|
@ -20,7 +21,9 @@ class CustomDialog extends StatelessWidget {
|
|
|
|
|
return BaseView<OrdersViewModel>(
|
|
|
|
|
builder: (_, model, w) => Center(
|
|
|
|
|
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,
|
|
|
|
|
child: Dialog(
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
@ -50,7 +53,7 @@ class CustomDialog extends StatelessWidget {
|
|
|
|
|
height: 40,
|
|
|
|
|
),
|
|
|
|
|
FractionallySizedBox(
|
|
|
|
|
widthFactor: 0.8,
|
|
|
|
|
widthFactor: SizeConfig.isPortrait ? 0.9 : 0.8,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
@ -64,28 +67,35 @@ class CustomDialog extends StatelessWidget {
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
SecondaryButton(
|
|
|
|
|
label: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.confirm,
|
|
|
|
|
loading: model.state == ViewState.BusyLocal,
|
|
|
|
|
onTap: () {
|
|
|
|
|
model.setState(ViewState.BusyLocal);
|
|
|
|
|
callService();
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
SecondaryButton(
|
|
|
|
|
label: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.canceled,
|
|
|
|
|
onTap: () {
|
|
|
|
|
model.hideBottomSheet();
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
},
|
|
|
|
|
FractionallySizedBox(
|
|
|
|
|
widthFactor: 0.9,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
SecondaryButton(
|
|
|
|
|
label: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.confirm,
|
|
|
|
|
loading: model.state == ViewState.BusyLocal,
|
|
|
|
|
onTap: () {
|
|
|
|
|
model.setState(ViewState.BusyLocal);
|
|
|
|
|
callService();
|
|
|
|
|
},
|
|
|
|
|
), SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
SecondaryButton(
|
|
|
|
|
label: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.canceled,
|
|
|
|
|
onTap: () {
|
|
|
|
|
model.hideBottomSheet();
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
|