mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-24 20:32:28 +00:00
Enhance ButtonContentWidget to support customizable icon dimensions.
This commit is contained in:
@ -6,11 +6,15 @@ class ButtonContentWidget extends StatelessWidget {
|
||||
final String label;
|
||||
final String? svgAssets;
|
||||
final bool disabled;
|
||||
final double? iconWidth;
|
||||
final double? iconHeight;
|
||||
|
||||
const ButtonContentWidget({
|
||||
required this.label,
|
||||
this.svgAssets,
|
||||
this.disabled = false,
|
||||
this.iconWidth,
|
||||
this.iconHeight,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@ -38,8 +42,8 @@ class ButtonContentWidget extends StatelessWidget {
|
||||
padding: const EdgeInsets.only(left: 6.0),
|
||||
child: SvgPicture.asset(
|
||||
svgAssets!,
|
||||
width: screenWidth * 0.015,
|
||||
height: screenWidth * 0.015,
|
||||
width: iconWidth ?? screenWidth * 0.015,
|
||||
height: iconHeight ?? screenWidth * 0.015,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
|
@ -90,6 +90,8 @@ class SpaceDetailsDevicesBox extends StatelessWidget {
|
||||
child: ButtonContentWidget(
|
||||
svgAssets: Assets.addIcon,
|
||||
label: 'Add Devices',
|
||||
iconWidth: 12,
|
||||
iconHeight: 12,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -28,6 +28,8 @@ class SpaceSubSpacesBox extends StatelessWidget {
|
||||
child: ButtonContentWidget(
|
||||
svgAssets: Assets.addIcon,
|
||||
label: 'Create Sub Spaces',
|
||||
iconWidth: 12,
|
||||
iconHeight: 12,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
Reference in New Issue
Block a user