feat: Update action button styling and color in permission denied banner

This commit is contained in:
Achintha Isuru
2026-03-13 16:44:39 -04:00
parent accff00155
commit a2b102a96d
3 changed files with 18 additions and 14 deletions

View File

@@ -94,13 +94,13 @@ class UiNoticeBanner extends StatelessWidget {
),
),
],
if (action != null) ...<Widget>[
const SizedBox(height: UiConstants.space2),
action!,
],
],
),
),
if (action != null) ...<Widget>[
const SizedBox(width: UiConstants.space3),
action!,
],
],
),
);

View File

@@ -22,16 +22,19 @@ class BannerActionButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: onPressed,
child: Text(
label,
style: UiTypography.body3m.copyWith(
color: color ?? UiColors.primary,
decoration: TextDecoration.underline,
decorationColor: color ?? UiColors.primary,
),
),
return UiButton.secondary(
text: label,
size: UiButtonSize.extraSmall,
style: color != null
? ButtonStyle(
foregroundColor: WidgetStateProperty.all(color),
side: WidgetStateProperty.all(BorderSide(color: color!)),
shape: WidgetStateProperty.all(
RoundedRectangleBorder(borderRadius: UiConstants.radiusMd),
),
)
: null,
onPressed: onPressed,
);
}
}

View File

@@ -27,6 +27,7 @@ class PermissionDeniedForeverBanner extends StatelessWidget {
descriptionColor: UiColors.textError,
action: BannerActionButton(
label: i18n.open_settings,
color: UiColors.textError,
onPressed: () =>
Modular.get<GeofenceServiceInterface>().openAppSettings(),
),