feat :
bottom sheet markerDetails
This commit is contained in:
@@ -126,11 +126,19 @@ class SupervisionFilterLogic extends GetxController
|
||||
sheetController.value =
|
||||
DraggableBottomSheetController(
|
||||
initialVisibility: true,
|
||||
initialHeight: 300,
|
||||
initialHeight: 250,
|
||||
minHeight: 50,
|
||||
maxHeight: 300,
|
||||
);
|
||||
|
||||
}else if(data == BottomSheetStep.markerDetails){
|
||||
sheetController.value =
|
||||
DraggableBottomSheetController(
|
||||
initialVisibility: true,
|
||||
initialHeight: 500,
|
||||
minHeight: 50,
|
||||
maxHeight: 700,
|
||||
);
|
||||
}
|
||||
sheetController.refresh();
|
||||
sheetController.value.toggle();
|
||||
|
||||
@@ -88,19 +88,19 @@ class SupervisionFilterPage extends GetView<SupervisionFilterLogic> {
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: ObxValue((data) {
|
||||
fLog(data);
|
||||
|
||||
return DraggableBottomSheet(
|
||||
controller: data.value,
|
||||
backgroundColor: controller.bottomSheetStep.value == BottomSheetStep.filter ? Colors.white : AppColor.lightGreyLight ,
|
||||
child: ObxValue((data) {
|
||||
if (data.value == BottomSheetStep.filter) {
|
||||
return filterWidget();
|
||||
} else if (data.value == BottomSheetStep.markerSelected) {
|
||||
return selectedLocationWidget();
|
||||
} else if (data.value == BottomSheetStep.markerDetails) {
|
||||
return markerDetailsWidget();
|
||||
} else {
|
||||
return const SizedBox(
|
||||
height: 150,
|
||||
child: Center(child: Text('Marker Selected')),
|
||||
);
|
||||
return Container(height: 300, color: AppColor.blueNormal);
|
||||
}
|
||||
}, controller.bottomSheetStep),
|
||||
);
|
||||
@@ -130,7 +130,6 @@ class SupervisionFilterPage extends GetView<SupervisionFilterLogic> {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 30, vertical: 20),
|
||||
child: Slidable(
|
||||
key: Key('item'),
|
||||
|
||||
endActionPane: ActionPane(
|
||||
motion: StretchMotion(),
|
||||
children: [
|
||||
@@ -163,10 +162,16 @@ class SupervisionFilterPage extends GetView<SupervisionFilterLogic> {
|
||||
),
|
||||
],
|
||||
),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
controller.bottomSheetStep.value = BottomSheetStep.markerDetails;
|
||||
if (!controller.sheetController.value.isVisible.value) {
|
||||
controller.sheetController.value.show();
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
height: 58,
|
||||
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 15),
|
||||
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
@@ -212,6 +217,7 @@ class SupervisionFilterPage extends GetView<SupervisionFilterLogic> {
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -394,6 +400,154 @@ class SupervisionFilterPage extends GetView<SupervisionFilterLogic> {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget markerDetailsWidget() {
|
||||
return Container(
|
||||
clipBehavior: Clip.antiAlias,
|
||||
margin: EdgeInsets.all(35),
|
||||
padding: EdgeInsets.symmetric(horizontal: 20,vertical: 10),
|
||||
decoration: ShapeDecoration(
|
||||
color: Colors.white,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
||||
),
|
||||
child: Column(
|
||||
spacing: 15,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'داود خرم پور',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan16.copyWith(
|
||||
color: AppColor.darkGreyDarkHover,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
height: 32,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 4),
|
||||
decoration: ShapeDecoration(
|
||||
color: AppColor.blueLight,
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(width: 1, color: AppColor.blueLightHover),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'باقی مانده',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan14.copyWith(
|
||||
color: AppColor.darkGreyDarkHover,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'0 کیلوگرم',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan14.copyWith(
|
||||
color: AppColor.darkGreyDarkHover,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'شماره همراه',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan14.copyWith(
|
||||
color: AppColor.darkGreyDarkHover,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'0326598653',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan14.copyWith(
|
||||
color: AppColor.darkGreyDarkHover,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
|
||||
children: [
|
||||
Text(
|
||||
'آخرین فعالیت',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan14.copyWith(
|
||||
color: AppColor.darkGreyDarkHover,
|
||||
),
|
||||
),
|
||||
|
||||
Text(
|
||||
'1409/12/12',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan14.copyWith(
|
||||
color: AppColor.darkGreyDarkHover,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
|
||||
children: [
|
||||
Text(
|
||||
'موجودی',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan14.copyWith(
|
||||
color: AppColor.darkGreyDarkHover,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'5کیلوگرم',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan14.copyWith(
|
||||
color: AppColor.darkGreyDarkHover,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
...List.generate(
|
||||
5,
|
||||
(index) => Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
|
||||
children: [
|
||||
Text(
|
||||
'فروش رفته',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan14.copyWith(
|
||||
color: AppColor.darkGreyDarkHover,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'0 کیلوگرم',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan14.copyWith(
|
||||
color: AppColor.darkGreyDarkHover,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Widget customChip({
|
||||
|
||||
@@ -11,11 +11,13 @@ class DraggableBottomSheet extends StatelessWidget {
|
||||
final double minHeight;
|
||||
final double maxHeight;
|
||||
final Widget? child;
|
||||
final Color? backgroundColor;
|
||||
|
||||
const DraggableBottomSheet({
|
||||
super.key,
|
||||
this.controller,
|
||||
this.isVisible = false,
|
||||
this.backgroundColor = Colors.white,
|
||||
this.initialHeight = 200,
|
||||
this.minHeight = 0,
|
||||
this.maxHeight = 700,
|
||||
@@ -56,8 +58,8 @@ class DraggableBottomSheet extends StatelessWidget {
|
||||
},
|
||||
child: Container(
|
||||
height: data.value,
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
decoration: BoxDecoration(
|
||||
color: backgroundColor,
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(50)),
|
||||
),
|
||||
child: Column(
|
||||
|
||||
Reference in New Issue
Block a user