Hello Community ๐, Lots of people have a problem with the Vimeo player and custom widgets. I am not a developer but I like to experiment. ๐ IMPORTANT:Widget only works on iOS and Android devices - it doesn't work in the browser. So here's my first tutorial! ๐ฑ Result:[result Vimeo.png] Step 1: Create custom widget[create custom widget 1.png] Step 2: Copy code and settings[copy step 2.png]
import 'package:vimeo_player_flutter/vimeo_player_flutter.dart';
import 'package:webview_flutter/webview_flutter.dart';
class Vimeo extends StatefulWidget {
const Vimeo({
Key key,
this.width,
this.height,
this.videoId,
}) : super(key: key);
final double width;
final double height;
final String videoId;
@override
_VimeoState createState() => _VimeoState();
}
class _VimeoState extends State {
@override
Widget build(BuildContext context) {
return Container(child: VimeoPlayer(
videoId: widget.videoId,
),);
}
}
Step 3: Click on "Compile & Preview" - After the success message, save the widget.[compile and save 3.png] Step 4: Add a widget to the screen and enter the ID of the video or set it with Variable![final stage.png]