diff --git a/packages/chicken/lib/presentation/pages/poultry_science/home/view.dart b/packages/chicken/lib/presentation/pages/poultry_science/home/view.dart index 25e970e..6efa151 100644 --- a/packages/chicken/lib/presentation/pages/poultry_science/home/view.dart +++ b/packages/chicken/lib/presentation/pages/poultry_science/home/view.dart @@ -43,38 +43,15 @@ class PoultryScienceHomePage extends GetView { 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) - ), - ), + ], ), ), ); } + + Padding mainItemWidget() { return Padding( padding: const EdgeInsets.all(8.0), diff --git a/packages/core/lib/presentation/widget/vec_widget.dart b/packages/core/lib/presentation/widget/vec_widget.dart index 12bcda6..59f087b 100644 --- a/packages/core/lib/presentation/widget/vec_widget.dart +++ b/packages/core/lib/presentation/widget/vec_widget.dart @@ -1,23 +1,16 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:rasadyar_core/presentation/common/app_color.dart'; -import 'package:rasadyar_core/presentation/utils/color_utils.dart'; import 'package:vector_graphics/vector_graphics.dart'; -SvgPicture vecWidget( - String assets, { - double? width, - double? height, - BoxFit? fit, - Color? color, -}) { +import '../common/assets.gen.dart'; + +SvgPicture vecWidget(String assets, {double? width, double? height, BoxFit? fit, Color? color}) { return SvgPicture( AssetBytesLoader(assets), width: width, height: height, fit: fit ?? BoxFit.contain, - colorFilter: - color != null ? ColorFilter.mode(color, BlendMode.srcIn) : null, + colorFilter: color != null ? ColorFilter.mode(color, BlendMode.srcIn) : null, ); } @@ -29,36 +22,20 @@ Widget vecWidgetWithOnTap({ BoxFit? fit, Color? color, }) { - return InkWell( - onTap: onTap, - child: child - ); + return InkWell(onTap: onTap, child: child); } -SvgPicture svgWidget( - String assets, { - double? width, - double? height, - BoxFit? fit, - Color? color, -}) { +SvgPicture svgWidget(String assets, {double? width, double? height, BoxFit? fit, Color? color}) { return SvgPicture.asset( assets, width: width, height: height, fit: fit ?? BoxFit.contain, - colorFilter: - color != null ? ColorFilter.mode(color, BlendMode.srcIn) : null, + colorFilter: color != null ? ColorFilter.mode(color, BlendMode.srcIn) : null, ); } -Widget vecWidget2( - String assets, { - double? width, - double? height, - BoxFit? fit, - Color? color, -}) { +Widget vecWidget2(String assets, {double? width, double? height, BoxFit? fit, Color? color}) { final resolvedColor = WidgetStateProperty.resolveWith((states) { if (states.contains(WidgetState.pressed)) { return Colors.white; @@ -73,11 +50,37 @@ Widget vecWidget2( width: width, height: height, fit: fit ?? BoxFit.contain, - colorFilter: - resolvedColor != null - ? ColorFilter.mode(resolvedColor, BlendMode.srcIn) - : null, + colorFilter: resolvedColor != null ? ColorFilter.mode(resolvedColor, BlendMode.srcIn) : null, ), ); } +SizedBox iconBlendTester(String vecPath) { + return 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: SvgGenImage.vec(vecPath).svg( + width: 50, + height: 50, + colorFilter: ColorFilter.mode(Colors.red, BlendMode.values[index]), + ), + ), + ], + ); + }, + separatorBuilder: (BuildContext context, int index) => SizedBox(width: 10), + ), + ); +}