Pakete, Repositories und App-Kategorien suchen

GitHub-RepositoryCleveroad/cr_file_saver

cr_file_saver

Cleveroad/cr_file_saver open-source repository details.

Projektcover von cr_file_saver
Sterne
3
Forks
11
Letzter Push (UTC)
21.02.2024
Projektstatus
Aktiv

Original-README

Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.

cr_file_saver

Header image

Cleveroad introduces file saver for Flutter

Features:
  • Request WriteExternalStoragePermission for Android if needed.
  • Save file to downloads directory on Android or Document folder on IOS.
  • Save file through standard file saving dialog.
Future features:
  • Saving file to a specific directory.

Setup

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  ...
  cr_file_saver: ^0.0.2
Android:

If you are using android 9 and below add this permission to project manifest:

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
iOS:

Add permissions in ios folder, go to ios/Runner/info.plist and add next keys:

<key>LSSupportsOpeningDocumentsInPlace</key>
<true/>
<key>UIFileSharingEnabled</key>
<true/>

In your dart file add the following import:

import 'package:cr_file_saver/cr_file_saver.dart';

Usage

CRFileSaver has several static methods to work with:

  • requestWriteExternalStoragePermission to check for permission and ask it if needed.
  • saveFile simply saving file with provided file path and desired file name.
  • saveFileWithDialog save file through standard file saving dialog. Note that this method will throw NoResolvedActivityException if Android device has 30 api or higher
Cleveroad GitHub avatar
GitHub-Autor

Cleveroad ↗

Professional web and mobile development company. Full-cycle IT development!

SprachenKotlinDartJavaObjective-CSwiftRubyShell

Von diesem Repository veröffentlichte Pakete

Verwendete Abhängigkeiten

Abhängigkeiten 5 Einträge

  • flutter{"sdk":"flutter"}
  • plugin_platform_interface^2.1.2
  • flutter_testEntwicklung{"sdk":"flutter"}
  • flutter_lintsEntwicklung^2.0.1
  • pigeonEntwicklung^3.2.6

Wie wähle ich ein passendes Repository?

Nach Anwendungsfall filtern, Aktivität vergleichen und vor der Nutzung das Originalprojekt prüfen.

  1. Nach Name, Autor oder Beschreibung suchen und nach Thema eingrenzen.
  2. Sterne, Forks und letzte Pushes vergleichen. Sterne zeigen Interesse, garantieren aber keine Qualität.
  3. Vor der Nutzung README, Lizenz und Issues auf GitHub prüfen.

Quellen und Pflege

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗