1 - multi module in Auth select save selected module
 2 - add flutter gen for assets builder
This commit is contained in:
2025-05-19 16:16:33 +03:30
parent 982329a3eb
commit 905e407ccd
46 changed files with 1431 additions and 407 deletions

View File

@@ -1,5 +1,6 @@
library;
//other packages
export 'package:flutter_localizations/flutter_localizations.dart';
export 'package:flutter_map/flutter_map.dart';
@@ -7,6 +8,7 @@ export 'package:flutter_map_animations/flutter_map_animations.dart';
export 'package:flutter_rating_bar/flutter_rating_bar.dart';
export 'package:flutter_slidable/flutter_slidable.dart';
export 'package:font_awesome_flutter/font_awesome_flutter.dart';
export 'package:hive_ce_flutter/hive_flutter.dart';
//freezed
export 'package:freezed_annotation/freezed_annotation.dart';
export 'package:geolocator/geolocator.dart';

View File

@@ -1,72 +0,0 @@
///This file is automatically generated. DO NOT EDIT, all your changes would be lost.
class Assets {
Assets._();
static const String iconsAdd = 'assets/icons/add.svg';
static const String iconsArrowLeft = 'assets/icons/arrow_left.svg';
static const String iconsArrowRight = 'assets/icons/arrow_right.svg';
static const String iconsBgHeaderUserProfile = 'assets/icons/bg_header_user_profile.svg';
static const String iconsCalendar = 'assets/icons/calendar.svg';
static const String iconsCalendarSearch = 'assets/icons/calendar_search.svg';
static const String iconsCall = 'assets/icons/call.svg';
static const String iconsDiagram = 'assets/icons/diagram.svg';
static const String iconsDownload = 'assets/icons/download.svg';
static const String iconsEdit = 'assets/icons/edit.svg';
static const String iconsExcelDownload = 'assets/icons/excel_download.svg';
static const String iconsFilter = 'assets/icons/filter.svg';
static const String iconsGps = 'assets/icons/gps.svg';
static const String iconsInformation = 'assets/icons/information.svg';
static const String iconsKey = 'assets/icons/key.svg';
static const String iconsLogout = 'assets/icons/logout.svg';
static const String iconsMap = 'assets/icons/map.svg';
static const String iconsMapMarker = 'assets/icons/map_marker.svg';
static const String iconsMessageAdd = 'assets/icons/message_add.svg';
static const String iconsPdfDownload = 'assets/icons/pdf_download.svg';
static const String iconsPictureFrame = 'assets/icons/picture_frame.svg';
static const String iconsProfileCircle = 'assets/icons/profile_circle.svg';
static const String iconsProfileUser = 'assets/icons/profile_user.svg';
static const String iconsReceiptDiscount = 'assets/icons/receipt_discount.svg';
static const String iconsScan = 'assets/icons/scan.svg';
static const String iconsScanBarcode = 'assets/icons/scan_barcode.svg';
static const String iconsSecurityTime = 'assets/icons/security_time.svg';
static const String iconsSetting = 'assets/icons/setting.svg';
static const String iconsTagUser = 'assets/icons/tag_user.svg';
static const String iconsTrash = 'assets/icons/trash.svg';
static const String iconsUser = 'assets/icons/user.svg';
static const String iconsUserSquare = 'assets/icons/user_square.svg';
static const String imagesInnerSplash = 'assets/images/inner_splash.webp';
static const String imagesOutterSplash = 'assets/images/outter_splash.webp';
static const String vecAddSvg = 'assets/vec/add.svg.vec';
static const String vecArrowLeftSvg = 'assets/vec/arrow_left.svg.vec';
static const String vecArrowRightSvg = 'assets/vec/arrow_right.svg.vec';
static const String vecBgHeaderUserProfileSvg = 'assets/vec/bg_header_user_profile.svg.vec';
static const String vecCalendarSearchSvg = 'assets/vec/calendar_search.svg.vec';
static const String vecCalendarSvg = 'assets/vec/calendar.svg.vec';
static const String vecCallSvg = 'assets/vec/call.svg.vec';
static const String vecDiagramSvg = 'assets/vec/diagram.svg.vec';
static const String vecDownloadSvg = 'assets/vec/download.svg.vec';
static const String vecEditSvg = 'assets/vec/edit.svg.vec';
static const String vecExcelDownloadSvg = 'assets/vec/excel_download.svg.vec';
static const String vecFilterSvg = 'assets/vec/filter.svg.vec';
static const String vecGpsSvg = 'assets/vec/gps.svg.vec';
static const String vecInformationSvg = 'assets/vec/information.svg.vec';
static const String vecKeySvg = 'assets/vec/key.svg.vec';
static const String vecLogoutSvg = 'assets/vec/logout.svg.vec';
static const String vecMapMarkerSvg = 'assets/vec/map_marker.svg.vec';
static const String vecMapSvg = 'assets/vec/map.svg.vec';
static const String vecMessageAddSvg = 'assets/vec/message_add.svg.vec';
static const String vecPdfDownloadSvg = 'assets/vec/pdf_download.svg.vec';
static const String vecPictureFrameSvg = 'assets/vec/picture_frame.svg.vec';
static const String vecProfileCircleSvg = 'assets/vec/profile_circle.svg.vec';
static const String vecProfileUserSvg = 'assets/vec/profile_user.svg.vec';
static const String vecReceiptDiscountSvg = 'assets/vec/receipt_discount.svg.vec';
static const String vecScanBarcodeSvg = 'assets/vec/scan_barcode.svg.vec';
static const String vecScanSvg = 'assets/vec/scan.svg.vec';
static const String vecSecurityTimeSvg = 'assets/vec/security_time.svg.vec';
static const String vecSettingSvg = 'assets/vec/setting.svg.vec';
static const String vecTagUserSvg = 'assets/vec/tag_user.svg.vec';
static const String vecTrashSvg = 'assets/vec/trash.svg.vec';
static const String vecUserSquareSvg = 'assets/vec/user_square.svg.vec';
static const String vecUserSvg = 'assets/vec/user.svg.vec';
}

View File

@@ -0,0 +1,451 @@
/// GENERATED CODE - DO NOT MODIFY BY HAND
/// *****************************************************
/// FlutterGen
/// *****************************************************
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_svg/flutter_svg.dart' as _svg;
import 'package:vector_graphics/vector_graphics.dart' as _vg;
class $AssetsIconsGen {
const $AssetsIconsGen();
/// File path: assets/icons/add.svg
SvgGenImage get add => const SvgGenImage('assets/icons/add.svg');
/// File path: assets/icons/arrow_left.svg
SvgGenImage get arrowLeft => const SvgGenImage('assets/icons/arrow_left.svg');
/// File path: assets/icons/arrow_right.svg
SvgGenImage get arrowRight => const SvgGenImage('assets/icons/arrow_right.svg');
/// File path: assets/icons/bg_header_user_profile.svg
SvgGenImage get bgHeaderUserProfile => const SvgGenImage('assets/icons/bg_header_user_profile.svg');
/// File path: assets/icons/calendar.svg
SvgGenImage get calendar => const SvgGenImage('assets/icons/calendar.svg');
/// File path: assets/icons/calendar_search.svg
SvgGenImage get calendarSearch => const SvgGenImage('assets/icons/calendar_search.svg');
/// File path: assets/icons/call.svg
SvgGenImage get call => const SvgGenImage('assets/icons/call.svg');
/// File path: assets/icons/diagram.svg
SvgGenImage get diagram => const SvgGenImage('assets/icons/diagram.svg');
/// File path: assets/icons/download.svg
SvgGenImage get download => const SvgGenImage('assets/icons/download.svg');
/// File path: assets/icons/edit.svg
SvgGenImage get edit => const SvgGenImage('assets/icons/edit.svg');
/// File path: assets/icons/excel_download.svg
SvgGenImage get excelDownload => const SvgGenImage('assets/icons/excel_download.svg');
/// File path: assets/icons/filter.svg
SvgGenImage get filter => const SvgGenImage('assets/icons/filter.svg');
/// File path: assets/icons/gps.svg
SvgGenImage get gps => const SvgGenImage('assets/icons/gps.svg');
/// File path: assets/icons/information.svg
SvgGenImage get information => const SvgGenImage('assets/icons/information.svg');
/// File path: assets/icons/inspection.svg
SvgGenImage get inspection => const SvgGenImage('assets/icons/inspection.svg');
/// File path: assets/icons/key.svg
SvgGenImage get key => const SvgGenImage('assets/icons/key.svg');
/// File path: assets/icons/liveStock.svg
SvgGenImage get liveStock => const SvgGenImage('assets/icons/liveStock.svg');
/// File path: assets/icons/logout.svg
SvgGenImage get logout => const SvgGenImage('assets/icons/logout.svg');
/// File path: assets/icons/map.svg
SvgGenImage get map => const SvgGenImage('assets/icons/map.svg');
/// File path: assets/icons/map_marker.svg
SvgGenImage get mapMarker => const SvgGenImage('assets/icons/map_marker.svg');
/// File path: assets/icons/message_add.svg
SvgGenImage get messageAdd => const SvgGenImage('assets/icons/message_add.svg');
/// File path: assets/icons/pdf_download.svg
SvgGenImage get pdfDownload => const SvgGenImage('assets/icons/pdf_download.svg');
/// File path: assets/icons/picture_frame.svg
SvgGenImage get pictureFrame => const SvgGenImage('assets/icons/picture_frame.svg');
/// File path: assets/icons/profile_circle.svg
SvgGenImage get profileCircle => const SvgGenImage('assets/icons/profile_circle.svg');
/// File path: assets/icons/profile_user.svg
SvgGenImage get profileUser => const SvgGenImage('assets/icons/profile_user.svg');
/// File path: assets/icons/receipt_discount.svg
SvgGenImage get receiptDiscount => const SvgGenImage('assets/icons/receipt_discount.svg');
/// File path: assets/icons/scan.svg
SvgGenImage get scan => const SvgGenImage('assets/icons/scan.svg');
/// File path: assets/icons/scan_barcode.svg
SvgGenImage get scanBarcode => const SvgGenImage('assets/icons/scan_barcode.svg');
/// File path: assets/icons/security_time.svg
SvgGenImage get securityTime => const SvgGenImage('assets/icons/security_time.svg');
/// File path: assets/icons/setting.svg
SvgGenImage get setting => const SvgGenImage('assets/icons/setting.svg');
/// File path: assets/icons/tag_user.svg
SvgGenImage get tagUser => const SvgGenImage('assets/icons/tag_user.svg');
/// File path: assets/icons/trash.svg
SvgGenImage get trash => const SvgGenImage('assets/icons/trash.svg');
/// File path: assets/icons/user.svg
SvgGenImage get user => const SvgGenImage('assets/icons/user.svg');
/// File path: assets/icons/user_square.svg
SvgGenImage get userSquare => const SvgGenImage('assets/icons/user_square.svg');
/// List of all assets
List<SvgGenImage> get values => [
add,
arrowLeft,
arrowRight,
bgHeaderUserProfile,
calendar,
calendarSearch,
call,
diagram,
download,
edit,
excelDownload,
filter,
gps,
information,
inspection,
key,
liveStock,
logout,
map,
mapMarker,
messageAdd,
pdfDownload,
pictureFrame,
profileCircle,
profileUser,
receiptDiscount,
scan,
scanBarcode,
securityTime,
setting,
tagUser,
trash,
user,
userSquare,
];
}
class $AssetsImagesGen {
const $AssetsImagesGen();
/// File path: assets/images/inner_splash.webp
AssetGenImage get innerSplash => const AssetGenImage('assets/images/inner_splash.webp');
/// File path: assets/images/outter_splash.webp
AssetGenImage get outterSplash => const AssetGenImage('assets/images/outter_splash.webp');
/// List of all assets
List<AssetGenImage> get values => [innerSplash, outterSplash];
}
class $AssetsVecGen {
const $AssetsVecGen();
/// File path: assets/vec/add.svg.vec
SvgGenImage get addSvg => const SvgGenImage.vec('assets/vec/add.svg.vec');
/// File path: assets/vec/arrow_left.svg.vec
SvgGenImage get arrowLeftSvg => const SvgGenImage.vec('assets/vec/arrow_left.svg.vec');
/// File path: assets/vec/arrow_right.svg.vec
SvgGenImage get arrowRightSvg => const SvgGenImage.vec('assets/vec/arrow_right.svg.vec');
/// File path: assets/vec/bg_header_user_profile.svg.vec
SvgGenImage get bgHeaderUserProfileSvg => const SvgGenImage.vec('assets/vec/bg_header_user_profile.svg.vec');
/// File path: assets/vec/calendar.svg.vec
SvgGenImage get calendarSvg => const SvgGenImage.vec('assets/vec/calendar.svg.vec');
/// File path: assets/vec/calendar_search.svg.vec
SvgGenImage get calendarSearchSvg => const SvgGenImage.vec('assets/vec/calendar_search.svg.vec');
/// File path: assets/vec/call.svg.vec
SvgGenImage get callSvg => const SvgGenImage.vec('assets/vec/call.svg.vec');
/// File path: assets/vec/diagram.svg.vec
SvgGenImage get diagramSvg => const SvgGenImage.vec('assets/vec/diagram.svg.vec');
/// File path: assets/vec/download.svg.vec
SvgGenImage get downloadSvg => const SvgGenImage.vec('assets/vec/download.svg.vec');
/// File path: assets/vec/edit.svg.vec
SvgGenImage get editSvg => const SvgGenImage.vec('assets/vec/edit.svg.vec');
/// File path: assets/vec/excel_download.svg.vec
SvgGenImage get excelDownloadSvg => const SvgGenImage.vec('assets/vec/excel_download.svg.vec');
/// File path: assets/vec/filter.svg.vec
SvgGenImage get filterSvg => const SvgGenImage.vec('assets/vec/filter.svg.vec');
/// File path: assets/vec/gps.svg.vec
SvgGenImage get gpsSvg => const SvgGenImage.vec('assets/vec/gps.svg.vec');
/// File path: assets/vec/information.svg.vec
SvgGenImage get informationSvg => const SvgGenImage.vec('assets/vec/information.svg.vec');
/// File path: assets/vec/inspection.svg.vec
SvgGenImage get inspectionSvg => const SvgGenImage.vec('assets/vec/inspection.svg.vec');
/// File path: assets/vec/key.svg.vec
SvgGenImage get keySvg => const SvgGenImage.vec('assets/vec/key.svg.vec');
/// File path: assets/vec/liveStock.svg.vec
SvgGenImage get liveStockSvg => const SvgGenImage.vec('assets/vec/liveStock.svg.vec');
/// File path: assets/vec/logout.svg.vec
SvgGenImage get logoutSvg => const SvgGenImage.vec('assets/vec/logout.svg.vec');
/// File path: assets/vec/map.svg.vec
SvgGenImage get mapSvg => const SvgGenImage.vec('assets/vec/map.svg.vec');
/// File path: assets/vec/map_marker.svg.vec
SvgGenImage get mapMarkerSvg => const SvgGenImage.vec('assets/vec/map_marker.svg.vec');
/// File path: assets/vec/message_add.svg.vec
SvgGenImage get messageAddSvg => const SvgGenImage.vec('assets/vec/message_add.svg.vec');
/// File path: assets/vec/pdf_download.svg.vec
SvgGenImage get pdfDownloadSvg => const SvgGenImage.vec('assets/vec/pdf_download.svg.vec');
/// File path: assets/vec/picture_frame.svg.vec
SvgGenImage get pictureFrameSvg => const SvgGenImage.vec('assets/vec/picture_frame.svg.vec');
/// File path: assets/vec/profile_circle.svg.vec
SvgGenImage get profileCircleSvg => const SvgGenImage.vec('assets/vec/profile_circle.svg.vec');
/// File path: assets/vec/profile_user.svg.vec
SvgGenImage get profileUserSvg => const SvgGenImage.vec('assets/vec/profile_user.svg.vec');
/// File path: assets/vec/receipt_discount.svg.vec
SvgGenImage get receiptDiscountSvg => const SvgGenImage.vec('assets/vec/receipt_discount.svg.vec');
/// File path: assets/vec/scan.svg.vec
SvgGenImage get scanSvg => const SvgGenImage.vec('assets/vec/scan.svg.vec');
/// File path: assets/vec/scan_barcode.svg.vec
SvgGenImage get scanBarcodeSvg => const SvgGenImage.vec('assets/vec/scan_barcode.svg.vec');
/// File path: assets/vec/security_time.svg.vec
SvgGenImage get securityTimeSvg => const SvgGenImage.vec('assets/vec/security_time.svg.vec');
/// File path: assets/vec/setting.svg.vec
SvgGenImage get settingSvg => const SvgGenImage.vec('assets/vec/setting.svg.vec');
/// File path: assets/vec/tag_user.svg.vec
SvgGenImage get tagUserSvg => const SvgGenImage.vec('assets/vec/tag_user.svg.vec');
/// File path: assets/vec/trash.svg.vec
SvgGenImage get trashSvg => const SvgGenImage.vec('assets/vec/trash.svg.vec');
/// File path: assets/vec/user.svg.vec
SvgGenImage get userSvg => const SvgGenImage.vec('assets/vec/user.svg.vec');
/// File path: assets/vec/user_square.svg.vec
SvgGenImage get userSquareSvg => const SvgGenImage.vec('assets/vec/user_square.svg.vec');
/// List of all assets
List<SvgGenImage> get values => [
addSvg,
arrowLeftSvg,
arrowRightSvg,
bgHeaderUserProfileSvg,
calendarSvg,
calendarSearchSvg,
callSvg,
diagramSvg,
downloadSvg,
editSvg,
excelDownloadSvg,
filterSvg,
gpsSvg,
informationSvg,
inspectionSvg,
keySvg,
liveStockSvg,
logoutSvg,
mapSvg,
mapMarkerSvg,
messageAddSvg,
pdfDownloadSvg,
pictureFrameSvg,
profileCircleSvg,
profileUserSvg,
receiptDiscountSvg,
scanSvg,
scanBarcodeSvg,
securityTimeSvg,
settingSvg,
tagUserSvg,
trashSvg,
userSvg,
userSquareSvg,
];
}
class Assets {
const Assets._();
static const $AssetsIconsGen icons = $AssetsIconsGen();
static const $AssetsImagesGen images = $AssetsImagesGen();
static const $AssetsVecGen vec = $AssetsVecGen();
}
class AssetGenImage {
const AssetGenImage(this._assetName, {this.size, this.flavors = const {}});
final String _assetName;
final Size? size;
final Set<String> flavors;
Image image({
Key? key,
AssetBundle? bundle,
ImageFrameBuilder? frameBuilder,
ImageErrorWidgetBuilder? errorBuilder,
String? semanticLabel,
bool excludeFromSemantics = false,
double? scale,
double? width,
double? height,
Color? color,
Animation<double>? opacity,
BlendMode? colorBlendMode,
BoxFit? fit,
AlignmentGeometry alignment = Alignment.center,
ImageRepeat repeat = ImageRepeat.noRepeat,
Rect? centerSlice,
bool matchTextDirection = false,
bool gaplessPlayback = true,
bool isAntiAlias = false,
String? package,
FilterQuality filterQuality = FilterQuality.medium,
int? cacheWidth,
int? cacheHeight,
}) {
return Image.asset(
_assetName,
key: key,
bundle: bundle,
frameBuilder: frameBuilder,
errorBuilder: errorBuilder,
semanticLabel: semanticLabel,
excludeFromSemantics: excludeFromSemantics,
scale: scale,
width: width,
height: height,
color: color,
opacity: opacity,
colorBlendMode: colorBlendMode,
fit: fit,
alignment: alignment,
repeat: repeat,
centerSlice: centerSlice,
matchTextDirection: matchTextDirection,
gaplessPlayback: gaplessPlayback,
isAntiAlias: isAntiAlias,
package: package,
filterQuality: filterQuality,
cacheWidth: cacheWidth,
cacheHeight: cacheHeight,
);
}
ImageProvider provider({AssetBundle? bundle, String? package}) {
return AssetImage(_assetName, bundle: bundle, package: package);
}
String get path => _assetName;
String get keyName => _assetName;
}
class SvgGenImage {
const SvgGenImage(this._assetName, {this.size, this.flavors = const {}}) : _isVecFormat = false;
const SvgGenImage.vec(this._assetName, {this.size, this.flavors = const {}}) : _isVecFormat = true;
final String _assetName;
final Size? size;
final Set<String> flavors;
final bool _isVecFormat;
_svg.SvgPicture svg({
Key? key,
bool matchTextDirection = false,
AssetBundle? bundle,
String? package,
double? width,
double? height,
BoxFit fit = BoxFit.contain,
AlignmentGeometry alignment = Alignment.center,
bool allowDrawingOutsideViewBox = false,
WidgetBuilder? placeholderBuilder,
String? semanticsLabel,
bool excludeFromSemantics = false,
_svg.SvgTheme? theme,
ColorFilter? colorFilter,
Clip clipBehavior = Clip.hardEdge,
@deprecated Color? color,
@deprecated BlendMode colorBlendMode = BlendMode.srcIn,
@deprecated bool cacheColorFilter = false,
}) {
final _svg.BytesLoader loader;
if (_isVecFormat) {
loader = _vg.AssetBytesLoader(_assetName, assetBundle: bundle, packageName: package);
} else {
loader = _svg.SvgAssetLoader(_assetName, assetBundle: bundle, packageName: package, theme: theme);
}
return _svg.SvgPicture(
loader,
key: key,
matchTextDirection: matchTextDirection,
width: width,
height: height,
fit: fit,
alignment: alignment,
allowDrawingOutsideViewBox: allowDrawingOutsideViewBox,
placeholderBuilder: placeholderBuilder,
semanticsLabel: semanticsLabel,
excludeFromSemantics: excludeFromSemantics,
colorFilter: colorFilter ?? (color == null ? null : ColorFilter.mode(color, colorBlendMode)),
clipBehavior: clipBehavior,
cacheColorFilter: cacheColorFilter,
);
}
String get path => _assetName;
String get keyName => _assetName;
}

View File

@@ -1,3 +1,3 @@
export 'app_color.dart';
export 'app_fonts.dart';
export 'assets.dart';
export 'assets.gen.dart';

View File

@@ -0,0 +1,15 @@
/// GENERATED CODE - DO NOT MODIFY BY HAND
/// *****************************************************
/// FlutterGen
/// *****************************************************
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use
class FontFamily {
FontFamily._();
/// Font family: yekan
static const String yekan = 'yekan';
}

View File

@@ -3,7 +3,7 @@ import 'package:rasadyar_core/core.dart';
class WaveBottomNavigationItem {
final String title;
final String icon;
final Widget icon;
WaveBottomNavigationItem({required this.title, required this.icon});
}
@@ -112,12 +112,7 @@ class _WaveBottomNavigationState extends State<WaveBottomNavigation> {
children: [
Tooltip(
message: item.title,
child: vecWidget(
item.icon,
color: Colors.white,
width: 32,
height: 32,
),
child: item.icon
),
/* Visibility(

View File

@@ -1,8 +1,7 @@
import 'package:flutter/material.dart';
import 'package:rasadyar_core/presentation/common/app_color.dart';
import 'package:rasadyar_core/presentation/common/assets.dart';
import 'package:rasadyar_core/presentation/utils/color_utils.dart';
import 'package:rasadyar_core/presentation/widget/vec_widget.dart';
import '../../common/assets.gen.dart';
class RFab extends StatefulWidget {
final VoidCallback? onPressed;
@@ -22,7 +21,10 @@ class RFab extends StatefulWidget {
RFab.smallAdd({required VoidCallback? onPressed, Key? key})
: this.small(
onPressed: onPressed,
icon: vecWidget(Assets.vecAddSvg),
icon: Assets.vec.addSvg.svg(
width: 20,
height: 20,
),
backgroundColor: AppColor.greenNormal,
key: key,
);
@@ -30,7 +32,10 @@ class RFab extends StatefulWidget {
RFab.add({required VoidCallback? onPressed, Key? key})
: this(
onPressed: onPressed,
icon: vecWidget(Assets.vecAddSvg),
icon: Assets.vec.addSvg.svg(
width: 20,
height: 20,
),
backgroundColor: AppColor.greenNormal,
key: key,
);
@@ -41,7 +46,10 @@ class RFab extends StatefulWidget {
RFab.smallEdit({required VoidCallback? onPressed, Key? key})
: this.small(
onPressed: onPressed,
icon: vecWidget(Assets.vecEditSvg),
icon: Assets.vec.addSvg.svg(
width: 20,
height: 20,
),
backgroundColor: AppColor.blueNormal,
key: key,
);
@@ -49,7 +57,10 @@ class RFab extends StatefulWidget {
RFab.edit({required VoidCallback? onPressed, Key? key})
: this(
onPressed: onPressed,
icon: vecWidget(Assets.vecEditSvg),
icon: Assets.vec.addSvg.svg(
width: 20,
height: 20,
),
backgroundColor: AppColor.blueNormal,
key: key,
);
@@ -60,7 +71,10 @@ class RFab extends StatefulWidget {
RFab.smallDelete({required VoidCallback? onPressed, Key? key})
: this.small(
onPressed: onPressed,
icon: vecWidget(Assets.vecTrashSvg),
icon: Assets.vec.trashSvg.svg(
width: 20,
height: 20,
),
backgroundColor: AppColor.redNormal,
key: key,
);
@@ -68,7 +82,10 @@ class RFab extends StatefulWidget {
RFab.delete({required VoidCallback? onPressed, Key? key})
: this(
onPressed: onPressed,
icon: vecWidget(Assets.vecTrashSvg),
icon: Assets.vec.trashSvg.svg(
width: 20,
height: 20,
),
backgroundColor: AppColor.redNormal,
key: key,
);
@@ -79,7 +96,10 @@ class RFab extends StatefulWidget {
RFab.smallAction({required VoidCallback? onPressed, Key? key})
: this.small(
onPressed: onPressed,
icon: vecWidget(Assets.vecScanSvg),
icon: Assets.vec.scanSvg.svg(
width: 20,
height: 20,
),
backgroundColor: AppColor.blueNormal,
key: key,
);
@@ -87,7 +107,10 @@ class RFab extends StatefulWidget {
RFab.action({required VoidCallback? onPressed, Key? key})
: this(
onPressed: onPressed,
icon: vecWidget(Assets.vecScanSvg),
icon: Assets.vec.scanSvg.svg(
width: 20,
height: 20,
),
backgroundColor: AppColor.blueNormal,
key: key,
);
@@ -98,7 +121,10 @@ class RFab extends StatefulWidget {
RFab.smallFilter({required VoidCallback? onPressed, Key? key})
: this.small(
onPressed: onPressed,
icon: vecWidget(Assets.vecFilterSvg),
icon: Assets.vec.scanSvg.svg(
width: 20,
height: 20,
),
backgroundColor: AppColor.blueNormal,
key: key,
);
@@ -106,7 +132,10 @@ class RFab extends StatefulWidget {
RFab.filter({required VoidCallback? onPressed, Key? key})
: this(
onPressed: onPressed,
icon: vecWidget(Assets.vecFilterSvg),
icon: Assets.vec.scanSvg.svg(
width: 20,
height: 20,
),
backgroundColor: AppColor.blueNormal,
key: key,
);
@@ -117,7 +146,10 @@ class RFab extends StatefulWidget {
RFab.smallDownload({required VoidCallback? onPressed, Key? key})
: this.small(
onPressed: onPressed,
icon: vecWidget(Assets.vecDownloadSvg),
icon: Assets.vec.downloadSvg.svg(
width: 20,
height: 20,
),
backgroundColor: AppColor.blueNormal,
key: key,
);
@@ -125,7 +157,10 @@ class RFab extends StatefulWidget {
RFab.download({required VoidCallback? onPressed, Key? key})
: this(
onPressed: onPressed,
icon: vecWidget(Assets.vecDownloadSvg),
icon: Assets.vec.downloadSvg.svg(
width: 20,
height: 20,
),
backgroundColor: AppColor.blueNormal,
key: key,
);
@@ -136,7 +171,10 @@ class RFab extends StatefulWidget {
RFab.smallExcel({required VoidCallback? onPressed, Key? key})
: this.small(
onPressed: onPressed,
icon: vecWidget(Assets.vecDownloadSvg),
icon: Assets.vec.excelDownloadSvg.svg(
width: 20,
height: 20,
),
backgroundColor: AppColor.greenDark,
key: key,
);
@@ -144,7 +182,10 @@ class RFab extends StatefulWidget {
RFab.excel({required VoidCallback? onPressed, Key? key})
: this(
onPressed: onPressed,
icon: vecWidget(Assets.vecDownloadSvg),
icon: Assets.vec.excelDownloadSvg.svg(
width: 20,
height: 20,
),
backgroundColor: AppColor.greenDark,
key: key,
);
@@ -155,7 +196,10 @@ class RFab extends StatefulWidget {
RFab.smallBack({required VoidCallback? onPressed, Key? key})
: this.small(
onPressed: onPressed,
icon: vecWidget(Assets.vecArrowLeftSvg),
icon: Assets.vec.arrowLeftSvg.svg(
width: 20,
height: 20,
),
backgroundColor: AppColor.blueNormal,
key: key,
);
@@ -163,7 +207,10 @@ class RFab extends StatefulWidget {
RFab.back({required VoidCallback? onPressed, Key? key})
: this(
onPressed: onPressed,
icon: vecWidget(Assets.vecArrowLeftSvg),
icon: Assets.vec.arrowLeftSvg.svg(
width: 20,
height: 20,
),
backgroundColor: AppColor.blueNormal,
key: key,
);

View File

@@ -1,8 +1,7 @@
import 'package:flutter/material.dart';
import 'package:rasadyar_core/presentation/common/app_color.dart';
import 'package:rasadyar_core/presentation/common/assets.dart';
import 'package:rasadyar_core/presentation/common/assets.gen.dart';
import 'package:rasadyar_core/presentation/utils/color_utils.dart';
import 'package:rasadyar_core/presentation/widget/vec_widget.dart';
class RFabOutlined extends StatefulWidget {
final Widget icon;
@@ -69,10 +68,13 @@ class RFabOutlined extends StatefulWidget {
onPressed: onPressed,
backgroundColor: AppColor.greenNormal,
borderColor: AppColor.greenNormal,
icon: vecWidget2(
Assets.vecAddSvg,
color: AppColor.greenNormal,
icon: Assets.vec.addSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.greenNormal
: AppColor.greenNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -81,12 +83,14 @@ class RFabOutlined extends StatefulWidget {
key: key,
onPressed: onPressed,
backgroundColor: AppColor.greenNormal,
icon: vecWidget(
Assets.vecAddSvg,
color:
onPressed != null
? AppColor.greenNormal
: AppColor.greenNormal.disabledColor,
icon: Assets.vec.addSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.greenNormal
: AppColor.greenNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -96,12 +100,13 @@ class RFabOutlined extends StatefulWidget {
onPressed: onPressed,
backgroundColor: AppColor.greenNormal,
borderColor: AppColor.greenNormal,
icon: vecWidget(
Assets.vecAddSvg,
color:
onPressed != null
? AppColor.greenNormal
: AppColor.greenNormal.disabledColor,
icon: Assets.vec.addSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.greenNormal
: AppColor.greenNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -110,12 +115,13 @@ class RFabOutlined extends StatefulWidget {
key: key,
onPressed: onPressed,
backgroundColor: AppColor.greenNormal,
icon: vecWidget(
Assets.vecAddSvg,
color:
onPressed != null
? AppColor.greenNormal
: AppColor.greenNormal.disabledColor,
icon: Assets.vec.addSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.greenNormal
: AppColor.greenNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -128,12 +134,13 @@ class RFabOutlined extends StatefulWidget {
onPressed: onPressed,
backgroundColor: AppColor.blueNormal,
borderColor: AppColor.blueNormal,
icon: vecWidget(
Assets.vecEditSvg,
color:
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
icon: Assets.vec.editSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -142,12 +149,13 @@ class RFabOutlined extends StatefulWidget {
key: key,
onPressed: onPressed,
backgroundColor: AppColor.blueNormal,
icon: vecWidget(
Assets.vecEditSvg,
color:
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
icon: Assets.vec.editSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -157,12 +165,13 @@ class RFabOutlined extends StatefulWidget {
onPressed: onPressed,
backgroundColor: AppColor.blueNormal,
borderColor: AppColor.blueNormal,
icon: vecWidget(
Assets.vecEditSvg,
color:
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
icon: Assets.vec.editSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -171,12 +180,13 @@ class RFabOutlined extends StatefulWidget {
key: key,
onPressed: onPressed,
backgroundColor: AppColor.blueNormal,
icon: vecWidget(
Assets.vecEditSvg,
color:
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
icon: Assets.vec.editSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -189,12 +199,13 @@ class RFabOutlined extends StatefulWidget {
onPressed: onPressed,
backgroundColor: AppColor.redNormal,
borderColor: AppColor.redNormal,
icon: vecWidget(
Assets.vecTrashSvg,
color:
onPressed != null
? AppColor.redNormal
: AppColor.redNormal.disabledColor,
icon: Assets.vec.trashSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.redNormal
: AppColor.redNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -203,12 +214,13 @@ class RFabOutlined extends StatefulWidget {
key: key,
onPressed: onPressed,
backgroundColor: AppColor.redNormal,
icon: vecWidget(
Assets.vecTrashSvg,
color:
onPressed != null
? AppColor.redNormal
: AppColor.redNormal.disabledColor,
icon: Assets.vec.trashSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.redNormal
: AppColor.redNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -218,12 +230,13 @@ class RFabOutlined extends StatefulWidget {
onPressed: onPressed,
backgroundColor: AppColor.redNormal,
borderColor: AppColor.redNormal,
icon: vecWidget(
Assets.vecTrashSvg,
color:
onPressed != null
? AppColor.redNormal
: AppColor.redNormal.disabledColor,
icon: Assets.vec.trashSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.redNormal
: AppColor.redNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -232,12 +245,13 @@ class RFabOutlined extends StatefulWidget {
key: key,
onPressed: onPressed,
backgroundColor: AppColor.redNormal,
icon: vecWidget(
Assets.vecTrashSvg,
color:
onPressed != null
? AppColor.redNormal
: AppColor.redNormal.disabledColor,
icon: Assets.vec.trashSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.redNormal
: AppColor.redNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -250,12 +264,13 @@ class RFabOutlined extends StatefulWidget {
onPressed: onPressed,
backgroundColor: AppColor.blueNormal,
borderColor: AppColor.blueNormal,
icon: vecWidget(
Assets.vecScanSvg,
color:
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
icon: Assets.vec.scanSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -264,12 +279,13 @@ class RFabOutlined extends StatefulWidget {
key: key,
onPressed: onPressed,
backgroundColor: AppColor.blueNormal,
icon: vecWidget(
Assets.vecScanSvg,
color:
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
icon: Assets.vec.scanSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -279,12 +295,13 @@ class RFabOutlined extends StatefulWidget {
onPressed: onPressed,
backgroundColor: AppColor.blueNormal,
borderColor: AppColor.blueNormal,
icon: vecWidget(
Assets.vecScanSvg,
color:
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
icon: Assets.vec.scanSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -293,12 +310,13 @@ class RFabOutlined extends StatefulWidget {
key: key,
onPressed: onPressed,
backgroundColor: AppColor.blueNormal,
icon: vecWidget(
Assets.vecScanSvg,
color:
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
icon: Assets.vec.scanSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -311,12 +329,13 @@ class RFabOutlined extends StatefulWidget {
onPressed: onPressed,
backgroundColor: AppColor.blueNormal,
borderColor: AppColor.blueNormal,
icon: vecWidget(
Assets.vecFilterSvg,
color:
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
icon: Assets.vec.filterSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -325,12 +344,13 @@ class RFabOutlined extends StatefulWidget {
key: key,
onPressed: onPressed,
backgroundColor: AppColor.blueNormal,
icon: vecWidget(
Assets.vecFilterSvg,
color:
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
icon: Assets.vec.filterSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -340,12 +360,13 @@ class RFabOutlined extends StatefulWidget {
onPressed: onPressed,
backgroundColor: AppColor.blueNormal,
borderColor: AppColor.blueNormal,
icon: vecWidget(
Assets.vecFilterSvg,
color:
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
icon: Assets.vec.filterSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -354,12 +375,13 @@ class RFabOutlined extends StatefulWidget {
key: key,
onPressed: onPressed,
backgroundColor: AppColor.blueNormal,
icon: vecWidget(
Assets.vecFilterSvg,
color:
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
icon: Assets.vec.filterSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -372,12 +394,13 @@ class RFabOutlined extends StatefulWidget {
onPressed: onPressed,
backgroundColor: AppColor.blueNormal,
borderColor: AppColor.blueNormal,
icon: vecWidget(
Assets.vecDownloadSvg,
color:
onPressed != null
? AppColor.greenDark
: AppColor.greenDark.disabledColor,
icon: Assets.vec.downloadSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.greenNormal
: AppColor.greenNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -386,12 +409,13 @@ class RFabOutlined extends StatefulWidget {
key: key,
onPressed: onPressed,
backgroundColor: AppColor.blueNormal,
icon: vecWidget(
Assets.vecDownloadSvg,
color:
onPressed != null
? AppColor.greenDark
: AppColor.greenDark.disabledColor,
icon: Assets.vec.downloadSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.greenNormal
: AppColor.greenNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -401,12 +425,13 @@ class RFabOutlined extends StatefulWidget {
onPressed: onPressed,
backgroundColor: AppColor.blueNormal,
borderColor: AppColor.blueNormal,
icon: vecWidget(
Assets.vecDownloadSvg,
color:
onPressed != null
? AppColor.greenDark
: AppColor.greenDark.disabledColor,
icon: Assets.vec.downloadSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.greenNormal
: AppColor.greenNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -415,12 +440,13 @@ class RFabOutlined extends StatefulWidget {
key: key,
onPressed: onPressed,
backgroundColor: AppColor.blueNormal,
icon: vecWidget(
Assets.vecDownloadSvg,
color:
onPressed != null
? AppColor.greenDark
: AppColor.greenDark.disabledColor,
icon: Assets.vec.downloadSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.greenNormal
: AppColor.greenNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -433,12 +459,13 @@ class RFabOutlined extends StatefulWidget {
onPressed: onPressed,
backgroundColor: AppColor.greenDark,
borderColor: AppColor.greenDark,
icon: vecWidget(
Assets.vecDownloadSvg,
color:
onPressed != null
? AppColor.greenDark
: AppColor.greenDark.disabledColor,
icon: Assets.vec.excelDownloadSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.greenNormal
: AppColor.greenNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -447,12 +474,13 @@ class RFabOutlined extends StatefulWidget {
key: key,
onPressed: onPressed,
backgroundColor: AppColor.greenDark,
icon: vecWidget(
Assets.vecDownloadSvg,
color:
onPressed != null
? AppColor.greenDark
: AppColor.greenDark.disabledColor,
icon: Assets.vec.excelDownloadSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.greenNormal
: AppColor.greenNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -462,12 +490,13 @@ class RFabOutlined extends StatefulWidget {
onPressed: onPressed,
backgroundColor: AppColor.greenDark,
borderColor: AppColor.greenDark,
icon: vecWidget(
Assets.vecDownloadSvg,
color:
onPressed != null
? AppColor.greenDark
: AppColor.greenDark.disabledColor,
icon: Assets.vec.excelDownloadSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.greenNormal
: AppColor.greenNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -476,12 +505,13 @@ class RFabOutlined extends StatefulWidget {
key: key,
onPressed: onPressed,
backgroundColor: AppColor.greenDark,
icon: vecWidget(
Assets.vecDownloadSvg,
color:
onPressed != null
? AppColor.greenDark
: AppColor.greenDark.disabledColor,
icon: Assets.vec.excelDownloadSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.greenNormal
: AppColor.greenNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -494,12 +524,13 @@ class RFabOutlined extends StatefulWidget {
onPressed: onPressed,
backgroundColor: AppColor.blueNormal,
borderColor: AppColor.blueNormal,
icon: vecWidget(
Assets.vecArrowLeftSvg,
color:
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
icon: Assets.vec.arrowLeftSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -508,12 +539,13 @@ class RFabOutlined extends StatefulWidget {
key: key,
onPressed: onPressed,
backgroundColor: AppColor.blueNormal,
icon: vecWidget(
Assets.vecArrowLeftSvg,
color:
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
icon: Assets.vec.arrowLeftSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -523,12 +555,13 @@ class RFabOutlined extends StatefulWidget {
onPressed: onPressed,
backgroundColor: AppColor.blueNormal,
borderColor: AppColor.blueNormal,
icon: vecWidget(
Assets.vecArrowLeftSvg,
color:
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
icon: Assets.vec.arrowLeftSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -537,12 +570,13 @@ class RFabOutlined extends StatefulWidget {
key: key,
onPressed: onPressed,
backgroundColor: AppColor.blueNormal,
icon: vecWidget(
Assets.vecArrowLeftSvg,
color:
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
icon: Assets.vec.arrowLeftSvg.svg(
colorFilter: ColorFilter.mode(
onPressed != null
? AppColor.blueNormal
: AppColor.blueNormal.disabledColor,
BlendMode.srcIn,
),
),
);
@@ -550,11 +584,12 @@ class RFabOutlined extends StatefulWidget {
}
class _RFabOutlinedState extends State<RFabOutlined> {
bool isOnPressed =false;
bool isOnPressed = false;
@override
Widget build(BuildContext context) {
return OutlinedButton(
onPressed:widget.onPressed ,
onPressed: widget.onPressed,
style: ButtonStyle(
side: WidgetStateProperty.resolveWith<BorderSide?>((states) {
if (states.contains(WidgetState.disabled)) {
@@ -598,8 +633,7 @@ class _RFabOutlinedState extends State<RFabOutlined> {
),
padding: WidgetStatePropertyAll(EdgeInsets.zero),
),
child: widget.icon
child: widget.icon,
);
}
}

View File

@@ -0,0 +1,46 @@
import 'package:flutter/material.dart';
import 'package:rasadyar_core/core.dart';
class CardIcon extends StatelessWidget {
const CardIcon({
super.key,
required this.title,
required this.icon,
this.onTap,
});
final String title;
final String icon;
final VoidCallback? onTap;
@override
Widget build(BuildContext context) {
return InkWell(
onTap: onTap,
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
side: const BorderSide(color: AppColor.blueNormal, width: 1),
),
child: Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: Colors.white,
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgGenImage(icon).svg(width: 50, height: 50),
const SizedBox(height: 8),
Text(
title,
style: AppFonts.yekan16.copyWith(color: AppColor.blueNormal),
),
],
),
),
),
);
}
}

View File

@@ -22,7 +22,7 @@ SvgPicture vecWidget(
}
Widget vecWidgetWithOnTap({
required String assets,
required Widget child,
required VoidCallback onTap,
double? width,
double? height,
@@ -31,14 +31,7 @@ Widget vecWidgetWithOnTap({
}) {
return InkWell(
onTap: onTap,
child: SvgPicture(
AssetBytesLoader(assets),
width: width,
height: height,
fit: fit ?? BoxFit.contain,
colorFilter:
color != null ? ColorFilter.mode(color, BlendMode.srcIn) : null,
),
child: child
);
}

View File

@@ -14,3 +14,4 @@ export 'pagination/show_more.dart';
export 'tabs/new_tab.dart';
export 'tabs/tab.dart';
export 'vec_widget.dart';
export 'card/card_with_icon_with_border.dart';