feat : new map page item
onTap location
This commit is contained in:
6
assets/icons/cow.svg
Normal file
6
assets/icons/cow.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1.99414 4.06152C2.11651 4.04508 2.26984 4.03908 2.44629 4.06934L2.63086 4.1123C2.66347 4.122 2.69684 4.12526 2.72949 4.12598L2.72754 4.15918C2.72275 4.22814 2.72574 4.30036 2.74316 4.36816C2.7597 4.43243 2.79674 4.52092 2.88281 4.58203C2.89518 4.59081 2.90914 4.5959 2.92188 4.60254C2.90533 4.62149 2.89022 4.64313 2.87793 4.66797C2.84158 4.74153 2.84293 4.81227 2.85352 4.8623V4.86328C2.88221 4.99559 2.9861 5.05596 3.03613 5.07812C3.09205 5.10288 3.15203 5.11359 3.20117 5.11914C3.30276 5.13057 3.42776 5.12687 3.55566 5.11426C3.8146 5.08868 4.13653 5.0224 4.41699 4.92676C4.8697 4.77239 5.39282 4.74707 5.67188 4.74707C5.85549 4.74708 5.93323 4.75634 6.07129 4.76855C6.21465 4.78124 6.40722 4.79596 6.80664 4.80371C7.60168 4.81914 9.2255 4.80779 12.9365 4.70508C13.6865 4.68397 14.4861 5.14822 14.6084 5.99902C14.6208 6.08529 14.6307 6.17802 14.6436 6.27539L14.2998 6.81934L14.2988 6.82031L14.2764 6.85547L14.2666 6.89648C13.2653 11.1547 13.6097 9.85452 12.6777 12.9521H12.5811L12.8672 11.1807L12.877 11.1211L12.8574 11.0635L12.1934 9.04688L12.085 8.7168L11.8066 8.92578C11.4759 9.17374 11.3039 9.33106 11.0938 9.45703C10.9049 9.57021 10.6934 9.64906 10.3281 9.69043C9.56844 9.77639 8.21483 9.69628 5.20801 9.46484L4.96289 9.44629L4.93945 9.69043L4.63477 12.9521H4.49805C4.4885 12.634 4.47072 12.0486 4.45312 11.4639C4.42742 10.6094 4.40197 9.75582 4.40137 9.7334L4.39648 9.55078L4.2207 9.5L4.09863 9.46094C3.97084 9.41539 3.82851 9.35139 3.69531 9.27246C3.5151 9.16564 3.37173 9.04327 3.29297 8.91992V8.91895C3.22545 8.81302 3.16459 8.64834 3.10938 8.43848C3.05507 8.23208 3.01145 8.00565 2.96777 7.78516C2.92556 7.57208 2.88143 7.35575 2.82715 7.19238C2.80038 7.11183 2.76535 7.02437 2.71484 6.95312C2.66578 6.88399 2.56774 6.78418 2.41309 6.78418C2.36993 6.78424 2.33512 6.79565 2.32812 6.79785C2.31419 6.80224 2.3015 6.80763 2.29199 6.81152C2.2727 6.81944 2.25059 6.82891 2.22949 6.83887C2.19406 6.85559 2.12077 6.8917 2.06543 6.91797C1.9365 6.97916 1.77307 7.05253 1.60254 7.11133C1.42885 7.17119 1.26314 7.21011 1.12793 7.21191C0.993322 7.21369 0.927506 7.17972 0.892578 7.13867C0.783082 7.00936 0.713382 6.87978 0.695312 6.78027C0.686938 6.73395 0.691445 6.70208 0.699219 6.68066C0.70633 6.66124 0.721384 6.63516 0.761719 6.60645C0.949875 6.47245 1.08166 6.33554 1.16699 6.1875C1.25348 6.03737 1.28367 5.89255 1.29395 5.76074C1.29892 5.69694 1.29892 5.63499 1.29883 5.58008C1.29873 5.52254 1.29809 5.47399 1.2998 5.42383C1.3031 5.32782 1.31438 5.24174 1.34961 5.15234C1.38723 5.05711 1.40455 4.92214 1.31641 4.80273C1.24227 4.70254 1.13267 4.6712 1.0752 4.65918C1.00959 4.64552 0.941923 4.6435 0.892578 4.64355C0.866666 4.64359 0.841905 4.64395 0.821289 4.64453C0.79957 4.64514 0.784334 4.64444 0.771484 4.64453C0.659025 4.64451 0.577197 4.6414 0.499023 4.60254C0.459247 4.58275 0.4118 4.5471 0.359375 4.48242C0.621129 4.42438 0.936447 4.49265 1.19727 4.65137L1.31934 4.72656L1.44531 4.6582C1.52833 4.61344 1.61472 4.54157 1.65918 4.42773C1.70046 4.32202 1.68994 4.21737 1.66309 4.12793C1.68562 4.12425 1.70447 4.1239 1.71191 4.12207C1.73088 4.1174 1.76563 4.10726 1.78809 4.10156C1.84307 4.08762 1.91211 4.07255 1.99414 4.06152ZM3.7998 4.37988C3.79704 4.38058 3.79382 4.38202 3.79004 4.38281C3.75102 4.39095 3.69774 4.3946 3.61426 4.39941C3.56997 4.40197 3.5176 4.40778 3.45996 4.41309C3.56733 4.33332 3.70866 4.27007 3.85742 4.23438C3.87857 4.22931 3.89993 4.22635 3.91992 4.22266C3.88277 4.27127 3.84355 4.32452 3.7998 4.37988Z" stroke="#797979" stroke-width="0.5"/>
|
||||
<path d="M1.99414 4.06152C2.11651 4.04508 2.26984 4.03908 2.44629 4.06934L2.63086 4.1123C2.66347 4.122 2.69684 4.12526 2.72949 4.12598L2.72754 4.15918C2.72275 4.22814 2.72574 4.30036 2.74316 4.36816C2.7597 4.43243 2.79674 4.52092 2.88281 4.58203C2.89518 4.59081 2.90914 4.5959 2.92188 4.60254C2.90533 4.62149 2.89022 4.64313 2.87793 4.66797C2.84158 4.74153 2.84293 4.81227 2.85352 4.8623V4.86328C2.88221 4.99559 2.9861 5.05596 3.03613 5.07812C3.09205 5.10288 3.15203 5.11359 3.20117 5.11914C3.30276 5.13057 3.42776 5.12687 3.55566 5.11426C3.8146 5.08868 4.13653 5.0224 4.41699 4.92676C4.8697 4.77239 5.39282 4.74707 5.67188 4.74707C5.85549 4.74708 5.93323 4.75634 6.07129 4.76855C6.21465 4.78124 6.40722 4.79596 6.80664 4.80371C7.60168 4.81914 9.2255 4.80779 12.9365 4.70508C13.6865 4.68397 14.4861 5.14822 14.6084 5.99902C14.6208 6.08529 14.6307 6.17802 14.6436 6.27539L14.2998 6.81934L14.2988 6.82031L14.2764 6.85547L14.2666 6.89648C13.2653 11.1547 13.6097 9.85452 12.6777 12.9521H12.5811L12.8672 11.1807L12.877 11.1211L12.8574 11.0635L12.1934 9.04688L12.085 8.7168L11.8066 8.92578C11.4759 9.17374 11.3039 9.33106 11.0938 9.45703C10.9049 9.57021 10.6934 9.64906 10.3281 9.69043C9.56844 9.77639 8.21483 9.69628 5.20801 9.46484L4.96289 9.44629L4.93945 9.69043L4.63477 12.9521H4.49805C4.4885 12.634 4.47072 12.0486 4.45312 11.4639C4.42742 10.6094 4.40197 9.75582 4.40137 9.7334L4.39648 9.55078L4.2207 9.5L4.09863 9.46094C3.97084 9.41539 3.82851 9.35139 3.69531 9.27246C3.5151 9.16564 3.37173 9.04327 3.29297 8.91992V8.91895C3.22545 8.81302 3.16459 8.64834 3.10938 8.43848C3.05507 8.23208 3.01145 8.00565 2.96777 7.78516C2.92556 7.57208 2.88143 7.35575 2.82715 7.19238C2.80038 7.11183 2.76535 7.02437 2.71484 6.95312C2.66578 6.88399 2.56774 6.78418 2.41309 6.78418C2.36993 6.78424 2.33512 6.79565 2.32812 6.79785C2.31419 6.80224 2.3015 6.80763 2.29199 6.81152C2.2727 6.81944 2.25059 6.82891 2.22949 6.83887C2.19406 6.85559 2.12077 6.8917 2.06543 6.91797C1.9365 6.97916 1.77307 7.05253 1.60254 7.11133C1.42885 7.17119 1.26314 7.21011 1.12793 7.21191C0.993322 7.21369 0.927506 7.17972 0.892578 7.13867C0.783082 7.00936 0.713382 6.87978 0.695312 6.78027C0.686938 6.73395 0.691445 6.70208 0.699219 6.68066C0.70633 6.66124 0.721384 6.63516 0.761719 6.60645C0.949875 6.47245 1.08166 6.33554 1.16699 6.1875C1.25348 6.03737 1.28367 5.89255 1.29395 5.76074C1.29892 5.69694 1.29892 5.63499 1.29883 5.58008C1.29873 5.52254 1.29809 5.47399 1.2998 5.42383C1.3031 5.32782 1.31438 5.24174 1.34961 5.15234C1.38723 5.05711 1.40455 4.92214 1.31641 4.80273C1.24227 4.70254 1.13267 4.6712 1.0752 4.65918C1.00959 4.64552 0.941923 4.6435 0.892578 4.64355C0.866666 4.64359 0.841905 4.64395 0.821289 4.64453C0.79957 4.64514 0.784334 4.64444 0.771484 4.64453C0.659025 4.64451 0.577197 4.6414 0.499023 4.60254C0.459247 4.58275 0.4118 4.5471 0.359375 4.48242C0.621129 4.42438 0.936447 4.49265 1.19727 4.65137L1.31934 4.72656L1.44531 4.6582C1.52833 4.61344 1.61472 4.54157 1.65918 4.42773C1.70046 4.32202 1.68994 4.21737 1.66309 4.12793C1.68562 4.12425 1.70447 4.1239 1.71191 4.12207C1.73088 4.1174 1.76563 4.10726 1.78809 4.10156C1.84307 4.08762 1.91211 4.07255 1.99414 4.06152ZM3.7998 4.37988C3.79704 4.38058 3.79382 4.38202 3.79004 4.38281C3.75102 4.39095 3.69774 4.3946 3.61426 4.39941C3.56997 4.40197 3.5176 4.40778 3.45996 4.41309C3.56733 4.33332 3.70866 4.27007 3.85742 4.23438C3.87857 4.22931 3.89993 4.22635 3.91992 4.22266C3.88277 4.27127 3.84355 4.32452 3.7998 4.37988Z" stroke="#797979" stroke-width="0.5"/>
|
||||
<path d="M3.70703 9.92188C3.75368 9.94241 3.79761 9.95935 3.83691 9.97461L3.86426 10.9014L3.32324 12.9521H3.25098L3.70703 9.92188Z" stroke="#797979" stroke-width="0.5"/>
|
||||
<path d="M14.6465 10.6396L14.6641 11.9297C14.6318 11.5555 14.604 11.2272 14.5986 11.165V11.0674L14.5186 10.9932L14.0039 10.5186L14.1758 9.7832L14.6465 10.6396Z" stroke="#797979" stroke-width="0.5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 7.3 KiB |
BIN
assets/vec/cow.svg.vec
Normal file
BIN
assets/vec/cow.svg.vec
Normal file
Binary file not shown.
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart';
|
||||
import 'package:rasadyar_chicken/presentation/utils/string_utils.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/list_item/list_item.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/list_row_item.dart';
|
||||
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart';
|
||||
import 'package:rasadyar_chicken/presentation/utils/string_utils.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/list_item/list_item.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/list_row_item.dart';
|
||||
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:rasadyar_chicken/data/models/response/steward_free_bar/steward_f
|
||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/inventory_widget.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/list_item/list_item.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/list_row_item.dart';
|
||||
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
@@ -6,7 +6,7 @@ import 'package:rasadyar_auth/data/models/local/user_local/user_local_model.dart
|
||||
import 'package:rasadyar_auth/presentation/routes/pages.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/iran_province_city/iran_province_city_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/user_profile/user_profile.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/list_row_item.dart';
|
||||
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
@@ -7,7 +7,6 @@ import 'package:rasadyar_chicken/presentation/utils/string_utils.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/inventory_widget.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/list_item/list_item.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/list_row_item.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/page_route.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/filter_bottom_sheet.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/inventory_widget.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/list_item/list_item.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/list_row_item.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/page_route.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import 'package:rasadyar_chicken/data/models/response/out_province_carcasses_buy
|
||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/filter_bottom_sheet.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/list_item/list_item.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/list_row_item.dart';
|
||||
|
||||
import 'package:rasadyar_chicken/presentation/widget/page_route.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import 'package:rasadyar_chicken/data/models/response/roles_products/roles_produ
|
||||
import 'package:rasadyar_chicken/data/models/response/steward_free_sale_bar/steward_free_sale_bar.dart';
|
||||
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/list_item/list_item.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/list_row_item.dart';
|
||||
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
@@ -6,7 +6,7 @@ import 'package:rasadyar_chicken/data/models/response/segmentation_model/segment
|
||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/filter_bottom_sheet.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/list_item/list_item.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/list_row_item.dart';
|
||||
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
@@ -88,6 +88,9 @@ class $AssetsIconsGen {
|
||||
/// File path: assets/icons/convert_cube.svg
|
||||
SvgGenImage get convertCube => const SvgGenImage('assets/icons/convert_cube.svg');
|
||||
|
||||
/// File path: assets/icons/cow.svg
|
||||
SvgGenImage get cow => const SvgGenImage('assets/icons/cow.svg');
|
||||
|
||||
/// File path: assets/icons/cube.svg
|
||||
SvgGenImage get cube => const SvgGenImage('assets/icons/cube.svg');
|
||||
|
||||
@@ -280,6 +283,7 @@ class $AssetsIconsGen {
|
||||
closeCircle,
|
||||
closeSquare,
|
||||
convertCube,
|
||||
cow,
|
||||
cube,
|
||||
cubeBottomRotation,
|
||||
cubeRotate,
|
||||
@@ -429,6 +433,9 @@ class $AssetsVecGen {
|
||||
/// File path: assets/vec/convert_cube.svg.vec
|
||||
SvgGenImage get convertCubeSvg => const SvgGenImage.vec('assets/vec/convert_cube.svg.vec');
|
||||
|
||||
/// File path: assets/vec/cow.svg.vec
|
||||
SvgGenImage get cowSvg => const SvgGenImage.vec('assets/vec/cow.svg.vec');
|
||||
|
||||
/// File path: assets/vec/cube.svg.vec
|
||||
SvgGenImage get cubeSvg => const SvgGenImage.vec('assets/vec/cube.svg.vec');
|
||||
|
||||
@@ -621,6 +628,7 @@ class $AssetsVecGen {
|
||||
closeCircleSvg,
|
||||
closeSquareSvg,
|
||||
convertCubeSvg,
|
||||
cowSvg,
|
||||
cubeSvg,
|
||||
cubeBottomRotationSvg,
|
||||
cubeRotateSvg,
|
||||
|
||||
@@ -51,7 +51,7 @@ class BaseBottomSheet extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 2),
|
||||
SizedBox(height:8),
|
||||
Expanded(child: SingleChildScrollView(child: child)),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -5,7 +5,7 @@ import 'package:rasadyar_core/presentation/common/app_fonts.dart';
|
||||
class RElevated extends StatelessWidget {
|
||||
const RElevated({
|
||||
super.key,
|
||||
required this.text,
|
||||
this.text,
|
||||
required this.onPressed,
|
||||
this.foregroundColor = Colors.white,
|
||||
this.backgroundColor = AppColor.blueNormal,
|
||||
@@ -17,9 +17,11 @@ class RElevated extends StatelessWidget {
|
||||
this.height = 56.0,
|
||||
this.isFullWidth = false,
|
||||
this.isLoading = false,
|
||||
});
|
||||
this.child,
|
||||
}) : assert(text != null || child != null, 'Either text or child must be provided');
|
||||
|
||||
final String text;
|
||||
final String? text;
|
||||
final Widget? child;
|
||||
final VoidCallback? onPressed;
|
||||
final double width;
|
||||
final double height;
|
||||
@@ -41,27 +43,23 @@ class RElevated extends StatelessWidget {
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: backgroundColor,
|
||||
foregroundColor: foregroundColor,
|
||||
disabledBackgroundColor:
|
||||
disabledBackgroundColor ?? backgroundColor.withAlpha(38),
|
||||
disabledBackgroundColor: disabledBackgroundColor ?? backgroundColor.withAlpha(38),
|
||||
disabledForegroundColor: disabledForegroundColor,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(radius),
|
||||
),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(radius)),
|
||||
minimumSize: Size(isFullWidth ? double.infinity : width, height),
|
||||
padding: EdgeInsets.zero,
|
||||
textStyle: textStyle ?? AppFonts.yekan18,
|
||||
),
|
||||
child:
|
||||
isLoading
|
||||
? SizedBox(
|
||||
width: 24,
|
||||
height: 24,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2.5,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(foregroundColor),
|
||||
),
|
||||
)
|
||||
: Text(text),
|
||||
child: isLoading
|
||||
? SizedBox(
|
||||
width: 24,
|
||||
height: 24,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2.5,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(foregroundColor),
|
||||
),
|
||||
)
|
||||
: child ?? Text(text!),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class ROutlinedElevated extends StatefulWidget {
|
||||
this.child,
|
||||
this.width,
|
||||
this.height,
|
||||
});
|
||||
}):assert(text!=null || child != null, 'Either text or child must be provided');
|
||||
|
||||
final String? text;
|
||||
final VoidCallback? onPressed;
|
||||
@@ -120,7 +120,7 @@ class _ROutlinedElevatedState extends State<ROutlinedElevated> {
|
||||
return widget.textStyle ?? AppFonts.yekan20.copyWith(color: AppColor.blueNormal);
|
||||
}),
|
||||
),
|
||||
child: Text(widget.text ?? ''),
|
||||
child: widget.child ?? Text(widget.text ?? ''),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -21,5 +21,6 @@ export 'tabs/new_tab.dart';
|
||||
export 'tabs/r_segment.dart';
|
||||
export 'tabs/tab.dart';
|
||||
export 'vec_widget.dart';
|
||||
export 'list_row_item.dart';
|
||||
//inputs
|
||||
export 'inputs/inputs.dart';
|
||||
|
||||
@@ -17,6 +17,7 @@ class InspectionMapLogic extends GetxController with GetTickerProviderStateMixin
|
||||
RxList<LatLng> markers = <LatLng>[].obs;
|
||||
Timer? _debounceTimer;
|
||||
RxBool isLoading = false.obs;
|
||||
RxBool isSelectedDetailsLocation = false.obs;
|
||||
|
||||
RxInt filterIndex = 0.obs;
|
||||
RxInt showIndex = 0.obs;
|
||||
|
||||
@@ -56,7 +56,7 @@ class InspectionMapPage extends GetView<InspectionMapLogic> {
|
||||
marker: e,
|
||||
onTap: () {
|
||||
Get.bottomSheet(
|
||||
selectedLocationWidget(
|
||||
selectedLocationWidget2(
|
||||
showHint: false,
|
||||
sliderController: controller.slidController.value,
|
||||
trigger: () {},
|
||||
@@ -107,6 +107,196 @@ class InspectionMapPage extends GetView<InspectionMapLogic> {
|
||||
);
|
||||
}, controller.isLoading);
|
||||
}
|
||||
|
||||
Widget selectedLocationWidget2({
|
||||
required bool showHint,
|
||||
required SlidableController sliderController,
|
||||
required VoidCallback trigger,
|
||||
required VoidCallback toggle,
|
||||
}) {
|
||||
return ObxValue((data) {
|
||||
return BaseBottomSheet(
|
||||
height: data.value ? 450.h : 150.h,
|
||||
child: ListItemWithOutCounter(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'داود خرم مهری پور',
|
||||
style: AppFonts.yekan10.copyWith(color: AppColor.blueNormal),
|
||||
),
|
||||
Text(
|
||||
'گوشت و مرغ',
|
||||
style: AppFonts.yekan12.copyWith(color: AppColor.darkGreyDarkHover),
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text('باقی مانده', style: AppFonts.yekan10.copyWith(color: AppColor.blueNormal)),
|
||||
Text(
|
||||
'0 کیلوگرم',
|
||||
style: AppFonts.yekan12.copyWith(color: AppColor.darkGreyDarkHover),
|
||||
),
|
||||
],
|
||||
),
|
||||
Assets.vec.scanBarcodeSvg.svg(),
|
||||
],
|
||||
),
|
||||
secondChild: Column(
|
||||
spacing: 8,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Column(
|
||||
spacing: 8,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'داوود خرم پور',
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.yekan16.copyWith(color: AppColor.greenDark),
|
||||
),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
height: 32.h,
|
||||
padding: EdgeInsets.symmetric(horizontal: 8),
|
||||
decoration: ShapeDecoration(
|
||||
color: AppColor.blueLight,
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(width: 1.w, color: AppColor.blueLightHover),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
spacing: 3,
|
||||
children: [
|
||||
Text(
|
||||
'تاریخ بازرسی',
|
||||
style: AppFonts.yekan14.copyWith(color: AppColor.textColor),
|
||||
),
|
||||
|
||||
Text(
|
||||
'1403/12/12',
|
||||
style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
buildRow(
|
||||
title: 'تلفن خریدار',
|
||||
value: '0326598653',
|
||||
valueStyle: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
|
||||
),
|
||||
buildRow(title: 'آخرین فعالیت', value: '1409/12/12'),
|
||||
buildRow(title: 'موجودی', value: '5KG'),
|
||||
buildRow(title: 'فروش رفته', value: '5KG'),
|
||||
],
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
spacing: 7,
|
||||
children: [
|
||||
RElevated(
|
||||
width: 40.h,
|
||||
height: 38.h,
|
||||
backgroundColor: AppColor.greenNormal,
|
||||
child: Assets.vec.messageAddSvg.svg(
|
||||
width: 24.w,
|
||||
height: 24.h,
|
||||
colorFilter: ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
||||
),
|
||||
onPressed: () {},
|
||||
),
|
||||
RElevated(
|
||||
width: 150.w,
|
||||
height: 40.h,
|
||||
backgroundColor: AppColor.blueNormal,
|
||||
onPressed: () {
|
||||
/*controller.setEditData(item);
|
||||
Get.bottomSheet(
|
||||
addOrEditBottomSheet(true),
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
).whenComplete(() {
|
||||
|
||||
});*/
|
||||
},
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
spacing: 8,
|
||||
children: [
|
||||
Assets.vec.mapSvg.svg(
|
||||
width: 24.w,
|
||||
height: 24.h,
|
||||
colorFilter: ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
||||
),
|
||||
Text(
|
||||
'مسیریابی',
|
||||
style: AppFonts.yekan14Bold.copyWith(color: Colors.white),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
ROutlinedElevated(
|
||||
width: 150.w,
|
||||
height: 40.h,
|
||||
onPressed: () {
|
||||
buildDeleteDialog(
|
||||
onConfirm: () async {
|
||||
// controller.denyAllocation(item.key ?? '');
|
||||
//await controller.deleteAllocation(item);
|
||||
},
|
||||
onRefresh: () async {},
|
||||
);
|
||||
},
|
||||
borderColor: AppColor.bgIcon,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
spacing: 8,
|
||||
children: [
|
||||
Assets.vec.securityTimeSvg.svg(
|
||||
width: 24.w,
|
||||
height: 24.h,
|
||||
colorFilter: ColorFilter.mode(AppColor.bgIcon, BlendMode.srcIn),
|
||||
),
|
||||
Text(
|
||||
'سوابق بازرسی',
|
||||
style: AppFonts.yekan14Bold.copyWith(color: AppColor.bgIcon),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
labelColor: AppColor.blueLight,
|
||||
labelIcon: Assets.vec.cowSvg.path,
|
||||
labelIconColor: AppColor.bgIcon,
|
||||
onTap: () => data.value = !data.value,
|
||||
selected: data.value,
|
||||
),
|
||||
);
|
||||
}, controller.isSelectedDetailsLocation);
|
||||
}
|
||||
}
|
||||
|
||||
Marker markerWidget({required LatLng marker, required VoidCallback onTap}) {
|
||||
@@ -652,69 +842,3 @@ Widget selectedLocationWidget({
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget selectedLocationWidget2({
|
||||
required bool showHint,
|
||||
required SlidableController sliderController,
|
||||
required VoidCallback trigger,
|
||||
required VoidCallback toggle,
|
||||
}) {
|
||||
if (showHint) {
|
||||
trigger.call();
|
||||
}
|
||||
return BaseBottomSheet(
|
||||
height: 150.h,
|
||||
child: ListItem(
|
||||
index: 0,
|
||||
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),
|
||||
),
|
||||
],
|
||||
),
|
||||
Assets.vec.scanBarcodeSvg.svg(),
|
||||
],
|
||||
),
|
||||
) ,
|
||||
secondChild: Container(
|
||||
height: 350.h,
|
||||
color: Colors.redAccent,
|
||||
),
|
||||
labelColor: Colors.blue,
|
||||
labelIcon: Assets.vec.mapSvg.path,
|
||||
onTap: () {
|
||||
|
||||
},
|
||||
selected: true,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -126,6 +126,107 @@ class ListItem extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
class ListItemWithOutCounter extends StatelessWidget {
|
||||
const ListItemWithOutCounter({
|
||||
super.key,
|
||||
required this.child,
|
||||
required this.secondChild,
|
||||
required this.labelColor,
|
||||
required this.labelIcon,
|
||||
required this.onTap,
|
||||
required this.selected,
|
||||
this.labelIconColor = AppColor.mediumGreyDarkHover,
|
||||
});
|
||||
|
||||
final Widget child;
|
||||
final Widget secondChild;
|
||||
final Color labelColor;
|
||||
final String labelIcon;
|
||||
final Color? labelIconColor;
|
||||
final VoidCallback onTap;
|
||||
final bool selected;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: onTap,
|
||||
child: Container(
|
||||
width: Get.width,
|
||||
margin: const EdgeInsets.fromLTRB(0, 0, 10, 0),
|
||||
decoration: BoxDecoration(
|
||||
color: labelColor,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(width: 1, color: AppColor.lightGreyNormalHover),
|
||||
),
|
||||
child: AnimatedSize(
|
||||
duration: Duration(milliseconds: 400),
|
||||
alignment: Alignment.center,
|
||||
child: AnimatedSize(
|
||||
duration: Duration(milliseconds: 300),
|
||||
child: Container(
|
||||
width: Get.width - 30,
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: AnimatedCrossFade(
|
||||
alignment: Alignment.center,
|
||||
firstChild: Container(
|
||||
height: 75,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.zero,
|
||||
bottomRight: Radius.circular(8),
|
||||
topLeft: Radius.zero,
|
||||
topRight: Radius.circular(8),
|
||||
),
|
||||
),
|
||||
clipBehavior: Clip.antiAlias,
|
||||
child: child,
|
||||
),
|
||||
secondChild: Container(
|
||||
padding: EdgeInsets.all(8),
|
||||
clipBehavior: Clip.antiAlias,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: secondChild,
|
||||
),
|
||||
crossFadeState: selected
|
||||
? CrossFadeState.showSecond
|
||||
: CrossFadeState.showFirst,
|
||||
duration: Duration(milliseconds: 300),
|
||||
),
|
||||
),
|
||||
Visibility(
|
||||
visible: selected==false,
|
||||
child: Container(
|
||||
width: 20,
|
||||
child: Center(
|
||||
child: SvgGenImage.vec(labelIcon).svg(
|
||||
width: 16.w,
|
||||
height: 16.h,
|
||||
colorFilter: ColorFilter.mode(labelColor, BlendMode.srcIn),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ListItem2 extends StatelessWidget {
|
||||
const ListItem2({
|
||||
super.key,
|
||||
|
||||
Reference in New Issue
Block a user