updateSystemWindow static method
Future<bool?>
updateSystemWindow({
- required SystemWindowHeader header,
- SystemWindowBody? body,
- SystemWindowMargin? margin,
- SystemWindowGravity gravity = SystemWindowGravity.CENTER,
- int? width,
- int? height,
- String notificationTitle = "Title",
- String notificationBody = "Body",
- SystemWindowPrefMode prefMode = SystemWindowPrefMode.DEFAULT,
Implementation
static Future<bool?> updateSystemWindow(
{required SystemWindowHeader header,
SystemWindowBody? body,
SystemWindowFooter? footer,
SystemWindowMargin? margin,
SystemWindowGravity gravity = SystemWindowGravity.CENTER,
int? width,
int? height,
String notificationTitle = "Title",
String notificationBody = "Body",
SystemWindowPrefMode prefMode = SystemWindowPrefMode.DEFAULT}) async {
assert(header != null);
final Map<String, dynamic> params = <String, dynamic>{
'header': header.getMap(),
'body': body?.getMap(),
'footer': footer?.getMap(),
'margin': margin?.getMap(),
'gravity': Commons.getWindowGravity(gravity),
'width': width ?? Constants.MATCH_PARENT,
'height': height ?? Constants.WRAP_CONTENT
};
return await _channel.invokeMethod('updateSystemWindow', [notificationTitle, notificationBody, params, Commons.getSystemWindowPrefMode(prefMode)]);
}