- Print
Step 1. Install the SDK
- Print
SDK Link : https://pub.dev/packages/shoplive_player/install
Prepare Your Flutter Project
Navigate to the Flutter project root
cd ~/projects/PlayShopLiveFlutterVerify the minimum Flutter / Dart SDK versions
Check the environment section in your pubspec.yaml
If it does not exist, add or update it as follows:
environment:
sdk: ">=2.17.1 <4.0.0"
flutter: ">=2.5.0"The Shoplive Flutter SDK supports Flutter 2.5.0 or higher and Dart 2.17.1 or higher.
Versions lower than these are not guaranteed to work.
Add Dependency
Run the following command in your terminal to add the shoplive_player package to your project:
flutter pub add shoplive_playerIf successful, the following entry will be added to the dependencies section of your pubspec.yaml :
dependencies:
flutter:
sdk: flutter
shoplive_player: If you have already added the
dependenciesmanually, simply run one of the following commands:flutter pub getorflutter pub upgrade shoplive_player
Import the SDK
Add the following import statement at the top of the Dart file where you want to use the Shoplive SDK:
import 'package:shoplive_player/shoplive_player.dart';