fix: ui changes steward
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
Widget labelItem({required String label, String? value, String? unit}) {
|
||||
Widget labelItem({required String label, String? value, String? unit, VoidCallback? onTap}) {
|
||||
String getLabelText(String? value, String? unit) {
|
||||
if (value != null && unit != null) {
|
||||
return '$value ($unit)';
|
||||
@@ -12,44 +12,47 @@ Widget labelItem({required String label, String? value, String? unit}) {
|
||||
}
|
||||
}
|
||||
|
||||
return Container(
|
||||
height: 49.h,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
padding: EdgeInsets.fromLTRB(8.w, 7.h, 8.w, 7.h),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(width: 1, color: const Color(0xFFB9B9B9)),
|
||||
),
|
||||
child: Column(
|
||||
spacing: 6,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
spacing: 4,
|
||||
children: [
|
||||
Text(
|
||||
label,
|
||||
textAlign: TextAlign.right,
|
||||
style: AppFonts.yekan10.copyWith(color: AppColor.unselectTextColor),
|
||||
),
|
||||
return GestureDetector(
|
||||
onTap: onTap,
|
||||
child: Container(
|
||||
height: 49.h,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
padding: EdgeInsets.fromLTRB(8.w, 7.h, 8.w, 7.h),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(width: 1, color: const Color(0xFFB9B9B9)),
|
||||
),
|
||||
child: Column(
|
||||
spacing: 6,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
spacing: 4,
|
||||
children: [
|
||||
Text(
|
||||
label,
|
||||
textAlign: TextAlign.right,
|
||||
style: AppFonts.yekan10.copyWith(color: AppColor.unselectTextColor),
|
||||
),
|
||||
|
||||
Assets.vec.arrowLeftSvg.svg(
|
||||
width: 10.w,
|
||||
height: 10.h,
|
||||
colorFilter: ColorFilter.mode(AppColor.unselectTextColor, BlendMode.srcIn),
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
getLabelText(value, unit),
|
||||
textAlign: TextAlign.right,
|
||||
style: AppFonts.yekan10.copyWith(color: AppColor.iconColor),
|
||||
),
|
||||
],
|
||||
Assets.vec.arrowLeftSvg.svg(
|
||||
width: 10.w,
|
||||
height: 10.h,
|
||||
colorFilter: ColorFilter.mode(AppColor.unselectTextColor, BlendMode.srcIn),
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
getLabelText(value, unit),
|
||||
textAlign: TextAlign.right,
|
||||
style: AppFonts.yekan10.copyWith(color: AppColor.iconColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user