🎨 Use feature based folder structure

This commit is contained in:
2026-02-06 00:37:02 +08:00
parent 62a3ea26e3
commit 862e3b451b
539 changed files with 8406 additions and 5056 deletions

View File

@@ -0,0 +1,28 @@
import 'package:web/web.dart' as web;
import 'package:flutter/material.dart';
class UniversalVideo extends StatelessWidget {
final String uri;
final double? aspectRatio;
final bool autoplay;
const UniversalVideo({
super.key,
required this.uri,
this.aspectRatio,
this.autoplay = false,
});
@override
Widget build(BuildContext context) {
return HtmlElementView.fromTagName(
tagName: 'video',
onElementCreated: (element) {
element as web.HTMLVideoElement;
element.src = uri;
element.style.width = '100%';
element.style.height = '100%';
element.controls = true;
},
);
}
}