From 2bc2fb4770d0956c9ebcfdca9063e5d4ac40d8a1 Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Thu, 26 Nov 2020 13:08:35 +0200 Subject: [PATCH] ES-185:fix showModalBottomSheet height --- lib/pages/delivery/information_page.dart | 193 ++++++++++++----------- lib/widgets/order/order_info_card.dart | 1 - 2 files changed, 97 insertions(+), 97 deletions(-) diff --git a/lib/pages/delivery/information_page.dart b/lib/pages/delivery/information_page.dart index 7046e15..6e6814e 100644 --- a/lib/pages/delivery/information_page.dart +++ b/lib/pages/delivery/information_page.dart @@ -41,110 +41,111 @@ class InformationPage extends StatelessWidget { topRight: Radius.circular(50.0), ), ), + isScrollControlled: true, context: context, builder: (BuildContext bc) { - return ListView( - children: [ - Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(50.0), - topRight: Radius.circular(50.0), - ), - ), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - SizedBox( - height: 10, + return FractionallySizedBox( + heightFactor: 0.35, + child: ListView( + children: [ + Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(50.0), + topRight: Radius.circular(50.0), ), - Center( - child: Texts( - TranslationBase.of(context).selectAction, - color: Colors.black, - fontSize: 22, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox( + height: 10, ), - ), - SizedBox( - height: 10, - ), - FractionallySizedBox( - widthFactor: MediaQuery.of(context).orientation == - Orientation.portrait - ? 0.9 - : 0.98, - child: Container( - height: MediaQuery.of(context).size.height * 0.45, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(50.0), - topRight: Radius.circular(50.0), - ), + Center( + child: Texts( + TranslationBase.of(context).selectAction, + color: Colors.black, + fontSize: 22, ), - width: double.infinity, - child: ListView( - children: [ - Column( - children: [ - SizedBox( - height: 3, - child: Container( - color: Hexcolor("#D5D5D5"), - ), - ), - SizedBox( - height: 15, - ), - ActionSheetButton( - label: - TranslationBase - .of(context) - .delivered, - icon: DriverApp.deliverd_icon, - onTap: () { - selectAction(context, 2, model); - }, - ), - SizedBox(height: 15), - // ActionSheetButton( - // label: TranslationBase.of(context) - // .deliveredAccepted, - // icon: DriverApp.not_available, - // onTap: () { - // selectAction(context, 4, model); - // }, - // ), - // SizedBox(height: 15), - ActionSheetButton( - label: TranslationBase - .of(context) - .deliveredRejected, - icon: DriverApp.rejected_icon, - onTap: () { - selectAction(context, 3, model); - }, - ), - SizedBox(height: 15), - // ActionSheetButton( - // label: TranslationBase.of(context).canceled, - // icon: DriverApp.not_reachable_icon, - // onTap: () { - // selectAction(context, 6, model); - // }, - // ), - // SizedBox(height: 15), - ], + ), + SizedBox( + height: 10, + ), + FractionallySizedBox( + widthFactor: MediaQuery.of(context).orientation == + Orientation.portrait + ? 0.9 + : 0.98, + child: Container( + height: MediaQuery.of(context).size.height * 0.45, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(50.0), + topRight: Radius.circular(50.0), ), - ], + ), + width: double.infinity, + child: ListView( + children: [ + Column( + children: [ + SizedBox( + height: 3, + child: Container( + color: Hexcolor("#D5D5D5"), + ), + ), + SizedBox( + height: 15, + ), + ActionSheetButton( + label: + TranslationBase.of(context).delivered, + icon: DriverApp.deliverd_icon, + onTap: () { + selectAction(context, 2, model); + }, + ), + SizedBox(height: 15), + // ActionSheetButton( + // label: TranslationBase.of(context) + // .deliveredAccepted, + // icon: DriverApp.not_available, + // onTap: () { + // selectAction(context, 4, model); + // }, + // ), + // SizedBox(height: 15), + ActionSheetButton( + label: TranslationBase.of(context) + .deliveredRejected, + icon: DriverApp.rejected_icon, + onTap: () { + selectAction(context, 3, model); + }, + ), + SizedBox(height: 15), + // ActionSheetButton( + // label: TranslationBase.of(context).canceled, + // icon: DriverApp.not_reachable_icon, + // onTap: () { + // selectAction(context, 6, model); + // }, + // ), + // SizedBox(height: 15), + ], + ), + ], + ), ), - ), - ) - ], + ) + ], + ), ), - ), - ], + ], + ), ); }); } diff --git a/lib/widgets/order/order_info_card.dart b/lib/widgets/order/order_info_card.dart index 51abee1..60ac673 100644 --- a/lib/widgets/order/order_info_card.dart +++ b/lib/widgets/order/order_info_card.dart @@ -119,7 +119,6 @@ class OrderInfoCard extends StatelessWidget { Container( margin: EdgeInsets.only(bottom: 12, left: 10), child: RoundedContainer( - // margin: EdgeInsets.only(bottom: 8, left: 20), margin: 4, showShadow: false, backgroundColor: