list_all_videos 1.2.0 copy "list_all_videos: ^1.2.0" to clipboard
list_all_videos: ^1.2.0 copied to clipboard

The list_all_videos package is an indispensable resource for Flutter developers who want to efficiently retrieve video file paths from a user's local storage.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:list_all_videos/list_all_videos.dart';
import 'package:list_all_videos/thumbnail/ThumbnailTile.dart';

/// Main entry point for the application.
void main() {
  runApp(const MyApp());
}

/// Root widget of the application, providing overall structure and theme.
class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(),
    );
  }
}

/// Home page of the application, displaying a list of videos with thumbnails.
class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: FutureBuilder(
        future: ListAllVideos().getAllVideosPath(),
        builder: (context, snapshot) {
          if (snapshot.connectionState == ConnectionState.done) {
            // Display list of videos with thumbnails
            return ListView.separated(
              itemBuilder: (context, index) => ListTile(
                leading: ThumbnailTile(
                  thumbnailController: snapshot.data![index].thumbnailController,
                ),
                title: Text(snapshot.data![index].videoName),
              ),
              separatorBuilder: (context, index) => const Divider(),
              itemCount: snapshot.data!.length,
            );
          } else {
            // Display loading indicator
            return const Center(
              child: CircularProgressIndicator(),
            );
          }
        },
      ),
    );
  }
}
1
likes
120
pub points
78%
popularity

Publisher

unverified uploader

The list_all_videos package is an indispensable resource for Flutter developers who want to efficiently retrieve video file paths from a user's local storage.

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

unknown (LICENSE)

Dependencies

device_info_plus, flutter, path_provider, permission_handler

More

Packages that depend on list_all_videos