fix : onTap marker
This commit is contained in:
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -16,7 +16,7 @@ class Assets {
|
||||
static const String iconsMessageAdd = 'assets/icons/message_add.svg';
|
||||
static const String iconsProfileCircle = 'assets/icons/profile_circle.svg';
|
||||
static const String iconsScan = 'assets/icons/scan.svg';
|
||||
static const String iconsSecurityTime = 'assets/icons/security-time.svg';
|
||||
static const String iconsSecurityTime = 'assets/icons/security_time.svg';
|
||||
static const String iconsSetting = 'assets/icons/setting.svg';
|
||||
static const String iconsTrash = 'assets/icons/trash.svg';
|
||||
static const String imagesInnerSplash = 'assets/images/inner_splash.webp';
|
||||
@@ -35,7 +35,7 @@ class Assets {
|
||||
static const String vecMessageAddSvg = 'assets/vec/message_add.svg.vec';
|
||||
static const String vecProfileCircleSvg = 'assets/vec/profile_circle.svg.vec';
|
||||
static const String vecScanSvg = 'assets/vec/scan.svg.vec';
|
||||
static const String vecSecurityTimeSvg = 'assets/vec/security-time.svg.vec';
|
||||
static const String vecSecurityTimeSvg = 'assets/vec/security_time.svg.vec';
|
||||
static const String vecSettingSvg = 'assets/vec/setting.svg.vec';
|
||||
static const String vecTrashSvg = 'assets/vec/trash.svg.vec';
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:latlong2/latlong.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
import 'package:rasadyar_core/data/utils.dart';
|
||||
import 'package:rasadyar_core/presentation/widget/buttons/fab.dart';
|
||||
import 'package:supervision/presentation/routes/app_routes.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
@@ -83,15 +84,13 @@ class SupervisionFilterPage extends GetView<SupervisionFilterLogic> {
|
||||
},
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: ObxValue((data) {
|
||||
|
||||
ObxValue((data) {
|
||||
return DraggableBottomSheet(
|
||||
controller: data.value,
|
||||
backgroundColor: controller.bottomSheetStep.value == BottomSheetStep.filter ? Colors.white : AppColor.lightGreyLight ,
|
||||
backgroundColor:
|
||||
controller.bottomSheetStep.value == BottomSheetStep.filter
|
||||
? Colors.white
|
||||
: AppColor.lightGreyLight,
|
||||
child: ObxValue((data) {
|
||||
if (data.value == BottomSheetStep.filter) {
|
||||
return filterWidget();
|
||||
@@ -105,7 +104,6 @@ class SupervisionFilterPage extends GetView<SupervisionFilterLogic> {
|
||||
}, controller.bottomSheetStep),
|
||||
);
|
||||
}, controller.sheetController),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
@@ -113,14 +111,20 @@ class SupervisionFilterPage extends GetView<SupervisionFilterLogic> {
|
||||
Marker markerWidget(LatLng marker) {
|
||||
return Marker(
|
||||
point: marker,
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
controller.bottomSheetStep.value = BottomSheetStep.markerSelected;
|
||||
if (!controller.sheetController.value.isVisible.value) {
|
||||
controller.sheetController.value.show();
|
||||
}
|
||||
},
|
||||
icon: Icon(Icons.location_on, color: Colors.red, size: 30),
|
||||
behavior: HitTestBehavior.opaque,
|
||||
child: SizedBox(
|
||||
width: 36,
|
||||
height: 36,
|
||||
child: Icon(Icons.location_on, color: Colors.red, size: 30),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -134,7 +138,9 @@ class SupervisionFilterPage extends GetView<SupervisionFilterLogic> {
|
||||
motion: StretchMotion(),
|
||||
children: [
|
||||
CustomSlidableAction(
|
||||
onPressed: (context) {},
|
||||
onPressed: (context) {
|
||||
Get.toNamed(SupervisionRoutes.supervisionLocationDetails);
|
||||
},
|
||||
backgroundColor: AppColor.blueNormal,
|
||||
foregroundColor: Colors.white,
|
||||
padding: EdgeInsets.all(16),
|
||||
@@ -405,7 +411,7 @@ class SupervisionFilterPage extends GetView<SupervisionFilterLogic> {
|
||||
return Container(
|
||||
clipBehavior: Clip.antiAlias,
|
||||
margin: EdgeInsets.all(35),
|
||||
padding: EdgeInsets.symmetric(horizontal: 20,vertical: 10),
|
||||
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10),
|
||||
decoration: ShapeDecoration(
|
||||
color: Colors.white,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
||||
@@ -414,7 +420,8 @@ class SupervisionFilterPage extends GetView<SupervisionFilterLogic> {
|
||||
spacing: 15,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
spacing: 12,
|
||||
children: [
|
||||
Text(
|
||||
'داود خرم پور',
|
||||
@@ -423,6 +430,32 @@ class SupervisionFilterPage extends GetView<SupervisionFilterLogic> {
|
||||
color: AppColor.darkGreyDarkHover,
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
vecWidgetWithOnTap(
|
||||
assets: Assets.vecMapSvg,
|
||||
onTap: () {
|
||||
eLog('vecWidgetWithOnTap ==> Assets.vecMapSvg');
|
||||
Get.toNamed(SupervisionRoutes.supervisionLocationDetails);
|
||||
},
|
||||
width: 24,
|
||||
height: 24,
|
||||
color: AppColor.blueNormal,
|
||||
),
|
||||
vecWidgetWithOnTap(
|
||||
assets: Assets.vecMessageAddSvg,
|
||||
width: 24,
|
||||
height: 24,
|
||||
color: AppColor.greenNormal,
|
||||
onTap: () {},
|
||||
),
|
||||
|
||||
vecWidgetWithOnTap(
|
||||
assets: Assets.vecSecurityTimeSvg,
|
||||
color: AppColor.warning,
|
||||
height: 24,
|
||||
width: 24,
|
||||
onTap: () {},
|
||||
),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
import 'package:supervision/presentation/filter/logic.dart';
|
||||
import 'package:supervision/presentation/location_details/logic.dart';
|
||||
import 'package:supervision/presentation/location_details/view.dart';
|
||||
import 'package:supervision/presentation/root/logic.dart';
|
||||
import 'package:supervision/presentation/root/view.dart';
|
||||
import 'package:supervision/presentation/routes/app_routes.dart';
|
||||
@@ -16,5 +18,19 @@ sealed class SupervisionPages {
|
||||
BindingsBuilder.put(() => SupervisionFilterLogic()),
|
||||
],
|
||||
),
|
||||
GetPage(
|
||||
name: SupervisionRoutes.supervision,
|
||||
page: () => RootPage(),
|
||||
bindings: [
|
||||
BindingsBuilder.put(() => RootLogic()),
|
||||
BindingsBuilder.put(() => SupervisionFilterLogic()),
|
||||
],
|
||||
),
|
||||
|
||||
GetPage(
|
||||
name: SupervisionRoutes.supervisionLocationDetails,
|
||||
page: () => LocationDetailsPage(),
|
||||
bindings: [BindingsBuilder.put(() => LocationDetailsLogic())],
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -4,4 +4,5 @@ sealed class SupervisionRoutes {
|
||||
static const supervision = '/supervision';
|
||||
static const supervisionAction = '/supervision/action';
|
||||
static const supervisionUserSetting = '/supervision/userSettings';
|
||||
static const supervisionLocationDetails= '/supervision/locationDetails';
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ class Assets {
|
||||
static const String iconsProfileCircle = 'assets/icons/profile_circle.svg';
|
||||
static const String iconsScan = 'assets/icons/scan.svg';
|
||||
static const String iconsScanBarcode = 'assets/icons/scan_barcode.svg';
|
||||
static const String iconsSecurityTime = 'assets/icons/security-time.svg';
|
||||
static const String iconsSecurityTime = 'assets/icons/security_time.svg';
|
||||
static const String iconsSetting = 'assets/icons/setting.svg';
|
||||
static const String iconsTrash = 'assets/icons/trash.svg';
|
||||
static const String imagesInnerSplash = 'assets/images/inner_splash.webp';
|
||||
@@ -37,7 +37,7 @@ class Assets {
|
||||
static const String vecProfileCircleSvg = 'assets/vec/profile_circle.svg.vec';
|
||||
static const String vecScanBarcodeSvg = 'assets/vec/scan_barcode.svg.vec';
|
||||
static const String vecScanSvg = 'assets/vec/scan.svg.vec';
|
||||
static const String vecSecurityTimeSvg = 'assets/vec/security-time.svg.vec';
|
||||
static const String vecSecurityTimeSvg = 'assets/vec/security_time.svg.vec';
|
||||
static const String vecSettingSvg = 'assets/vec/setting.svg.vec';
|
||||
static const String vecTrashSvg = 'assets/vec/trash.svg.vec';
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class Assets {
|
||||
static const String iconsProfileCircle = 'assets/icons/profile_circle.svg';
|
||||
static const String iconsScan = 'assets/icons/scan.svg';
|
||||
static const String iconsScanBarcode = 'assets/icons/scan_barcode.svg';
|
||||
static const String iconsSecurityTime = 'assets/icons/security-time.svg';
|
||||
static const String iconsSecurityTime = 'assets/icons/security_time.svg';
|
||||
static const String iconsSetting = 'assets/icons/setting.svg';
|
||||
static const String iconsTrash = 'assets/icons/trash.svg';
|
||||
static const String imagesInnerSplash = 'assets/images/inner_splash.webp';
|
||||
@@ -37,7 +37,7 @@ class Assets {
|
||||
static const String vecProfileCircleSvg = 'assets/vec/profile_circle.svg.vec';
|
||||
static const String vecScanBarcodeSvg = 'assets/vec/scan_barcode.svg.vec';
|
||||
static const String vecScanSvg = 'assets/vec/scan.svg.vec';
|
||||
static const String vecSecurityTimeSvg = 'assets/vec/security-time.svg.vec';
|
||||
static const String vecSecurityTimeSvg = 'assets/vec/security_time.svg.vec';
|
||||
static const String vecSettingSvg = 'assets/vec/setting.svg.vec';
|
||||
static const String vecTrashSvg = 'assets/vec/trash.svg.vec';
|
||||
|
||||
|
||||
@@ -19,13 +19,34 @@ SvgPicture vecWidget(
|
||||
);
|
||||
}
|
||||
|
||||
Widget vecWidgetWithOnTap({
|
||||
required String assets,
|
||||
required VoidCallback onTap,
|
||||
double? width,
|
||||
double? height,
|
||||
BoxFit? fit,
|
||||
Color? color,
|
||||
}) {
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
child: SvgPicture(
|
||||
AssetBytesLoader(assets),
|
||||
width: width,
|
||||
height: height,
|
||||
fit: fit ?? BoxFit.contain,
|
||||
colorFilter:
|
||||
color != null ? ColorFilter.mode(color, BlendMode.srcIn) : null,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
SvgPicture svgWidget(
|
||||
String assets, {
|
||||
double? width,
|
||||
double? height,
|
||||
BoxFit? fit,
|
||||
Color? color,
|
||||
}) {
|
||||
}) {
|
||||
return SvgPicture.asset(
|
||||
assets,
|
||||
width: width,
|
||||
@@ -36,14 +57,13 @@ SvgPicture svgWidget(
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Widget vecWidget2(
|
||||
String assets, {
|
||||
double? width,
|
||||
double? height,
|
||||
BoxFit? fit,
|
||||
Color? color,
|
||||
}) {
|
||||
}) {
|
||||
final resolvedColor = WidgetStateProperty.resolveWith<Color?>((states) {
|
||||
if (states.contains(WidgetState.pressed)) {
|
||||
return Colors.white;
|
||||
@@ -58,7 +78,8 @@ Widget vecWidget2(
|
||||
width: width,
|
||||
height: height,
|
||||
fit: fit ?? BoxFit.contain,
|
||||
colorFilter: resolvedColor != null
|
||||
colorFilter:
|
||||
resolvedColor != null
|
||||
? ColorFilter.mode(resolvedColor, BlendMode.srcIn)
|
||||
: null,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user