daohoangson / flutter_widget_from_html

Flutter package to render html as widgets that supports hyperlink, image, audio, video, iframe and many other tags.
https://pub.dev/packages/flutter_widget_from_html
MIT License
645 stars 242 forks source link

Redmi phone won't play in full screen #1338

Open miaoquanlong opened 2 months ago

miaoquanlong commented 2 months ago

image ![Uploading 1726628403341_1033736291185606656.jpeg…]()

miaoquanlong commented 2 months ago

1726628403341_1033736291185606656

daohoangson commented 1 month ago

The error message doesn't seem to be related to this package. You will need to provide reproducible steps or code.

miaoquanlong commented 1 month ago

Widget appContent(appMsgContent, provider, context) { return Column( children: [ HtmlWidget( appMsgContent, onTapUrl: (url) async { Map<String, dynamic> params = decodeParams(url); if (url.contains("pdocs")) { Navigator.of(context).push(MaterialPageRoute(builder: (context) { return PDFWebPage(args: {'url': url, 'title': '文件预览'}); })); } else { imageClick(context, params, url); }

        return true; // 或者 false
      },
      enableCaching: true, // 启用缓存
      onErrorBuilder: (context, element, error) {
        return Text('$element error: $error');
      },
      onLoadingBuilder: (context, element, loadingProgress) {
        return const Text('加载中...');
      },
    )
  ],
);

}

Expanded( child: SizedBox( height: provider.expandedIds.contains(message.messageInboxDTO?.id) ? 300.h : 0, child: SingleChildScrollView( padding: EdgeInsets.only(left: 8.w), child: provider.expandedIds.contains(message.messageInboxDTO?.id) ? (message.messageContentDTO?.appMsgContent != null ? appContent(message.messageContentDTO?.appMsgContent, provider, context) : const Center(child: CircularProgressIndicator())) : const SizedBox.shrink(), )), )