How to install and use youtube_player_iframe with Flutter 3.10.0

A popular Flutter package with 404 likes that support Flutter version 3.10.0 and above. Last version of the package was published on May 12, 2023.

Installing youtube_player_iframe

You can either add the package directly using the flutter command line.

$ flutter pub add youtube_player_iframe

Or add the dependency directly to your pubspec.yaml file.
dependencies:
  youtube_player_iframe: ^4.0.4

In either case, make sure to refresh your packages by running the following command:

$ flutter pub get

Using youtube_player_iframe

Once you have installed the package, you can use it in your Flutter application by importing it.
import 'package:youtube_player_iframe/youtube_player_iframe.dart';