fix : PoultryScienceHomeLogic colors
This commit is contained in:
@@ -14,8 +14,8 @@ class PoultryScienceHomeLogic extends GetxController {
|
||||
InformationTagData(
|
||||
labelTitle: 'کل فارم ها',
|
||||
isLoading: true,
|
||||
labelVecIcon: Assets.vec.cubeSearchSvg.path,
|
||||
iconColor: AppColor.blueNormal,
|
||||
labelVecIcon: Assets.vec.cubeScanSvg.path,
|
||||
blendMode: BlendMode.dst,
|
||||
valueBgColor: Colors.white,
|
||||
labelGradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
@@ -27,7 +27,7 @@ class PoultryScienceHomeLogic extends GetxController {
|
||||
labelTitle: 'تعداد جوجه ریزی',
|
||||
isLoading: true,
|
||||
labelVecIcon: Assets.vec.cubeCardSvg.path,
|
||||
iconColor: AppColor.blueNormal,
|
||||
blendMode: BlendMode.dst,
|
||||
valueBgColor: Colors.white,
|
||||
labelGradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
@@ -42,18 +42,17 @@ class PoultryScienceHomeLogic extends GetxController {
|
||||
unit: 'قطعه',
|
||||
isLoading: true,
|
||||
labelVecIcon: Assets.vec.hashtagSvg.path,
|
||||
iconColor: const Color(0xFF426060),
|
||||
labelBgColor: const Color(0xFFA5D1D2),
|
||||
valueBgColor: const Color(0xFFC7DFE0),
|
||||
iconColor: const Color(0xFF6C5D60),
|
||||
labelBgColor: const Color(0xFFDDC0C7),
|
||||
valueBgColor: const Color(0xFFEDDCE0),
|
||||
),
|
||||
InformationTagData(
|
||||
labelTitle: 'مانده در سالن',
|
||||
unit: 'قطعه',
|
||||
isLoading: true,
|
||||
labelVecIcon: Assets.vec.homeHashtagSvg.path,
|
||||
iconColor: Color(0xFF5C4D64),
|
||||
labelBgColor: Color(0xFFC8B8D1),
|
||||
valueBgColor: Color(0xFFDAD4DD),
|
||||
labelBgColor: const Color(0xFFAFCBFF),
|
||||
valueBgColor: const Color(0xFFCEDFFF),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -63,18 +62,19 @@ class PoultryScienceHomeLogic extends GetxController {
|
||||
unit: 'قطعه',
|
||||
isLoading: true,
|
||||
labelVecIcon: Assets.vec.boxRemoveSvg.path,
|
||||
iconColor: const Color(0xFF6C5D60),
|
||||
labelBgColor: const Color(0xFFDDC0C7),
|
||||
valueBgColor: const Color(0xFFEDDCE0),
|
||||
|
||||
iconColor: const Color(0xFF426060),
|
||||
labelBgColor: const Color(0xFFA5D1D2),
|
||||
valueBgColor: const Color(0xFFC7DFE0),
|
||||
),
|
||||
InformationTagData(
|
||||
labelTitle: 'حجم کشتار شده',
|
||||
unit: 'قطعه',
|
||||
isLoading: true,
|
||||
labelVecIcon: Assets.vec.closeSquareFilledSvg.path,
|
||||
iconColor: Color(0xFF2D5FFF),
|
||||
labelBgColor: const Color(0xFFAFCBFF),
|
||||
valueBgColor: const Color(0xFFCEDFFF),
|
||||
blendMode: BlendMode.dst,
|
||||
labelBgColor: Color(0xFFC8B8D1),
|
||||
valueBgColor: Color(0xFFDAD4DD),
|
||||
),
|
||||
],
|
||||
});
|
||||
@@ -183,7 +183,6 @@ class PoultryScienceHomeLogic extends GetxController {
|
||||
return element;
|
||||
}
|
||||
}).toList();
|
||||
|
||||
}
|
||||
},
|
||||
onError: (error, stackTrace) {},
|
||||
|
||||
@@ -42,6 +42,33 @@ class PoultryScienceHomePage extends GetView<PoultryScienceHomeLogic> {
|
||||
|
||||
widelyWidget(),
|
||||
SizedBox(height: 20),
|
||||
|
||||
SizedBox(
|
||||
height: 150,
|
||||
child: ListView.separated(
|
||||
scrollDirection: Axis.horizontal,
|
||||
itemCount: BlendMode.values.length,
|
||||
itemBuilder: (context, index) {
|
||||
return Column(
|
||||
spacing: 8,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(BlendMode.values[index].toString()),
|
||||
Container(
|
||||
margin: EdgeInsets.all(8),
|
||||
width: 100,
|
||||
height: 100,
|
||||
child: Assets.vec.cubeCardSvg.svg(
|
||||
width: 50,
|
||||
height: 50,
|
||||
colorFilter: ColorFilter.mode(Colors.red, BlendMode.values[index]),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}, separatorBuilder: (BuildContext context, int index) => SizedBox(width: 10)
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -11,6 +11,7 @@ class InformationTagData {
|
||||
final Color? labelTitleColor;
|
||||
final TextStyle? labelTitleStyle;
|
||||
final LinearGradient? labelGradient;
|
||||
final BlendMode? blendMode;
|
||||
final int? widthIcon;
|
||||
final int? heightIcon;
|
||||
|
||||
@@ -53,6 +54,7 @@ class InformationTagData {
|
||||
this.height,
|
||||
this.heightIcon,
|
||||
this.widthIcon,
|
||||
this.blendMode
|
||||
}) : assert(
|
||||
(labelVecIcon != null) ^ (labelSvgIcon != null),
|
||||
'Either labelVecIcon or labelSvgIcon must be provided, but not both.',
|
||||
@@ -90,6 +92,7 @@ class InformationTagData {
|
||||
Color? unitColor,
|
||||
int? width,
|
||||
int? height,
|
||||
BlendMode? blendMode
|
||||
}) {
|
||||
return InformationTagData(
|
||||
labelVecIcon: labelVecIcon ?? this.labelVecIcon,
|
||||
@@ -113,6 +116,7 @@ class InformationTagData {
|
||||
unitColor: unitColor ?? this.unitColor,
|
||||
width: width ?? this.width,
|
||||
height: height ?? this.height,
|
||||
blendMode: blendMode ?? this.blendMode,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -133,7 +137,6 @@ class InformationTag extends StatelessWidget {
|
||||
// Left side with icon and title
|
||||
Expanded(
|
||||
child: Container(
|
||||
|
||||
decoration: BoxDecoration(
|
||||
color: data.labelBgColor,
|
||||
borderRadius: BorderRadius.only(
|
||||
@@ -152,7 +155,7 @@ class InformationTag extends StatelessWidget {
|
||||
height: (data.heightIcon ?? 24).h,
|
||||
colorFilter: ColorFilter.mode(
|
||||
data.iconColor ?? AppColor.mediumGreyDarkActive,
|
||||
BlendMode.srcIn,
|
||||
data.blendMode?? BlendMode.srcIn,
|
||||
),
|
||||
)
|
||||
: SvgGenImage(data.labelSvgIcon!).svg(
|
||||
@@ -160,7 +163,7 @@ class InformationTag extends StatelessWidget {
|
||||
height: (data.heightIcon ?? 24).h,
|
||||
colorFilter: ColorFilter.mode(
|
||||
data.iconColor ?? AppColor.mediumGreyDarkActive,
|
||||
BlendMode.srcIn,
|
||||
data.blendMode?? BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
Visibility(
|
||||
|
||||
Reference in New Issue
Block a user