feat: Update action button styling and color in permission denied banner
This commit is contained in:
@@ -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!,
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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(),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user