From 6ef1ab06c917da0ddcb6eb51f4986a294a87b6cc Mon Sep 17 00:00:00 2001 From: "mr.mojtaba" Date: Mon, 5 May 2025 09:06:35 +0330 Subject: [PATCH] feat : BottomSheet manger and some changed in draggable bottom sheet --- .../lib/presentation/filter/logic.dart | 84 +- .../lib/presentation/filter/view.dart | 1104 ++++++++--------- .../lib/presentation/root/view.dart | 65 +- features/inspection/pubspec.lock | 52 +- .../bottom_sheet_manger.dart | 42 + .../draggable_bottom_sheet.dart | 125 +- .../draggable_bottom_sheet_controller.dart | 42 +- .../core/lib/presentation/widget/widget.dart | 1 + packages/core/pubspec.lock | 24 +- pubspec.lock | 20 +- 10 files changed, 804 insertions(+), 755 deletions(-) create mode 100644 packages/core/lib/presentation/widget/draggable_bottom_sheet/bottom_sheet_manger.dart diff --git a/features/inspection/lib/presentation/filter/logic.dart b/features/inspection/lib/presentation/filter/logic.dart index 949e609..921e045 100644 --- a/features/inspection/lib/presentation/filter/logic.dart +++ b/features/inspection/lib/presentation/filter/logic.dart @@ -1,12 +1,10 @@ import 'dart:async'; -import 'package:flutter/animation.dart'; import 'package:flutter/material.dart'; import 'package:inspection/data/utils/marker_generator.dart'; +import 'package:inspection/presentation/filter/view.dart'; import 'package:rasadyar_core/core.dart'; -enum BottomSheetStep { filter, markerSelected, markerDetails } - class InspectorFilterLogic extends GetxController with GetTickerProviderStateMixin { Rx currentLocation = LatLng(35.824891, 50.948025).obs; @@ -19,22 +17,22 @@ class InspectorFilterLogic extends GetxController RxInt showIndex = 0.obs; bool showSlideHint = true; - Rx bottomSheetStep = BottomSheetStep.filter.obs; late Rx slidController; Rx mapController = MapController().obs; late final AnimatedMapController animatedMapController; - late Rx sheetController; + late DraggableBottomSheetController filterBottomSheetController; + late DraggableBottomSheetController selectedLocationBottomSheetController; + late DraggableBottomSheetController detailsLocationBottomSheetController; + late final BottomSheetManager bottomSheetManager; Future determineCurrentPosition() async { - final position = await Geolocator.getCurrentPosition( locationSettings: AndroidSettings(accuracy: LocationAccuracy.best), ); final latLng = LatLng(position.latitude, position.longitude); - currentLocation.value = latLng; markers.add(latLng); animatedMapController.animateTo( @@ -77,7 +75,6 @@ class InspectorFilterLogic extends GetxController allMarkers.value = generatedMarkers; } - @override void onInit() { super.onInit(); @@ -87,53 +84,43 @@ class InspectorFilterLogic extends GetxController curve: Curves.easeInOut, cancelPreviousAnimations: true, ); - sheetController = - DraggableBottomSheetController( - initialVisibility: false, - initialHeight: 300, - minHeight: 70, - maxHeight: 600, - ).obs; + + filterBottomSheetController = DraggableBottomSheetController( + initialHeight: 350, + minHeight: 200, + maxHeight: Get.height * 0.5, + ); + + selectedLocationBottomSheetController = DraggableBottomSheetController( + initialHeight: 200, + minHeight: 100, + maxHeight: 200, + ); + detailsLocationBottomSheetController = DraggableBottomSheetController( + initialHeight: Get.height * 0.5, + minHeight: Get.height * 0.37, + maxHeight: Get.height * 0.5, + ); slidController = SlidableController(this).obs; - - /*bottomSheetStep.listen((data) { - tLog('1 bottomSheetStep -> ${data.nme}'); - if (data == BottomSheetStep.filter) { - sheetController.value = DraggableBottomSheetController( - initialVisibility: true, - initialHeight: 300, - minHeight: 70, - maxHeight: 600, - ); - } else if (data == BottomSheetStep.markerSelected) { - sheetController.value = - DraggableBottomSheetController( - initialVisibility: true, - 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(); - - });*/ + bottomSheetManager = BottomSheetManager({ + filterBottomSheetController: + () => filterWidget(filterIndex: filterIndex, showIndex: showIndex), + selectedLocationBottomSheetController: + () => selectedLocationWidget( + showHint: selectedLocationBottomSheetController.isVisible.value, + sliderController: slidController.value, + trigger: triggerSlidableAnimation, + toggle: selectedLocationBottomSheetController.toggle, + ), + detailsLocationBottomSheetController: () => markerDetailsWidget(), + }); } @override void onReady() { super.onReady(); - // determineCurrentPosition(); + determineCurrentPosition(); generatedMarkers(); } @@ -147,6 +134,7 @@ class InspectorFilterLogic extends GetxController @override void onClose() { + slidController.close(); super.onClose(); } } diff --git a/features/inspection/lib/presentation/filter/view.dart b/features/inspection/lib/presentation/filter/view.dart index 2ee053c..f29c487 100644 --- a/features/inspection/lib/presentation/filter/view.dart +++ b/features/inspection/lib/presentation/filter/view.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:inspection/presentation/routes/app_routes.dart'; import 'package:rasadyar_core/core.dart'; +import 'package:rasadyar_core/data/utils.dart'; import 'package:rasadyar_core/presentation/widget/buttons/fab.dart'; import 'logic.dart'; @@ -10,606 +11,587 @@ class SupervisionFilterPage extends GetView { @override Widget build(BuildContext context) { - return PopScope( - canPop: controller.sheetController.value.handleBack, - onPopInvokedWithResult: (didPop, result) { - if (!didPop && - controller.sheetController.value.bottomSheets.isNotEmpty) { - controller.sheetController.value.removeLastBottomSheet(); - } - }, - child: Stack( - children: [ - ObxValue((currentLocation) { - return FlutterMap( - mapController: controller.animatedMapController.mapController, - options: MapOptions( - initialCenter: currentLocation.value, - initialZoom: 18, - onPositionChanged: (camera, hasGesture) { - controller.debouncedUpdateVisibleMarkers( - center: camera.center, - ); - }, - ), - children: [ - TileLayer( - urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png', - ), - - ObxValue((markers) { - return MarkerLayer( - markers: - markers.map((marker) => markerWidget(marker)).toList(), - ); - }, controller.markers), - ], - ); - }, controller.currentLocation), - Positioned( - right: 10, - bottom: 150, - child: ObxValue((data) { - return RFab.small( - backgroundColor: AppColor.greenNormal, - isLoading: data.value, - icon: vecWidget(Assets.vecGpsSvg), - onPressed: () { - controller.isLoading.value = true; - controller.determineCurrentPosition().then( - (value) => - controller.isLoading.value = - !controller.isLoading.value, - ); - }, - ); - }, controller.isLoading), - ), - Positioned( - right: 10, - bottom: 100, - child: RFab.small( - backgroundColor: AppColor.blueNormal, - icon: vecWidget(Assets.vecFilterSvg, width: 24, height: 24), - onPressed: () { - controller.sheetController.value.addBottomSheet( - child: filterWidget(), - initHeight: 400, - maxHeight: 470, - minHeight: 350, - ); - }, - ), - ), - Obx( - () => Stack( - children: - controller.sheetController.value.bottomSheets - .map((sheet) => sheet) - .toList(), - ), - ), - ], - ), - ); - } - - Marker markerWidget(LatLng marker) { - return Marker( - point: marker, - - child: GestureDetector( - onTap: () { - controller.sheetController.value.addBottomSheet( - child: selectedLocationWidget(), - minHeight: 0, - maxHeight: 250, - initHeight: 250, - ); + return Scaffold( + body: PopScope( + canPop: !controller.bottomSheetManager.isAnyVisible, + onPopInvokedWithResult: (didPop, result) { + controller.bottomSheetManager.closeFirstVisible(); }, - behavior: HitTestBehavior.opaque, - child: SizedBox( - width: 36, - height: 36, - child: Icon(Icons.location_on, color: Colors.red, size: 30), + child: Stack( + children: [ + _buildMap(), + _buildGpsButton(), + _buildFilterButton(), + Obx(() => controller.bottomSheetManager.buildVisibleSheet())], ), ), + ); } - Widget selectedLocationWidget() { - if (controller.showSlideHint) { - controller.triggerSlidableAnimation(); - } + Widget _buildMap() { + return ObxValue((currentLocation) { + return FlutterMap( + mapController: controller.animatedMapController.mapController, + options: MapOptions( + initialCenter: currentLocation.value, + initialZoom: 18, + onPositionChanged: (camera, hasGesture) { + controller.debouncedUpdateVisibleMarkers(center: camera.center); + }, + ), + children: [ + TileLayer( + urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png', + ), + ObxValue((markers) { + return MarkerLayer(markers: markers.map((e)=>markerWidget(marker: e, onTap: () { + controller.selectedLocationBottomSheetController.isVisible.value = true; - return Padding( - padding: const EdgeInsets.symmetric(horizontal: 30, vertical: 20), - child: Slidable( - key: Key('selectedLocationWidget'), - controller: controller.slidController.value, - endActionPane: ActionPane( - motion: StretchMotion(), + + })).toList()); + }, controller.markers), + ], + ); + }, controller.currentLocation); + } + + Widget _buildGpsButton() { + return Positioned( + right: 10, + bottom:83, + child: ObxValue((data) { + return RFab.small( + backgroundColor: AppColor.greenNormal, + isLoading: data.value, + icon: vecWidget(Assets.vecGpsSvg), + onPressed: () async { + controller.isLoading.value = true; + await controller.determineCurrentPosition(); + controller.isLoading.value = false; + }, + ); + }, controller.isLoading), + ); + } + + Widget _buildFilterButton() { + return Positioned( + right: 10, + bottom: 30, + child: RFab.small( + backgroundColor: AppColor.blueNormal, + icon: vecWidget(Assets.vecFilterSvg, width: 24, height: 24), + onPressed: () => controller.filterBottomSheetController.toggle(), + ), + ); + } +} + +Marker markerWidget({required LatLng marker, required VoidCallback onTap}) { + return Marker( + point: marker, + child: GestureDetector( + onTap: onTap, + behavior: HitTestBehavior.opaque, + child: SizedBox( + width: 36, + height: 36, + child: Icon(Icons.location_on, color: Colors.red, size: 30), + ), + ), + ); +} + +Padding filterWidget({required RxInt filterIndex, required RxInt showIndex}) { + return Padding( + padding: const EdgeInsets.all(20.0), + child: Column( + spacing: 16, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + spacing: 16, children: [ - CustomSlidableAction( - onPressed: (context) { - Get.toNamed(InspectionRoutes.inspectionLocationDetails); - }, - backgroundColor: AppColor.blueNormal, - foregroundColor: Colors.white, - padding: EdgeInsets.all(16), - borderRadius: BorderRadius.only( - bottomRight: Radius.circular(8), - topRight: Radius.circular(8), + Container( + width: 100, + height: 64, + clipBehavior: Clip.antiAlias, + decoration: BoxDecoration( + color: AppColor.blueLight, + borderRadius: BorderRadius.circular(8), + border: Border.all(width: 1, color: AppColor.blackLightHover), ), - child: vecWidget(Assets.vecMapSvg, width: 24, height: 24), - ), - CustomSlidableAction( - onPressed: (context) { - Get.toNamed(InspectionRoutes.inspectionAddSupervision); - }, - backgroundColor: AppColor.greenNormal, - padding: EdgeInsets.all(16), - child: vecWidget(Assets.vecMessageAddSvg), - ), - CustomSlidableAction( - onPressed: (context) {}, - backgroundColor: AppColor.warning, - padding: EdgeInsets.all(16), - borderRadius: BorderRadius.only( - bottomLeft: Radius.circular(8), - topLeft: Radius.circular(8), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + spacing: 4, + children: [ + Text('دامداران', style: AppFonts.yekan10), + Text('183 عدد', style: AppFonts.yekan13Bold), + ], + ), + ), + Container( + width: 100, + height: 64, + clipBehavior: Clip.antiAlias, + decoration: BoxDecoration( + color: AppColor.greenLight, + borderRadius: BorderRadius.circular(8), + border: Border.all(width: 1, color: AppColor.blackLightHover), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + spacing: 4, + children: [ + Text('مرغداران', style: AppFonts.yekan10), + Text('183 عدد', style: AppFonts.yekan13Bold), + ], + ), + ), + Container( + width: 100, + height: 64, + clipBehavior: Clip.antiAlias, + decoration: BoxDecoration( + color: AppColor.blueLight, + borderRadius: BorderRadius.circular(8), + border: Border.all(width: 1, color: AppColor.blackLightHover), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + spacing: 4, + children: [ + Text('اصناف', style: AppFonts.yekan10), + Text('183 عدد', style: AppFonts.yekan13Bold), + ], ), - child: vecWidget(Assets.vecSecurityTimeSvg), ), ], ), - child: GestureDetector( - onTap: () { - controller.sheetController.value.addBottomSheet( - child: markerDetailsWidget(), - minHeight: 0, - maxHeight: Get.height * 0.65, - initHeight: Get.height * 0.6, - ); - }, - child: Container( - height: 58, - padding: EdgeInsets.symmetric(horizontal: 20, vertical: 15), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(8), - border: Border.all(width: 1, color: AppColor.blackLightHover), + + Column( + crossAxisAlignment: CrossAxisAlignment.start, + spacing: 12, + children: [ + Text( + 'فیلتر نمایش', + textAlign: TextAlign.center, + style: AppFonts.yekan13.copyWith(color: AppColor.blueNormal), ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Column( - children: [ - Text( - 'داود خرم مهری پور', - style: AppFonts.yekan10.copyWith( - color: AppColor.blueNormal, - ), - ), - Text( - 'گوشت و مرغ', - style: AppFonts.yekan12.copyWith( - color: AppColor.darkGreyDarkHover, - ), - ), - ], - ), - Column( - children: [ - Text( - 'باقی مانده', - style: AppFonts.yekan10.copyWith( - color: AppColor.blueNormal, - ), - ), - Text( - '0 کیلوگرم', - style: AppFonts.yekan12.copyWith( - color: AppColor.darkGreyDarkHover, - ), - ), - ], - ), - vecWidget(Assets.vecScanBarcodeSvg), - ], - ), - ), + ObxValue((data) { + return Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + spacing: 8, + children: [ + customChip( + isSelected: data.value == 0, + onTap: (data) { + filterIndex.value = data; + }, + index: 0, + title: 'دامداران', + ), + customChip( + isSelected: data.value == 1, + title: 'مرغداران', + onTap: (data) { + filterIndex.value = data; + }, + index: 1, + ), + customChip( + isSelected: data.value == 2, + title: 'اصناف', + onTap: (data) { + filterIndex.value = data; + }, + index: 2, + ), + ], + ); + }, filterIndex), + ], ), - ), - ); - } - Padding filterWidget() { - return Padding( - padding: const EdgeInsets.all(20.0), - child: Column( - spacing: 16, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - spacing: 16, - children: [ - Container( - width: 100, - height: 64, - clipBehavior: Clip.antiAlias, - decoration: BoxDecoration( - color: AppColor.blueLight, - borderRadius: BorderRadius.circular(8), - border: Border.all(width: 1, color: AppColor.blackLightHover), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - spacing: 4, - children: [ - Text('دامداران', style: AppFonts.yekan10), - Text('183 عدد', style: AppFonts.yekan13Bold), - ], - ), - ), - Container( - width: 100, - height: 64, - clipBehavior: Clip.antiAlias, - decoration: BoxDecoration( - color: AppColor.greenLight, - borderRadius: BorderRadius.circular(8), - border: Border.all(width: 1, color: AppColor.blackLightHover), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - spacing: 4, - children: [ - Text('مرغداران', style: AppFonts.yekan10), - Text('183 عدد', style: AppFonts.yekan13Bold), - ], - ), - ), - Container( - width: 100, - height: 64, - clipBehavior: Clip.antiAlias, - decoration: BoxDecoration( - color: AppColor.blueLight, - borderRadius: BorderRadius.circular(8), - border: Border.all(width: 1, color: AppColor.blackLightHover), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - spacing: 4, - children: [ - Text('اصناف', style: AppFonts.yekan10), - Text('183 عدد', style: AppFonts.yekan13Bold), - ], - ), - ), - ], - ), - - Column( - crossAxisAlignment: CrossAxisAlignment.start, - spacing: 12, - children: [ - Text( - 'فیلتر نمایش', - textAlign: TextAlign.center, - style: AppFonts.yekan13.copyWith(color: AppColor.blueNormal), - ), - ObxValue((data) { - return Row( + Column( + crossAxisAlignment: CrossAxisAlignment.start, + spacing: 12, + children: [ + Text( + 'نمایش', + textAlign: TextAlign.center, + style: AppFonts.yekan13.copyWith(color: AppColor.blueNormal), + ), + ObxValue((data) { + return SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, spacing: 8, children: [ customChip( isSelected: data.value == 0, + title: 'نمایش همه', onTap: (data) { - controller.filterIndex.value = data; + showIndex.value = data; }, index: 0, - title: 'دامداران', ), customChip( isSelected: data.value == 1, - title: 'مرغداران', + title: 'دارای تراکنش', onTap: (data) { - controller.filterIndex.value = data; + showIndex.value = data; }, index: 1, ), customChip( isSelected: data.value == 2, - title: 'اصناف', + title: 'بازرسی شده ها', onTap: (data) { - controller.filterIndex.value = data; + showIndex.value = data; }, index: 2, ), + customChip( + isSelected: data.value == 3, + title: 'بازرسی نشده ها', + onTap: (data) { + showIndex.value = data; + }, + index: 3, + ), + customChip( + isSelected: data.value == 4, + title: 'متخلفین', + onTap: (data) { + showIndex.value = data; + }, + index: 4, + ), ], - ); - }, controller.filterIndex), - ], - ), - - Column( - crossAxisAlignment: CrossAxisAlignment.start, - spacing: 12, - children: [ - Text( - 'نمایش', - textAlign: TextAlign.center, - style: AppFonts.yekan13.copyWith(color: AppColor.blueNormal), - ), - ObxValue((data) { - return SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - spacing: 8, - children: [ - customChip( - isSelected: data.value == 0, - title: 'نمایش همه', - onTap: (data) { - controller.showIndex.value = data; - }, - index: 0, - ), - customChip( - isSelected: data.value == 1, - title: 'دارای تراکنش', - onTap: (data) { - controller.showIndex.value = data; - }, - index: 1, - ), - customChip( - isSelected: data.value == 2, - title: 'بازرسی شده ها', - onTap: (data) { - controller.showIndex.value = data; - }, - index: 2, - ), - customChip( - isSelected: data.value == 3, - title: 'بازرسی نشده ها', - onTap: (data) { - controller.showIndex.value = data; - }, - index: 3, - ), - customChip( - isSelected: data.value == 4, - title: 'متخلفین', - onTap: (data) { - controller.showIndex.value = data; - }, - index: 4, - ), - ], - ), - ); - }, controller.showIndex), - ], - ), - ], - ), - ); - } - - 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.start, - spacing: 12, - children: [ - Text( - 'داود خرم پور', - textAlign: TextAlign.center, - style: AppFonts.yekan16.copyWith( - color: AppColor.darkGreyDarkHover, ), - ), - Spacer(), - vecWidgetWithOnTap( - assets: Assets.vecMapSvg, - onTap: () { - Get.toNamed(InspectionRoutes.inspectionLocationDetails); - }, - width: 24, - height: 24, - color: AppColor.blueNormal, - ), - vecWidgetWithOnTap( - assets: Assets.vecMessageAddSvg, - width: 24, - height: 24, - color: AppColor.greenNormal, - onTap: () { - Get.toNamed(InspectionRoutes.inspectionAddSupervision); - }, - ), - - vecWidgetWithOnTap( - assets: Assets.vecSecurityTimeSvg, - color: AppColor.warning, - height: 24, - width: 24, - onTap: () {}, - ), - ], - ), - 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({ - bool isSelected = false, - required String title, - required int index, - required Function(int) onTap, - }) { - return GestureDetector( - onTap: () { - onTap.call(index); - }, - child: Container( - padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10), - clipBehavior: Clip.antiAlias, - decoration: BoxDecoration( - color: isSelected ? AppColor.blueNormal : AppColor.whiteGreyNormal, - borderRadius: BorderRadius.circular(8), - border: - isSelected - ? Border.fromBorderSide(BorderSide.none) - : Border.all(width: 0.25, color: const Color(0xFFB0B0B0)), + ); + }, showIndex), + ], ), - child: Text( - title, - textAlign: TextAlign.center, - style: - isSelected - ? AppFonts.yekan10.copyWith(color: AppColor.whiteLight) - : AppFonts.yekan10, - ), - ), - ); - } + ], + ), + ); +} + +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.start, + spacing: 12, + children: [ + Text( + 'داود خرم پور', + textAlign: TextAlign.center, + style: AppFonts.yekan16.copyWith( + color: AppColor.darkGreyDarkHover, + ), + ), + Spacer(), + vecWidgetWithOnTap( + assets: Assets.vecMapSvg, + onTap: () { + Get.toNamed(InspectionRoutes.inspectionLocationDetails); + }, + width: 24, + height: 24, + color: AppColor.blueNormal, + ), + vecWidgetWithOnTap( + assets: Assets.vecMessageAddSvg, + width: 24, + height: 24, + color: AppColor.greenNormal, + onTap: () { + Get.toNamed(InspectionRoutes.inspectionAddSupervision); + }, + ), + + vecWidgetWithOnTap( + assets: Assets.vecSecurityTimeSvg, + color: AppColor.warning, + height: 24, + width: 24, + onTap: () {}, + ), + ], + ), + 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({ + bool isSelected = false, + required String title, + required int index, + required Function(int) onTap, +}) { + return GestureDetector( + onTap: () { + onTap.call(index); + }, + child: Container( + padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10), + clipBehavior: Clip.antiAlias, + decoration: BoxDecoration( + color: isSelected ? AppColor.blueNormal : AppColor.whiteGreyNormal, + borderRadius: BorderRadius.circular(8), + border: + isSelected + ? Border.fromBorderSide(BorderSide.none) + : Border.all(width: 0.25, color: const Color(0xFFB0B0B0)), + ), + child: Text( + title, + textAlign: TextAlign.center, + style: + isSelected + ? AppFonts.yekan10.copyWith(color: AppColor.whiteLight) + : AppFonts.yekan10, + ), + ), + ); +} + +Widget selectedLocationWidget({ + required bool showHint, + required SlidableController sliderController, + required VoidCallback trigger, + required VoidCallback toggle, +}) { + if (showHint) { + trigger.call(); + } + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 30, vertical: 20), + child: Slidable( + key: Key('selectedLocationWidget'), + controller: sliderController, + endActionPane: ActionPane( + motion: StretchMotion(), + children: [ + CustomSlidableAction( + onPressed: (context) { + Get.toNamed(InspectionRoutes.inspectionLocationDetails); + }, + backgroundColor: AppColor.blueNormal, + foregroundColor: Colors.white, + padding: EdgeInsets.all(16), + borderRadius: BorderRadius.only( + bottomRight: Radius.circular(8), + topRight: Radius.circular(8), + ), + child: vecWidget(Assets.vecMapSvg, width: 24, height: 24), + ), + CustomSlidableAction( + onPressed: (context) { + Get.toNamed(InspectionRoutes.inspectionAddSupervision); + }, + backgroundColor: AppColor.greenNormal, + padding: EdgeInsets.all(16), + child: vecWidget(Assets.vecMessageAddSvg), + ), + CustomSlidableAction( + onPressed: (context) {}, + backgroundColor: AppColor.warning, + padding: EdgeInsets.all(16), + borderRadius: BorderRadius.only( + bottomLeft: Radius.circular(8), + topLeft: Radius.circular(8), + ), + child: vecWidget(Assets.vecSecurityTimeSvg), + ), + ], + ), + child: GestureDetector( + onTap: toggle, + child: Container( + height: 58, + padding: EdgeInsets.symmetric(horizontal: 20, vertical: 15), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + border: Border.all(width: 1, color: AppColor.blackLightHover), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + children: [ + Text( + 'داود خرم مهری پور', + style: AppFonts.yekan10.copyWith( + color: AppColor.blueNormal, + ), + ), + Text( + 'گوشت و مرغ', + style: AppFonts.yekan12.copyWith( + color: AppColor.darkGreyDarkHover, + ), + ), + ], + ), + Column( + children: [ + Text( + 'باقی مانده', + style: AppFonts.yekan10.copyWith( + color: AppColor.blueNormal, + ), + ), + Text( + '0 کیلوگرم', + style: AppFonts.yekan12.copyWith( + color: AppColor.darkGreyDarkHover, + ), + ), + ], + ), + vecWidget(Assets.vecScanBarcodeSvg), + ], + ), + ), + ), + ), + ); } diff --git a/features/inspection/lib/presentation/root/view.dart b/features/inspection/lib/presentation/root/view.dart index 7693679..356a1d6 100644 --- a/features/inspection/lib/presentation/root/view.dart +++ b/features/inspection/lib/presentation/root/view.dart @@ -113,42 +113,39 @@ class RootPage extends GetView { controller.currentIndex, ), - Align( - alignment: Alignment.bottomCenter, - child: WaveBottomNavigation( - items: [ - WaveBottomNavigationItem(title: 'خانه', icon: Assets.vecMapSvg), - WaveBottomNavigationItem( - title: 'عملیات', - icon: Assets.vecUserSvg, - ), - WaveBottomNavigationItem( - title: 'افزودن', - icon: Assets.vecAddSvg, - ), - WaveBottomNavigationItem( - title: 'آمار', - icon: Assets.vecDiagramSvg, - ), - WaveBottomNavigationItem( - title: 'تماس', - icon: Assets.vecCallSvg, - ), - WaveBottomNavigationItem( - title: 'مکان ', - icon: Assets.vecGpsSvg, - ), - WaveBottomNavigationItem( - title: 'تاریخ', - icon: Assets.vecCalendarSvg, - ), - ], - onPageChanged: (index) { - controller.changePage(index); - }, - ), + ], + ), + bottomNavigationBar: WaveBottomNavigation( + items: [ + WaveBottomNavigationItem(title: 'خانه', icon: Assets.vecMapSvg), + WaveBottomNavigationItem( + title: 'عملیات', + icon: Assets.vecUserSvg, + ), + WaveBottomNavigationItem( + title: 'افزودن', + icon: Assets.vecAddSvg, + ), + WaveBottomNavigationItem( + title: 'آمار', + icon: Assets.vecDiagramSvg, + ), + WaveBottomNavigationItem( + title: 'تماس', + icon: Assets.vecCallSvg, + ), + WaveBottomNavigationItem( + title: 'مکان ', + icon: Assets.vecGpsSvg, + ), + WaveBottomNavigationItem( + title: 'تاریخ', + icon: Assets.vecCalendarSvg, ), ], + onPageChanged: (index) { + controller.changePage(index); + }, ), ); } diff --git a/features/inspection/pubspec.lock b/features/inspection/pubspec.lock index eeeefab..276fc68 100644 --- a/features/inspection/pubspec.lock +++ b/features/inspection/pubspec.lock @@ -100,7 +100,7 @@ packages: source: sdk version: "0.0.0" flutter_map: - dependency: "direct main" + dependency: transitive description: name: flutter_map sha256: f7d0379477274f323c3f3bc12d369a2b42eb86d1e7bd2970ae1ea3cff782449a @@ -108,7 +108,7 @@ packages: source: hosted version: "8.1.1" flutter_map_animations: - dependency: "direct main" + dependency: transitive description: name: flutter_map_animations sha256: bf583863561861aaaf4854ae7ed8940d79bea7d32918bf7a85d309b25235a09e @@ -161,7 +161,7 @@ packages: source: hosted version: "3.0.0" geolocator: - dependency: "direct main" + dependency: transitive description: name: geolocator sha256: e7ebfa04ce451daf39b5499108c973189a71a919aa53c1204effda1c5b93b822 @@ -228,18 +228,18 @@ packages: dependency: transitive description: name: hive_ce - sha256: ac66daee46ad46486a1ed12cf91e9d7479c875fb46889be8d2c96b557406647f + sha256: fdc19336f03ecd01dbc1d1afe69d87ed9336bdf996c5374a25f9c21ef5f2989e url: "https://pub.dev" source: hosted - version: "2.10.1" + version: "2.11.1" hive_ce_flutter: dependency: transitive description: name: hive_ce_flutter - sha256: "74c1d5f10d803446b4e7913bb272137e2724ba8a56465444f9e7713aeb60a877" + sha256: "5eaf57a5af980eda63ddaa8c34d618dc446f76fe79410f2a283522744291c05c" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" http: dependency: transitive description: @@ -264,6 +264,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.19.0" + isolate_channel: + dependency: transitive + description: + name: isolate_channel + sha256: bafedfbcc1e9796ada179b5dac7043b33eb85d35204b089ca37d480d9c0068df + url: "https://pub.dev" + source: hosted + version: "0.2.2" json_annotation: dependency: transitive description: @@ -273,7 +281,7 @@ packages: source: hosted version: "4.9.0" latlong2: - dependency: "direct main" + dependency: transitive description: name: latlong2 sha256: "98227922caf49e6056f91b6c56945ea1c7b166f28ffcd5fb8e72fc0b453cc8fe" @@ -288,30 +296,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.1" - location: - dependency: "direct main" - description: - name: location - sha256: c2c4304071ec860525d5c50d142410072f8620c1d9f74874811af2e804e1a9c8 - url: "https://pub.dev" - source: hosted - version: "8.0.0" - location_platform_interface: - dependency: transitive - description: - name: location_platform_interface - sha256: a3404ea6d74e89b121630be62ed8edcc7b39fd108bd19805d0ae55c397135dd7 - url: "https://pub.dev" - source: hosted - version: "6.0.0" - location_web: - dependency: transitive - description: - name: location_web - sha256: "744bdff53dc455a2dc9a34474c49cde364d4fbef2aee009f8b0b4b68570c27a1" - url: "https://pub.dev" - source: hosted - version: "6.0.0" logger: dependency: transitive description: @@ -523,10 +507,10 @@ packages: dependency: transitive description: name: shamsi_date - sha256: "4614789ed11bfffe5ba0aa157a20f2857ab6328528401766e0d924e453c866bd" + sha256: b6c79ff34ddfb1e9e4761347f18e30afdd7d16cc3db77defd5a40e2d93894c51 url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.1.0" sky_engine: dependency: transitive description: flutter diff --git a/packages/core/lib/presentation/widget/draggable_bottom_sheet/bottom_sheet_manger.dart b/packages/core/lib/presentation/widget/draggable_bottom_sheet/bottom_sheet_manger.dart new file mode 100644 index 0000000..7be010e --- /dev/null +++ b/packages/core/lib/presentation/widget/draggable_bottom_sheet/bottom_sheet_manger.dart @@ -0,0 +1,42 @@ +import 'package:flutter/material.dart'; + +import 'draggable_bottom_sheet.dart'; +import 'draggable_bottom_sheet_controller.dart'; + +class BottomSheetManager { + final Map _sheetBuilders; + + BottomSheetManager(this._sheetBuilders); + + bool get isAnyVisible => + _sheetBuilders.keys.any((controller) => controller.isVisible.value); + + void closeFirstVisible() { + for (final controller in _sheetBuilders.keys) { + if (controller.isVisible.value) { + controller.toggle(); + break; + } + } + } + + Widget buildVisibleSheet() { + for (final entry in _sheetBuilders.entries) { + if (entry.key.isVisible.value) { + return _buildDraggableSheet(entry.key, entry.value()); + } + } + return const SizedBox.shrink(); + } + + Widget _buildDraggableSheet( + DraggableBottomSheetController controller, + Widget child, + ) { + return DraggableBottomSheet( + controller: controller, + backgroundColor: Colors.white, + child: child, + ); + } +} diff --git a/packages/core/lib/presentation/widget/draggable_bottom_sheet/draggable_bottom_sheet.dart b/packages/core/lib/presentation/widget/draggable_bottom_sheet/draggable_bottom_sheet.dart index ed56eba..b430ad6 100644 --- a/packages/core/lib/presentation/widget/draggable_bottom_sheet/draggable_bottom_sheet.dart +++ b/packages/core/lib/presentation/widget/draggable_bottom_sheet/draggable_bottom_sheet.dart @@ -4,86 +4,87 @@ import 'package:get/get.dart'; import 'package:rasadyar_core/data/utils.dart'; import 'package:rasadyar_core/presentation/common/app_color.dart'; import 'package:rasadyar_core/presentation/widget/draggable_bottom_sheet/draggable_bottom_sheet_controller.dart'; +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; class DraggableBottomSheet extends StatelessWidget { - final DraggableBottomSheetController? controller; - final bool isVisible; - final double initialHeight; - final double minHeight; - final double maxHeight; + final DraggableBottomSheetController controller; final Widget? child; final Color? backgroundColor; + const DraggableBottomSheet({ super.key, - this.controller, - this.isVisible = false, - this.backgroundColor = AppColor.lightGreyNormal, - this.initialHeight = 200, - this.minHeight = 0, - this.maxHeight = 700, + required this.controller, this.child, + this.backgroundColor = Colors.white, }); @override Widget build(BuildContext context) { - final DraggableBottomSheetController bottomSheetController = - controller ?? - Get.put( - DraggableBottomSheetController( - initialVisibility: false, - initialHeight: initialHeight, - minHeight: minHeight, - maxHeight: maxHeight, - ), - tag: 'local_$hashCode', - ); - // Optionally show after first frame if isVisible is true WidgetsBinding.instance.addPostFrameCallback((_) { - if (isVisible && !bottomSheetController.isVisible.value) { - bottomSheetController.show(); + if (controller.isVisible.value && !controller.isVisible.value) { + controller.show(); } }); - return ObxValue( - (data) => AnimatedPositioned( - duration: const Duration(milliseconds: 300), - curve: Curves.easeOut, - bottom: bottomSheetController.isVisible.value ? 0 : -maxHeight, - left: 0, - right: 0, - child: GestureDetector( - onVerticalDragUpdate: (DragUpdateDetails details) { - bottomSheetController.updateHeight(details.primaryDelta); - }, - child: Container( - height: data.value, - decoration: BoxDecoration( - color: backgroundColor, - borderRadius: BorderRadius.vertical(top: Radius.circular(50)), - ), - child: Column( - children: [ - const SizedBox(height: 10), - GestureDetector( - onTap: () { - bottomSheetController.toggle(); - }, - behavior: HitTestBehavior.opaque, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [const Icon(CupertinoIcons.chevron_down)], - ), - ), - const SizedBox(height: 10), - child ?? SizedBox.shrink(), - ], + return Obx(() { + if (!controller.isVisible.value) return SizedBox.shrink(); + return Stack( + + children: [ + // پس‌زمینه تیره + Positioned.fill( + child: GestureDetector( + onTap: controller.toggle, + child: Container(color: Colors.black54), ), ), - ), - ), - bottomSheetController.currentHeight, + // محتوای BottomSheet + AnimatedPositioned( + duration: Duration(milliseconds: 300), + curve: Curves.easeOut, + left: 0, + right: 0, + bottom: 0, + child: GestureDetector( + onVerticalDragUpdate: (details) => + controller.updateHeight(details.primaryDelta), + child: Container( + height: controller.currentHeight.value, + decoration: BoxDecoration( + color: backgroundColor, + borderRadius: BorderRadius.vertical( + top: Radius.circular(20), + ), + boxShadow: [ + BoxShadow( + color: Colors.black.withValues(alpha: 0.1), + blurRadius: 10, + ), + ], + ), + child: Column( + children: [ + GestureDetector( + onTap: controller.toggle, + child: Container( + padding: EdgeInsets.all(10), + child: Icon(Icons.drag_handle), + ), + ), + Expanded(child: child ?? SizedBox.shrink()), + ], + ), + ), + ), + ), + ], + ); + + } + ); } -} +} \ No newline at end of file diff --git a/packages/core/lib/presentation/widget/draggable_bottom_sheet/draggable_bottom_sheet_controller.dart b/packages/core/lib/presentation/widget/draggable_bottom_sheet/draggable_bottom_sheet_controller.dart index ac393f5..5a1caef 100644 --- a/packages/core/lib/presentation/widget/draggable_bottom_sheet/draggable_bottom_sheet_controller.dart +++ b/packages/core/lib/presentation/widget/draggable_bottom_sheet/draggable_bottom_sheet_controller.dart @@ -3,7 +3,7 @@ import 'package:get/get.dart'; import 'package:rasadyar_core/core.dart'; import 'draggable_bottom_sheet.dart'; -class DraggableBottomSheetController extends GetxController { +/*class DraggableBottomSheetController extends GetxController { final RxList bottomSheets = [].obs; @@ -124,5 +124,43 @@ class DraggableBottomSheetController extends GetxController { return false; } -} +}*/ +class DraggableBottomSheetController extends GetxController { + final RxBool isVisible = false.obs; + final RxDouble currentHeight = 200.0.obs; + + late double initialHeight; + late double minHeight; + late double maxHeight; + + DraggableBottomSheetController({ + this.initialHeight = 200, + this.minHeight = 100, + this.maxHeight = 700, + }) { + currentHeight.value = initialHeight; + } + + void show() => isVisible.value = true; + + void hide() => isVisible.value = false; + + void toggle() => isVisible.value = !isVisible.value; + + void updateHeight(double? delta) { + if (delta == null) return; + final newHeight = (currentHeight.value - delta).clamp(minHeight, maxHeight); + if (newHeight <= minHeight) { + hide(); + } else { + currentHeight.value = newHeight; + } + } + + @override + void onInit() { + super.onInit(); + + } +} diff --git a/packages/core/lib/presentation/widget/widget.dart b/packages/core/lib/presentation/widget/widget.dart index 4f6869c..f61a097 100644 --- a/packages/core/lib/presentation/widget/widget.dart +++ b/packages/core/lib/presentation/widget/widget.dart @@ -8,6 +8,7 @@ export 'buttons/text_button.dart'; export 'captcha/captcha_widget.dart'; export 'draggable_bottom_sheet/draggable_bottom_sheet.dart'; export 'draggable_bottom_sheet/draggable_bottom_sheet_controller.dart'; +export 'draggable_bottom_sheet/bottom_sheet_manger.dart'; export 'inputs/r_input.dart'; export 'pagination/pagination_from_until.dart'; export 'pagination/show_more.dart'; diff --git a/packages/core/pubspec.lock b/packages/core/pubspec.lock index 8e2431a..6b71ba8 100644 --- a/packages/core/pubspec.lock +++ b/packages/core/pubspec.lock @@ -417,26 +417,26 @@ packages: dependency: "direct main" description: name: hive_ce - sha256: ac66daee46ad46486a1ed12cf91e9d7479c875fb46889be8d2c96b557406647f + sha256: fdc19336f03ecd01dbc1d1afe69d87ed9336bdf996c5374a25f9c21ef5f2989e url: "https://pub.dev" source: hosted - version: "2.10.1" + version: "2.11.1" hive_ce_flutter: dependency: "direct main" description: name: hive_ce_flutter - sha256: "74c1d5f10d803446b4e7913bb272137e2724ba8a56465444f9e7713aeb60a877" + sha256: "5eaf57a5af980eda63ddaa8c34d618dc446f76fe79410f2a283522744291c05c" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" hive_ce_generator: dependency: "direct dev" description: name: hive_ce_generator - sha256: "0b1c750e2d10c55a14cde16d479ada42704be6cef43c54b728ed0e4e02f7d808" + sha256: "84940c2fd3cb1d1eb318892cdb666bc0b8023f365f28aefe09b9e5a7222bc740" url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.9.1" http: dependency: transitive description: @@ -477,6 +477,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.5" + isolate_channel: + dependency: transitive + description: + name: isolate_channel + sha256: bafedfbcc1e9796ada179b5dac7043b33eb85d35204b089ca37d480d9c0068df + url: "https://pub.dev" + source: hosted + version: "0.2.2" js: dependency: transitive description: @@ -825,10 +833,10 @@ packages: dependency: transitive description: name: shamsi_date - sha256: "4614789ed11bfffe5ba0aa157a20f2857ab6328528401766e0d924e453c866bd" + sha256: b6c79ff34ddfb1e9e4761347f18e30afdd7d16cc3db77defd5a40e2d93894c51 url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.1.0" shelf: dependency: transitive description: diff --git a/pubspec.lock b/pubspec.lock index 5b69e4e..9434345 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -257,18 +257,18 @@ packages: dependency: transitive description: name: hive_ce - sha256: ac66daee46ad46486a1ed12cf91e9d7479c875fb46889be8d2c96b557406647f + sha256: fdc19336f03ecd01dbc1d1afe69d87ed9336bdf996c5374a25f9c21ef5f2989e url: "https://pub.dev" source: hosted - version: "2.10.1" + version: "2.11.1" hive_ce_flutter: dependency: transitive description: name: hive_ce_flutter - sha256: "74c1d5f10d803446b4e7913bb272137e2724ba8a56465444f9e7713aeb60a877" + sha256: "5eaf57a5af980eda63ddaa8c34d618dc446f76fe79410f2a283522744291c05c" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" http: dependency: transitive description: @@ -300,6 +300,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.19.0" + isolate_channel: + dependency: transitive + description: + name: isolate_channel + sha256: bafedfbcc1e9796ada179b5dac7043b33eb85d35204b089ca37d480d9c0068df + url: "https://pub.dev" + source: hosted + version: "0.2.2" json_annotation: dependency: transitive description: @@ -575,10 +583,10 @@ packages: dependency: transitive description: name: shamsi_date - sha256: "4614789ed11bfffe5ba0aa157a20f2857ab6328528401766e0d924e453c866bd" + sha256: b6c79ff34ddfb1e9e4761347f18e30afdd7d16cc3db77defd5a40e2d93894c51 url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.1.0" sky_engine: dependency: transitive description: flutter