updateFloatyHeadContent method

Future<bool?> updateFloatyHeadContent({
  1. required FloatyHeadHeader header,
  2. FloatyHeadBody? body,
  3. FloatyHeadFooter? footer,
  4. FloatyHeadMargin? margin,
  5. int? width,
  6. int? height,
})

This functions updates all the UI that is builded in the custom layout that the chathead uses.

Implementation

Future<bool?> updateFloatyHeadContent({
  required FloatyHeadHeader header,
  FloatyHeadBody? body,
  FloatyHeadFooter? footer,
  FloatyHeadMargin? margin,
  int? width,
  int? height,
}) async {
  final Map<String, dynamic> params = <String, dynamic>{
    'header': header.getMap(),
    'body': body?.getMap(),
    'footer': footer?.getMap(),
    'margin': margin?.getMap(),
    'gravity': 1.0,
    'width': width ?? -1,
    'height': height ?? -2
  };
  return await _platform.invokeMethod('setFloatyHeadContent', params);
}