register method
activate a screenshot blocking with a color effect view (iOS 13+, Android 8+)
color color of the background
Throws a PlatformException if there were technical problems on native side (e.g. lack of relevant hardware).
Implementation
@override
Future<void> register({
required Color color,
}) async {
final colorHex =
'#${color.toARGB32().toRadixString(16).padLeft(8, '0').substring(2)}';
await methodChannel.invokeMethod<void>('activateShield', <String, dynamic>{
'color': colorHex,
});
}