feat : new ui
This commit is contained in:
@@ -171,6 +171,9 @@ class AppColor {
|
||||
static const Color textColorLight = Color(0xFFB2B2B2);
|
||||
static const Color iconColor = Color(0xFF444444); // #444444 rgb(68, 68, 68)
|
||||
static const Color borderColor = Color(0xFFC7CFCD); // #C7CFCD rgb(199, 207, 205)`
|
||||
static const Color unselectTextColor = Color(0xFF888888); //
|
||||
static const Color accent1 = Color(0xffffe5ce); //
|
||||
|
||||
|
||||
//endregion
|
||||
|
||||
|
||||
@@ -68,6 +68,9 @@ class $AssetsIconsGen {
|
||||
/// File path: assets/icons/calendar_search_outline.svg
|
||||
SvgGenImage get calendarSearchOutline => const SvgGenImage('assets/icons/calendar_search_outline.svg');
|
||||
|
||||
/// File path: assets/icons/calendar_tick.svg
|
||||
SvgGenImage get calendarTick => const SvgGenImage('assets/icons/calendar_tick.svg');
|
||||
|
||||
/// File path: assets/icons/call.svg
|
||||
SvgGenImage get call => const SvgGenImage('assets/icons/call.svg');
|
||||
|
||||
@@ -80,6 +83,9 @@ class $AssetsIconsGen {
|
||||
/// File path: assets/icons/chicken.svg
|
||||
SvgGenImage get chicken => const SvgGenImage('assets/icons/chicken.svg');
|
||||
|
||||
/// File path: assets/icons/chicken_house.svg
|
||||
SvgGenImage get chickenHouse => const SvgGenImage('assets/icons/chicken_house.svg');
|
||||
|
||||
/// File path: assets/icons/chicken_map_marker.svg
|
||||
SvgGenImage get chickenMapMarker => const SvgGenImage('assets/icons/chicken_map_marker.svg');
|
||||
|
||||
@@ -149,6 +155,9 @@ class $AssetsIconsGen {
|
||||
/// File path: assets/icons/excel_download.svg
|
||||
SvgGenImage get excelDownload => const SvgGenImage('assets/icons/excel_download.svg');
|
||||
|
||||
/// File path: assets/icons/farm.svg
|
||||
SvgGenImage get farm => const SvgGenImage('assets/icons/farm.svg');
|
||||
|
||||
/// File path: assets/icons/filter.svg
|
||||
SvgGenImage get filter => const SvgGenImage('assets/icons/filter.svg');
|
||||
|
||||
@@ -334,10 +343,12 @@ class $AssetsIconsGen {
|
||||
calendar,
|
||||
calendarSearch,
|
||||
calendarSearchOutline,
|
||||
calendarTick,
|
||||
call,
|
||||
check,
|
||||
checkSquare,
|
||||
chicken,
|
||||
chickenHouse,
|
||||
chickenMapMarker,
|
||||
clipboardEye,
|
||||
clipboardTask,
|
||||
@@ -361,6 +372,7 @@ class $AssetsIconsGen {
|
||||
edit,
|
||||
empty,
|
||||
excelDownload,
|
||||
farm,
|
||||
filter,
|
||||
filterOutline,
|
||||
gps,
|
||||
@@ -424,6 +436,9 @@ class $AssetsIconsGen {
|
||||
class $AssetsImagesGen {
|
||||
const $AssetsImagesGen();
|
||||
|
||||
/// File path: assets/images/bg_chicken_pattern.webp
|
||||
AssetGenImage get bgChickenPattern => const AssetGenImage('assets/images/bg_chicken_pattern.webp');
|
||||
|
||||
/// File path: assets/images/chicken.png
|
||||
AssetGenImage get chicken => const AssetGenImage('assets/images/chicken.png');
|
||||
|
||||
@@ -439,20 +454,17 @@ class $AssetsImagesGen {
|
||||
/// File path: assets/images/place_holder.png
|
||||
AssetGenImage get placeHolder => const AssetGenImage('assets/images/place_holder.png');
|
||||
|
||||
/// File path: assets/images/poultry_action.webp
|
||||
AssetGenImage get poultryAction => const AssetGenImage('assets/images/poultry_action.webp');
|
||||
|
||||
/// File path: assets/images/select_role.webp
|
||||
AssetGenImage get selectRole => const AssetGenImage('assets/images/select_role.webp');
|
||||
|
||||
/// List of all assets
|
||||
List<AssetGenImage> get values => [
|
||||
bgChickenPattern,
|
||||
chicken,
|
||||
innerSplash,
|
||||
liveChicken,
|
||||
outterSplash,
|
||||
placeHolder,
|
||||
poultryAction,
|
||||
selectRole,
|
||||
];
|
||||
}
|
||||
@@ -516,6 +528,9 @@ class $AssetsVecGen {
|
||||
/// File path: assets/vec/calendar_search_outline.svg.vec
|
||||
SvgGenImage get calendarSearchOutlineSvg => const SvgGenImage.vec('assets/vec/calendar_search_outline.svg.vec');
|
||||
|
||||
/// File path: assets/vec/calendar_tick.svg.vec
|
||||
SvgGenImage get calendarTickSvg => const SvgGenImage.vec('assets/vec/calendar_tick.svg.vec');
|
||||
|
||||
/// File path: assets/vec/call.svg.vec
|
||||
SvgGenImage get callSvg => const SvgGenImage.vec('assets/vec/call.svg.vec');
|
||||
|
||||
@@ -528,6 +543,9 @@ class $AssetsVecGen {
|
||||
/// File path: assets/vec/chicken.svg.vec
|
||||
SvgGenImage get chickenSvg => const SvgGenImage.vec('assets/vec/chicken.svg.vec');
|
||||
|
||||
/// File path: assets/vec/chicken_house.svg.vec
|
||||
SvgGenImage get chickenHouseSvg => const SvgGenImage.vec('assets/vec/chicken_house.svg.vec');
|
||||
|
||||
/// File path: assets/vec/chicken_map_marker.svg.vec
|
||||
SvgGenImage get chickenMapMarkerSvg => const SvgGenImage.vec('assets/vec/chicken_map_marker.svg.vec');
|
||||
|
||||
@@ -597,6 +615,9 @@ class $AssetsVecGen {
|
||||
/// File path: assets/vec/excel_download.svg.vec
|
||||
SvgGenImage get excelDownloadSvg => const SvgGenImage.vec('assets/vec/excel_download.svg.vec');
|
||||
|
||||
/// File path: assets/vec/farm.svg.vec
|
||||
SvgGenImage get farmSvg => const SvgGenImage.vec('assets/vec/farm.svg.vec');
|
||||
|
||||
/// File path: assets/vec/filter.svg.vec
|
||||
SvgGenImage get filterSvg => const SvgGenImage.vec('assets/vec/filter.svg.vec');
|
||||
|
||||
@@ -782,10 +803,12 @@ class $AssetsVecGen {
|
||||
calendarSvg,
|
||||
calendarSearchSvg,
|
||||
calendarSearchOutlineSvg,
|
||||
calendarTickSvg,
|
||||
callSvg,
|
||||
checkSvg,
|
||||
checkSquareSvg,
|
||||
chickenSvg,
|
||||
chickenHouseSvg,
|
||||
chickenMapMarkerSvg,
|
||||
clipboardEyeSvg,
|
||||
clipboardTaskSvg,
|
||||
@@ -809,6 +832,7 @@ class $AssetsVecGen {
|
||||
editSvg,
|
||||
emptySvg,
|
||||
excelDownloadSvg,
|
||||
farmSvg,
|
||||
filterSvg,
|
||||
filterOutlineSvg,
|
||||
gpsSvg,
|
||||
|
||||
@@ -20,7 +20,7 @@ class CardIcon extends StatelessWidget {
|
||||
this.borderWidth = 1,
|
||||
this.iconWidth = 48,
|
||||
this.iconHeight = 48,
|
||||
this.iconColor ,
|
||||
this.iconColor,
|
||||
}) : assert((svgIcon != null) || (vecIcon != null), 'Either svgIcon or vecIcon must be provided');
|
||||
|
||||
final String title;
|
||||
@@ -39,10 +39,11 @@ class CardIcon extends StatelessWidget {
|
||||
|
||||
final double width;
|
||||
final double height;
|
||||
|
||||
//icon
|
||||
final double iconWidth;
|
||||
final double iconHeight;
|
||||
final Color? iconColor ;
|
||||
final Color? iconColor;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -67,13 +68,17 @@ class CardIcon extends StatelessWidget {
|
||||
fit: BoxFit.cover,
|
||||
width: iconWidth.w,
|
||||
height: iconHeight.h,
|
||||
colorFilter: iconColor!= null ? ColorFilter.mode(iconColor!, BlendMode.srcIn) : null,
|
||||
colorFilter: iconColor != null
|
||||
? ColorFilter.mode(iconColor!, BlendMode.srcIn)
|
||||
: null,
|
||||
)
|
||||
: SvgGenImage.vec(vecIcon!).svg(
|
||||
fit: BoxFit.fill,
|
||||
width: iconWidth.w,
|
||||
height: iconHeight.h,
|
||||
colorFilter: iconColor!= null ? ColorFilter.mode(iconColor!, BlendMode.srcIn) : null,
|
||||
colorFilter: iconColor != null
|
||||
? ColorFilter.mode(iconColor!, BlendMode.srcIn)
|
||||
: null,
|
||||
),
|
||||
Text(
|
||||
title,
|
||||
@@ -86,3 +91,146 @@ class CardIcon extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class GlassMorphismCardIcon extends StatelessWidget {
|
||||
const GlassMorphismCardIcon({
|
||||
super.key,
|
||||
required this.title,
|
||||
this.svgIcon,
|
||||
|
||||
this.vecIcon,
|
||||
this.onTap,
|
||||
this.titleColor = AppColor.iconColor,
|
||||
this.spacing = 20,
|
||||
this.titleStyle,
|
||||
this.borderColor = AppColor.blueNormal,
|
||||
this.backgroundColor = Colors.white,
|
||||
this.borderRadius = 35,
|
||||
this.width = 180,
|
||||
this.labelHeight = 80,
|
||||
this.height = 180,
|
||||
this.borderWidth = 1,
|
||||
this.iconWidth = 48,
|
||||
this.iconHeight = 48,
|
||||
this.iconColor,
|
||||
}) : assert((svgIcon != null) || (vecIcon != null), 'Either svgIcon or vecIcon must be provided');
|
||||
|
||||
final String title;
|
||||
final int spacing;
|
||||
|
||||
final String? svgIcon;
|
||||
final String? vecIcon;
|
||||
final VoidCallback? onTap;
|
||||
final Color titleColor;
|
||||
final TextStyle? titleStyle;
|
||||
|
||||
final Color borderColor;
|
||||
final Color backgroundColor;
|
||||
final double borderRadius;
|
||||
final double borderWidth;
|
||||
|
||||
final double width;
|
||||
final double height;
|
||||
final double labelHeight;
|
||||
|
||||
//icon
|
||||
final double iconWidth;
|
||||
final double iconHeight;
|
||||
final Color? iconColor;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: width.w,
|
||||
height: height.h,
|
||||
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(35.r)),
|
||||
child: InkWell(
|
||||
onTap: onTap,
|
||||
child: Stack(
|
||||
children: [
|
||||
|
||||
Positioned.fill(
|
||||
child: Container(
|
||||
width: width.w,
|
||||
height: height.h,
|
||||
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white54,
|
||||
border: Border.all(width: 1, color: Colors.white),
|
||||
borderRadius: BorderRadius.circular(borderRadius),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black12,
|
||||
blurRadius: 5,
|
||||
offset: Offset(10, 12),
|
||||
),
|
||||
],
|
||||
|
||||
),
|
||||
child: InkWell(
|
||||
onTap: onTap,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(height: labelHeight.h + 35.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8.w),
|
||||
child: Text(
|
||||
title,
|
||||
textAlign: TextAlign.center,
|
||||
style:
|
||||
titleStyle ??
|
||||
AppFonts.yekan20Bold.copyWith(color: titleColor, height: 1.20),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: Container(
|
||||
height: labelHeight.h,
|
||||
width: width.w,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(borderRadius),
|
||||
topRight: Radius.circular(borderRadius),
|
||||
),
|
||||
gradient: LinearGradient(
|
||||
colors: [Color(0xff00b6bc), Color(0xff003ae0)],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
),
|
||||
),
|
||||
child: Center(
|
||||
child: svgIcon != null
|
||||
? SvgGenImage(svgIcon!).svg(
|
||||
fit: BoxFit.cover,
|
||||
width: iconWidth.w,
|
||||
height: iconHeight.h,
|
||||
colorFilter: ColorFilter.mode(iconColor ?? Colors.white, BlendMode.srcIn),
|
||||
)
|
||||
: SvgGenImage.vec(vecIcon!).svg(
|
||||
fit: BoxFit.fill,
|
||||
width: iconWidth.w,
|
||||
height: iconHeight.h,
|
||||
colorFilter: ColorFilter.mode(iconColor ?? Colors.white, BlendMode.srcIn),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class TitleCheckBox extends StatelessWidget {
|
||||
const TitleCheckBox({
|
||||
super.key,
|
||||
this.selectedColor,
|
||||
this.unSelectedColor,
|
||||
required this.title,
|
||||
required this.isSelected,
|
||||
required this.onChanged,
|
||||
});
|
||||
|
||||
final Color? selectedColor;
|
||||
final Color? unSelectedColor;
|
||||
final String title;
|
||||
final bool isSelected;
|
||||
final Function(bool?) onChanged;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
onChanged(!isSelected);
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Checkbox(
|
||||
value: isSelected,
|
||||
onChanged: onChanged,
|
||||
activeColor: selectedColor ?? AppColor.blueNormal,
|
||||
visualDensity: VisualDensity.compact,
|
||||
side: BorderSide(width: 1.w, color: AppColor.unselectTextColor),
|
||||
),
|
||||
Text(
|
||||
title,
|
||||
style: isSelected
|
||||
? AppFonts.yekan14Bold.copyWith(color: AppColor.blueNormal)
|
||||
: AppFonts.yekan12.copyWith(color: AppColor.unselectTextColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -82,9 +82,10 @@ Widget buildUnitRow({
|
||||
TextStyle? titleStyle,
|
||||
TextStyle? valueStyle,
|
||||
TextStyle? unitStyle,
|
||||
EdgeInsetsGeometry? padding,
|
||||
}) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 4.0),
|
||||
padding: padding ?? const EdgeInsets.symmetric(vertical: 4.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
||||
@@ -3,6 +3,7 @@ export 'bottom_navigation/r_bottom_navigation.dart';
|
||||
export 'bottom_navigation/wave_bottom_navigation.dart';
|
||||
export 'bottom_sheet/base_bottom_sheet.dart';
|
||||
export 'bottom_sheet/date_picker_bottom_sheet.dart';
|
||||
export 'check_box/check_box_widget.dart';
|
||||
//buttons
|
||||
export 'buttons/buttons.dart';
|
||||
export 'card/card_icon_widget.dart';
|
||||
|
||||
Reference in New Issue
Block a user