filesaverz 2.5.0 copy "filesaverz: ^2.5.0" to clipboard
filesaverz: ^2.5.0 copied to clipboard

outdated

A customable file saver and file picker package that makes it easy for user to browse folder and save file or pick files in android.

example/lib/main.dart

import 'dart:developer';
import 'dart:io';

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

void main() {
  runApp(const MaterialApp(
      title: 'File Saver Example',
      debugShowCheckedModeBanner: false,
      home: MyApp()));
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Material(
          color: Colors.blue,
          child: InkWell(
            onTap: () async {
              /// Picking example.
              List<File>? files = await FileSaver().pickFiles(context);
              log(files.toString());

              /// Writing example.
              /*FileSaver(
                initialFileName: 'New File',
                fileTypes: const ['txt'],
              ).writeAsString('Hello World', context: context);*/
            },
            child: const Padding(
              padding: EdgeInsets.all(10),
              child: Text(
                'Browse',
                style: TextStyle(
                  color: Colors.white,
                  fontWeight: FontWeight.bold,
                ),
              ),
            ),
          ),
        ),
      ),
    );
  }
}
17
likes
0
pub points
54%
popularity

Publisher

verified publisherinidia.app

A customable file saver and file picker package that makes it easy for user to browse folder and save file or pick files in android.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, permission_handler, provider

More

Packages that depend on filesaverz