{"id":23125450,"url":"https://github.com/nialixus/filesaverz","last_synced_at":"2025-08-06T10:33:47.814Z","repository":{"id":57675292,"uuid":"480632729","full_name":"Nialixus/filesaverz","owner":"Nialixus","description":" 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.","archived":false,"fork":false,"pushed_at":"2023-12-08T03:55:23.000Z","size":1903,"stargazers_count":3,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-03T20:35:58.378Z","etag":null,"topics":["dart","flutter","flutter-package","pub-dev"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nialixus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"nialixus","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2022-04-12T02:59:21.000Z","updated_at":"2024-05-23T04:13:08.000Z","dependencies_parsed_at":"2022-09-26T22:01:17.251Z","dependency_job_id":"445877da-a0a6-4dd4-a22c-6e19de8ad501","html_url":"https://github.com/Nialixus/filesaverz","commit_stats":{"total_commits":106,"total_committers":2,"mean_commits":53.0,"dds":0.4339622641509434,"last_synced_commit":"a94f3458518439bce0bf12aff0b7be1196bb4d03"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nialixus%2Ffilesaverz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nialixus%2Ffilesaverz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nialixus%2Ffilesaverz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nialixus%2Ffilesaverz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nialixus","download_url":"https://codeload.github.com/Nialixus/filesaverz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230085319,"owners_count":18170425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","flutter","flutter-package","pub-dev"],"created_at":"2024-12-17T08:13:40.485Z","updated_at":"2024-12-17T08:13:41.139Z","avatar_url":"https://github.com/Nialixus.png","language":"Dart","funding_links":["https://ko-fi.com/nialixus"],"categories":[],"sub_categories":[],"readme":"\u003cp align='center'\u003e\n\u003cimg src='https://user-images.githubusercontent.com/45191605/272838580-8ed4093a-fb0b-4e2b-85ce-c2c905e2936f.png' width=200 /\u003e\u003cbr\u003e\n\u003ca href='https://pub.dev/packages/filesaverz'\u003e\u003cimg src='https://img.shields.io/pub/v/filesaverz.svg?logo=flutter\u0026color=blue\u0026style=flat-square'/\u003e\u003c/a\u003e\u003c/p\u003e\n\n# File Saver Z\n\nA customable file saver and file picker package that makes it easy for user to browse folder and save file or pick files in android.\n\n## Preview\n\n![screen-capture (1)](https://user-images.githubusercontent.com/45191605/167116228-6cbddb50-d98a-44d3-af1f-ce2b61ae8464.gif)\n\n## Install\n\nAdd this to your `pubspec.yaml`.\n\n```yaml\ndependencies:\n  filesaverz: ^3.2.1\n```\n\nContinue by adding permission in your `AndroidManifest.xml`.\n\n```xml\n\u003cmanifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    package=\"com.example.example\"\u003e\n    \u003cuses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/\u003e\n    \u003cuses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/\u003e\n```\n\nJust in case if you got `MissingPluginException(No implementation found for method checkPermissionStatus on channel flutter.baseflow.com/permissions/methods)` error, try fix it by adding this to your `app/build.gradle`.\n\n```gradle\nbuildTypes {\n       release {\n           shrinkResources false\n           minifyEnabled false\n           signingConfig signingConfigs.release\n       }\n   }\n```\n\nAnd then import the filesaver (with z) package.\n\n```dart\nimport 'package:filesaverz/filesaverz.dart';\n```\n\n## Usage\n\nFirst, setting up the FileSaver widget like this.\n\n```dart\n  FileSaver fileSaver = FileSaver(\n  fileTypes: const ['txt','pdf'],\n  initialFileName: 'Untitled File',\n);\n```\n\nor this customable FileSaver.\n\n```dart\nFileSaver fileSaver = FileSaver.builder(\n   fileTypes: const ['txt','pdf'],\n   initialFileName: 'Untitled File',\n   headerBuilder: (context, state) =\u003e /* Your Widget */,\n   bodyBuilder: (context, state) =\u003e /* Your Widget */,\n   footerBuilder: (context, state) =\u003e /* Your Widget */,\n);\n```\n\nAnd then in async function call these:\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cb\u003ePurpose\u003c/b\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cb\u003eCode\u003c/b\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eGetting selected path from saving file.\u003c/td\u003e\n    \u003ctd\u003e\n      \u003cpre lang='dart'\u003eString? path = await fileSaver.getPath(context);\u003c/pre\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eCalling \u003ca href=\"https://api.flutter.dev/flutter/dart-io/File/writeAsBytes.html\"\u003ewriteAsBytes\u003c/a\u003e method.\u003c/td\u003e\n    \u003ctd\u003e\n      \u003cpre lang='dart'\u003efileSaver.writeAsBytes(bytes, context: context);\u003c/pre\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eCalling \u003ca href=\"https://api.flutter.dev/flutter/dart-io/File/writeAsBytesSync.html\"\u003ewriteAsBytesSync\u003c/a\u003e method.\u003c/td\u003e\n    \u003ctd\u003e\n      \u003cpre lang='dart'\u003efileSaver.writeAsBytesSync(bytes, context: context);\u003c/pre\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eCalling \u003ca href=\"https://api.flutter.dev/flutter/dart-io/File/writeAsString.html\"\u003ewriteAsString\u003c/a\u003e method.\u003c/td\u003e\n    \u003ctd\u003e\n      \u003cpre lang='dart'\u003efileSaver.writeAsString(contents, context: context);\u003c/pre\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eCalling \u003ca href=\"https://api.flutter.dev/flutter/dart-io/File/writeAsStringSync.html\"\u003ewriteAsStringSync\u003c/a\u003e method.\u003c/td\u003e\n    \u003ctd\u003e\n      \u003cpre lang='dart'\u003efileSaver.writeAsStringSync(contents, context: context);\u003c/pre\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ePicking single file.\u003c/td\u003e\n    \u003ctd\u003e\n      \u003cpre lang='dart'\u003eFile? file = await fileSaver.pickFile(context);\u003c/pre\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003ePicking multiple files.\u003c/td\u003e\n    \u003ctd\u003e\n      \u003cpre lang='dart'\u003eList\u0026ltFile\u0026gt? files = await fileSaver.pickFiles(context);\u003c/pre\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Documentation\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cb\u003eProperty\u003c/b\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cb\u003eCode\u003c/b\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cb\u003eheaderBuilder\u003c/b\u003e, an optional builder.\u003c/td\u003e\n    \u003ctd\u003e\n      \u003cpre lang='dart'\u003e\n(context, state) {\n  return Text('My Custom Header Widget');\n},\n      \u003c/pre\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cb\u003ebodyBuilder\u003c/b\u003e, an optional builder.\u003c/td\u003e\n    \u003ctd\u003e\n      \u003cpre lang='dart'\u003e\n(context, state) {\n  return Text('My Custom Body Widget');\n},\n      \u003c/pre\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cb\u003efooterBuilder\u003c/b\u003e, an optional builder\u003c/td\u003e\n    \u003ctd\u003e\n      \u003cpre lang='dart'\u003e\n(context, state) {\n  return Text('My Custom Footer Widget');\n},\n      \u003c/pre\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cb\u003estyle\u003c/b\u003e, set custom \u003ci\u003eColor\u003c/i\u003e, \u003ci\u003eTextStyle\u003c/i\u003e, \u003ci\u003eIcon\u003c/i\u003e and displayed \u003ci\u003eText\u003c/i\u003e.\u003c/td\u003e\n    \u003ctd\u003e\n      \u003cpre lang='dart'\u003e\nFileSaverStyle(\n  primaryColor: Colors.blue,\n  secondaryColor: Colors.white,\n  primaryTextStyle: TextStyle(),\n  secondaryTextStyle: TextStyle(),\n  icons: [\n    FileSaverIcon(icon: (path) =\u003e Icon(Icons.default)),\n    FileSaverIcon.directory(icon: (path) =\u003e Icon(Icons.folder)),\n    FileSaverIcon.file(fileType: 'jpg', icon: (path) =\u003e Image.file(File(path)),\n    ],\n  text: FileSaverText(\n    popupNo: 'Nay',\n    popupYes: 'Sí',\n  ),\n),\n      \u003c/pre\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cb\u003einitialFileName\u003c/b\u003e, this property is used when you call saving method.\u003c/td\u003e\n    \u003ctd\u003e\n      \u003cpre lang='dart'\u003e\n'Untitled File',\n      \u003c/pre\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cb\u003einitialDirectory\u003c/b\u003e, in Android by default it's calling \u003ca href='https://developer.android.com/reference/android/os/Environment#getExternalStorageDirectory()'\u003eEnvironment.getExternalStorageDirectory\u003c/a\u003e.\u003c/td\u003e\n    \u003ctd\u003e\n      \u003cpre lang='dart'\u003e\nDirectory('Storage Path'),\n      \u003c/pre\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cb\u003efileTypes\u003c/b\u003e, this property is used to limit what kind of fileTypes that we want to display, and in saving method this fileTypes also used as an option for user to set the desired fileTypes to write.\u003c/td\u003e\n    \u003ctd\u003e\n      \u003cpre lang='dart'\u003e\nconst ['jpg','gif','png'],\n      \u003c/pre\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\nFull Documentation [here](https://pub.dev/documentation/filesaverz/latest/filesaverz/filesaverz-library.html).\n\n## Example\n\n- [filesaverz/example/lib/main.dart](https://github.com/Nialixus/filesaverz/blob/master/example/lib/main.dart)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnialixus%2Ffilesaverz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnialixus%2Ffilesaverz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnialixus%2Ffilesaverz/lists"}