Making dart:ui_web Compile in Flutter Tests The Problem When embedding YouTube iframes in Flutter Web, you use dart:ui_web and package:web: import 'dart:ui_web' as ui_web; import 'package:web/web.dart' as web; // in initState ui_web.platformViewRegistry.registerViewFactory( 'youtube-$id', (int viewId) { final iframe = web.HTMLIFrameElement()..src = embedUrl; return iframe; }, ); Works on F
Making dart:ui_web Compile in Flutter Tests — The Conditional Import Pattern
kanta13jp1·Dev.to··1 min read
D
Continue reading on Dev.to
This article was sourced from Dev.to's RSS feed. Visit the original for the complete story.