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

This package is a convenient and efficient tool for Flutter developers looking to list all video file paths stored in a user's local storage.

example/list_all_videos_example.dart

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

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      debugShowCheckedModeBanner: false,
      home: VideoListPage(
        title: 'List of Videos',
      ),
    );
  }
}

class VideoListPage extends StatelessWidget {
  final String title;
  const VideoListPage({super.key, required this.title});

  @override
  Widget build(BuildContext context) {
    ListAllVideos listVideosObject = ListAllVideos();
    return Scaffold(
        appBar: AppBar(
          title: Text(title),
        ),
        body: FutureBuilder(
            future: listVideosObject.getAllVideosPath(),
            builder: (context, snapshot) =>
                snapshot.connectionState == ConnectionState.done
                    ? ListView.builder(
                        itemBuilder: (context, index) {
                          List<String> videos = snapshot.data!;
                          return ListTile(
                            title: Text(videos[index]),
                          );
                        },
                      )
                    : const Center(
                        child: CircularProgressIndicator(),
                      )));
  }
}
1
likes
0
pub points
78%
popularity

Publisher

unverified uploader

This package is a convenient and efficient tool for Flutter developers looking to list all video file paths stored in a user's local storage.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

device_info_plus, path_provider, permission_handler

More

Packages that depend on list_all_videos