feat : new map page item

onTap location
This commit is contained in:
2025-07-26 09:36:07 +03:30
parent 8a4d55f6e9
commit ad456d5855
20 changed files with 335 additions and 98 deletions

View File

@@ -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,

View File

@@ -51,7 +51,7 @@ class BaseBottomSheet extends StatelessWidget {
],
),
),
SizedBox(height: 2),
SizedBox(height:8),
Expanded(child: SingleChildScrollView(child: child)),
],
),

View File

@@ -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!),
);
}
}

View File

@@ -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 ?? ''),
),
);
}

View File

@@ -0,0 +1,74 @@
import 'package:flutter/material.dart';
import 'package:rasadyar_core/core.dart';
Widget buildRow({
required String title,
required String value,
TextStyle? titleStyle,
TextStyle? valueStyle,
}) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 4.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Flexible(
flex: 2,
child: Text(
title,
textAlign: TextAlign.right,
style: titleStyle ?? AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
),
),
Flexible(
flex: 2,
child: Text(
value,
textAlign: TextAlign.left,
style: valueStyle ?? AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
),
),
],
),
);
}
Widget buildRowOnTapped({
String? title,
String? value,
Widget? titleWidget,
Widget? valueWidget,
TextStyle? titleStyle,
TextStyle? valueStyle,
required VoidCallback onTap,
}) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 4.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Flexible(
flex: 2,
child: titleWidget ??
Text(
title ?? 'N/A',
textAlign: TextAlign.right,
style: titleStyle ?? AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
),
),
Flexible(
flex: 2,
child: GestureDetector(
onTap: onTap,
child: valueWidget ??
Text(
value ?? 'N/A',
textAlign: TextAlign.left,
style: valueStyle ?? AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
),
),
),
],
),
);
}

View File

@@ -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';