This package allows you to implement Instagram-like reels widgets in your Flutter application with minimal code. With whitecodel_reels
, you can quickly add a reels widget featuring video content with interactive elements.
To use this package, add whitecodel_reels
as a dependency in your pubspec.yaml
file.
dependencies:
whitecodel_reels: ^0.0.6
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:whitecodel_reels/whitecodel_reels.dart';
void main() async {
await Future.delayed(const Duration(seconds: 1));
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'WhiteCodel Reels',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Scaffold(
body: WhiteCodelReels(
key: UniqueKey(),
context: context,
loader: const Center(
child: CircularProgressIndicator(),
),
videoList: List.generate(
10,
(index) =>
'https://flutter.github.io/assets-for-api-docs/assets/videos/butterfly.mp4',
),
isCaching: true,
builder: (context, index, child, videoPlayerController, pageController) {
// Widget builder logic
}),
));
}
}