mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-17 02:25:16 +00:00
push functions static data
This commit is contained in:
@ -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,
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user