fget_file 1.0.1 copy "fget_file: ^1.0.1" to clipboard
fget_file: ^1.0.1 copied to clipboard

Flutter file selector ,sorted by last accessed time ,supports multiple selection, all file types compatible with Android 10/11 system, examples in the example directory.

example/lib/main.dart

import 'package:fget_file/config_model.dart';
import 'package:flutter/material.dart';
import 'package:fget_file/fget_file_page.dart';
import 'package:flutter/services.dart';

void main() {
  SystemChrome.setSystemUIOverlayStyle( SystemUiOverlayStyle(statusBarColor: Colors.transparent,statusBarIconBrightness: Brightness.dark),);
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Builder(builder: (context){
        return Scaffold(
          appBar: AppBar(title: Text("文件筛选"),),
          backgroundColor: Colors.white,
          body: Padding(
            padding: EdgeInsets.all(15),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                MaterialButton(
                  onPressed: () {
                    Navigator.push(context, MaterialPageRoute(builder: (context)=>
                        FgetFilePage(
                          configModel: ConfigModel(
                            types: ["mp4",]
                          ),
                          callback: (v){
                            print(v);
                          },
                        ),
                      ),
                    );
                  },
                  child: Text("-打开文件筛选器-"),
                  color: Colors.blue,
                ),
                Text("当前筛选的文件:"),
              ],
            ),
          ),
        );
      })
    );
  }
}
0
likes
30
pub points
22%
popularity

Publisher

unverified uploader

Flutter file selector ,sorted by last accessed time ,supports multiple selection, all file types compatible with Android 10/11 system, examples in the example directory.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, flutter_web_plugins, universal_platform

More

Packages that depend on fget_file