vimeo_player_flutter 0.1.0 vimeo_player_flutter: ^0.1.0 copied to clipboard
Vimeo Player Flutter package for Flutter apps. Compatible with both iOS and Android platforms.
import 'package:flutter/material.dart';
import 'package:vimeo_player_flutter/vimeo_player_flutter.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(title: 'vimeo_player example'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
String videoId = '70591644';
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
children: [
Container(
height: 250,
child: VimeoPlayer(
videoId: videoId,
),
),
],
),
),
// This trailing comma makes auto-formatting nicer for build methods.
);
}
}