push functions static data

This commit is contained in:
ashrafzarkanisala
2024-06-26 02:18:15 +03:00
parent 6413d2b876
commit 3ddd4ed197
34 changed files with 1044 additions and 120 deletions

View File

@ -11,7 +11,6 @@ class SceneListTile extends StatelessWidget {
super.key,
this.assetPath,
this.titleString,
this.subtitle,
this.leadingWidget,
this.trailingWidget,
this.padding,
@ -20,10 +19,14 @@ class SceneListTile extends StatelessWidget {
this.assetHeight,
this.minLeadingWidth,
this.titleWidget,
this.subtitleString,
this.subtitleWidget,
this.iconsSize,
});
final String? assetPath;
final String? titleString;
final String? subtitle;
final Widget? subtitleWidget;
final String? subtitleString;
final Widget? leadingWidget;
final Widget? trailingWidget;
final EdgeInsetsGeometry? padding;
@ -32,6 +35,7 @@ class SceneListTile extends StatelessWidget {
final double? assetHeight;
final double? minLeadingWidth;
final Widget? titleWidget;
final double? iconsSize;
@override
Widget build(BuildContext context) {
@ -39,11 +43,15 @@ class SceneListTile extends StatelessWidget {
minLeadingWidth: minLeadingWidth ?? 40,
leading: leadingWidget ??
(assetPath != null
? SvgPicture.asset(
assetPath ?? Assets.assetsImagesLogo,
width: 20,
height: assetHeight ?? 32,
fit: BoxFit.fitWidth,
? SizedBox(
width: iconsSize,
child: SvgPicture.asset(
assetPath ?? Assets.assetsImagesLogo,
width: 20,
height: assetHeight ?? 32,
alignment: Alignment.center,
fit: BoxFit.fill,
),
)
: null),
trailing: trailingWidget,
@ -54,13 +62,15 @@ class SceneListTile extends StatelessWidget {
textAlign: textAlign,
style: context.bodyMedium.copyWith(fontSize: 15),
),
subtitle: subtitle == null
? null
: BodySmall(
text: subtitle!,
style: context.bodySmall.copyWith(
fontWeight: FontWeight.w400, color: ColorsManager.greyColor),
),
subtitle: subtitleWidget ??
(subtitleString?.isNotEmpty == true
? BodySmall(
text: subtitleString ?? '',
style: context.bodySmall.copyWith(
fontWeight: FontWeight.w400,
color: ColorsManager.greyColor),
)
: null),
onTap: onPressed,
);
}