initView method

  1. @override
void initView(
  1. String viewId, {
  2. required String styleWidth,
  3. required String styleHeight,
  4. required String width,
  5. required String height,
  6. required String src,
})
override

Implementation

@override
void initView(
  String viewId, {
  required String styleWidth,
  required String styleHeight,
  required String width,
  required String height,
  required String src,
}) {
  // ignore: undefined_prefixed_name
  ui.platformViewRegistry.registerViewFactory(
      viewId,
      (int id) => html.IFrameElement()
        ..style.width = styleWidth
        ..style.height = styleHeight
        ..width = width
        ..height = height
        ..src = src
        ..style.border = 'none');
}