
To achieve this you should have to define the width of the element. Solved: Ive embedded a canvas app into a portal using IFrame, but for some reason I cannot get the IFrame to be centered on the. Then you have to import the package with: import 'package:flutter_widget_from_html/flutter_widget_from_html. To center align an ‘iframe’ or any other HTML element you can use CSS ‘margin’ property.

 .
If you don't want to include all of its dependencies in your build, it's possible to use flutter_widget_from_html_core with a subset of the mixins to control your app size: