AndroidOverlayConfiguration class

Android-only styling for the full-screen overlay ("shield") that is drawn on top of a blocked app.

Every colour is a hex string accepting #RGB, #RRGGBB or #RRGGBBAA (alpha last). Any field left null keeps its built-in default, so you can override just the pieces you care about.

This has no effect on iOS — use ShieldConfigurationPayload with FlutterScreenTime.setShieldConfiguration for the iOS shield.

Constructors

AndroidOverlayConfiguration({required String title, String? message, String? backgroundColorHex, String? titleColorHex, String? messageColorHex, String? primaryButtonLabel, String? primaryButtonBackgroundColorHex, String? primaryButtonTextColorHex, String? secondaryButtonLabel, String? secondaryButtonBackgroundColorHex, String? secondaryButtonTextColorHex, double? titleFontSize, double? messageFontSize, double? cornerRadius})
const

Properties

backgroundColorHex → String?
Overlay background fill. Defaults to #111827.
final
cornerRadius → double?
Corner radius (dp) applied to the buttons. Defaults to 12.
final
hashCode → int
The hash code for this object.
no setterinherited
message → String?
Supporting line beneath the title. Hidden when null/empty.
final
messageColorHex → String?
Colour of the message text. Defaults to #D1D5DB.
final
messageFontSize → double?
Message text size in sp. Defaults to 16.
final
primaryButtonBackgroundColorHex → String?
Fill colour of the primary button. Defaults to #2563EB.
final
primaryButtonLabel → String?
Label for the primary (dismiss) button. Defaults to OK.
final
primaryButtonTextColorHex → String?
Text colour of the primary button. Defaults to #FFFFFF.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
secondaryButtonBackgroundColorHex → String?
Fill colour of the secondary button. When null the button is outlined (transparent fill with a border in the text colour).
final
secondaryButtonLabel → String?
Label for the optional secondary button. Hidden when null/empty.
final
secondaryButtonTextColorHex → String?
Text colour of the secondary button. Defaults to #FFFFFF.
final
title → String
Bold heading shown at the top of the overlay.
final
titleColorHex → String?
Colour of the title text. Defaults to #FFFFFF.
final
titleFontSize → double?
Title text size in sp. Defaults to 24.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited