feat : content list

This commit is contained in:
2025-05-27 14:31:50 +03:30
parent a3327dd708
commit b935f3f12a
6 changed files with 223 additions and 107 deletions

View File

@@ -123,6 +123,9 @@ class $AssetsIconsGen {
/// File path: assets/icons/user_square.svg
SvgGenImage get userSquare => const SvgGenImage('assets/icons/user_square.svg');
/// File path: assets/icons/virtual_tag.svg
SvgGenImage get virtualTag => const SvgGenImage('assets/icons/virtual_tag.svg');
/// List of all assets
List<SvgGenImage> get values => [
add,
@@ -161,6 +164,7 @@ class $AssetsIconsGen {
trash,
user,
userSquare,
virtualTag,
];
}
@@ -252,6 +256,9 @@ class $AssetsVecGen {
/// File path: assets/vec/picture_frame.svg.vec
SvgGenImage get pictureFrameSvg => const SvgGenImage.vec('assets/vec/picture_frame.svg.vec');
/// File path: assets/vec/place_holder.svg.vec
SvgGenImage get placeHolderSvg => const SvgGenImage.vec('assets/vec/place_holder.svg.vec');
/// File path: assets/vec/profile_circle.svg.vec
SvgGenImage get profileCircleSvg => const SvgGenImage.vec('assets/vec/profile_circle.svg.vec');
@@ -288,6 +295,9 @@ class $AssetsVecGen {
/// File path: assets/vec/user_square.svg.vec
SvgGenImage get userSquareSvg => const SvgGenImage.vec('assets/vec/user_square.svg.vec');
/// File path: assets/vec/virtual_tag.svg.vec
SvgGenImage get virtualTagSvg => const SvgGenImage.vec('assets/vec/virtual_tag.svg.vec');
/// List of all assets
List<SvgGenImage> get values => [
addSvg,
@@ -313,6 +323,7 @@ class $AssetsVecGen {
messageAddSvg,
pdfDownloadSvg,
pictureFrameSvg,
placeHolderSvg,
profileCircleSvg,
profileUserSvg,
receiptDiscountSvg,
@@ -325,6 +336,7 @@ class $AssetsVecGen {
trashSvg,
userSvg,
userSquareSvg,
virtualTagSvg,
];
}

View File

@@ -37,10 +37,7 @@ class TaggingPage extends GetView<TaggingLogic> {
SizedBox(width: 4),
IconButton(
onPressed: () {
Get.bottomSheet(
_buildBottomSheet(),
isScrollControlled: true,
);
Get.bottomSheet(_buildBottomSheet(), isScrollControlled: true);
},
style: IconButton.styleFrom(
backgroundColor: AppColor.blueNormal,
@@ -53,78 +50,139 @@ class TaggingPage extends GetView<TaggingLogic> {
),
Expanded(
child: Card(
clipBehavior: Clip.hardEdge,
color: Colors.white,
child: GridView.builder(
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10),
itemCount: 20,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
crossAxisSpacing: 12,
mainAxisSpacing: 8,
),
itemBuilder: (context, index) {
return Container(
decoration: ShapeDecoration(
color: AppColor.lightGreyLightHover,
shape: RoundedRectangleBorder(
side: BorderSide(width: 1, color: AppColor.blackLightHover),
borderRadius: BorderRadius.circular(8),
),
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
child: ListView.separated(
padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10),
itemCount: 20,
itemBuilder: (context, index) {
return Container(
width: Get.width,
height: 85,
decoration: BoxDecoration(
color:
index < 5
? AppColor.yellowNormal
: index < 12
? AppColor.greenLightActive
: AppColor.blueLight,
borderRadius: BorderRadius.circular(8),
),
child: Row(
children: [
SizedBox(width: 5),
Expanded(
child: Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topRight: Radius.circular(8),
bottomRight: Radius.circular(8),
),
border: Border.all(
color:
index < 5
? AppColor.yellowNormal
: index < 12
? AppColor.greenLightActive
: AppColor.blueLight,
width: 2,
),
),
child: Column(
children: [
Assets.vec.editSvg.svg(
width: 16,
height: 16,
colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn),
),
Assets.vec.trashSvg.svg(
width: 16,
height: 16,
colorFilter: ColorFilter.mode(AppColor.error, BlendMode.srcIn),
),
SizedBox(height: 10),
Expanded(child: Row(
children: [
SizedBox(width: 10,),
Container(
padding: EdgeInsets.all(8),
alignment: AlignmentDirectional.center,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.black54,),
child: Text((index+1).toString(),style: AppFonts.yekan18.copyWith(color: Colors.white),),
),
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Container(
padding: EdgeInsets.all(8),
alignment: AlignmentDirectional.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.black26,),
child: Text('ماده',style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark),),
),
Container(
padding: EdgeInsets.all(8),
alignment: AlignmentDirectional.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.black26,),
child: Text('18 ماه',style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark),),
),
Container(
padding: EdgeInsets.all(8),
alignment: AlignmentDirectional.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.black26,),
child: Text('سرابی',style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark),),
),
],
),
),
],
)),
SizedBox(height: 10),
Expanded(child:
Row(
children: [
SizedBox(width: 10,),
Text('پلاک : 1212115112512', style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark)),
Spacer(),
Assets.vec.editSvg.svg(
width: 24,
height: 24,
colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn),
),
SizedBox(width: 10),
Assets.vec.trashSvg.svg(
width: 24,
height: 24,
colorFilter: ColorFilter.mode(AppColor.error, BlendMode.srcIn)),
SizedBox(width: 10,),
],
)),
],
),
Text(
'گوسفند ماده',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
),
SizedBox(height: 10),
Text(
'سن : 18 ماه',
textAlign: TextAlign.center,
style: AppFonts.yekan12.copyWith(color: AppColor.darkGreyNormal),
),
Text(
'نوع نژاد',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(color: AppColor.bgDark),
),
Text(
'1212115112512',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
),
Text(
'نوع پلاک',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(color: AppColor.bgDark),
),
],
),
),
),
);
},
),
Container(
width: 20,
child: Center(
child: RotatedBox(
quarterTurns: 3,
child: Text(
index < 5
? 'گاو'
: index < 12
? 'گوسفند'
: 'مرغ',
style: AppFonts.yekan8,
textAlign: TextAlign.center,
),
),
),
),
],
),
);
}, separatorBuilder: (BuildContext context, int index) =>SizedBox(height: 4,)
),
),
@@ -144,6 +202,85 @@ class TaggingPage extends GetView<TaggingLogic> {
);
}
Widget _buildOldPage() {
return Expanded(
child: Card(
clipBehavior: Clip.hardEdge,
color: Colors.white,
child: GridView.builder(
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10),
itemCount: 20,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
crossAxisSpacing: 12,
mainAxisSpacing: 8,
),
itemBuilder: (context, index) {
return Container(
decoration: ShapeDecoration(
color: AppColor.lightGreyLightHover,
shape: RoundedRectangleBorder(
side: BorderSide(width: 1, color: AppColor.blackLightHover),
borderRadius: BorderRadius.circular(8),
),
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Assets.vec.editSvg.svg(
width: 16,
height: 16,
colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn),
),
Assets.vec.trashSvg.svg(
width: 16,
height: 16,
colorFilter: ColorFilter.mode(AppColor.error, BlendMode.srcIn),
),
],
),
Text(
'گوسفند ماده',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
),
SizedBox(height: 10),
Text(
'سن : 18 ماه',
textAlign: TextAlign.center,
style: AppFonts.yekan12.copyWith(color: AppColor.darkGreyNormal),
),
Text(
'نوع نژاد',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(color: AppColor.bgDark),
),
Text(
'1212115112512',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
),
Text(
'نوع پلاک',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(color: AppColor.bgDark),
),
],
),
),
);
},
),
),
);
}
Widget _buildBottomSheet() {
return BaseBottomSheet(
child: Column(