real_path_file_selector 0.0.2
real_path_file_selector: ^0.0.2 copied to clipboard
flutter realpath file selector for android,linux and other platform.i current build 2 platform.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:real_path_file_selector/real_path_file_selector.dart';
void main() {
runApp(MaterialApp(debugShowCheckedModeBanner: false, home: const MyApp()));
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
Future<void> _test() async {
// final scannerPathList = await RealPathFileSelector.openFileScanner.open(
// context,
// mimeType: 'video',
// );
// debugPrint(scannerPathList.toString());
final pathList = await RealPathFileSelector.openFileExplorer.open(
context,
mimeTypes: ['video'],
title: 'Choose Video File',
);
debugPrint(pathList.toString());
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Real Path File Chooser')),
body: Placeholder(),
floatingActionButton: FloatingActionButton(
onPressed: _test,
child: Text('Test'),
),
);
}
}