GithubHelp home page GithubHelp logo

xay7008 / flutter_content_resolver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from espresso3389/flutter_content_resolver

0.0 0.0 0.0 60 KB

A plugin that help app to call ContentResolver on Android.

License: MIT License

C++ 6.37% Java 2.71% Kotlin 36.41% Dart 53.13% CMake 1.39%

flutter_content_resolver's Introduction

content_resolver

The plugin is to resolve Android's content URI that is often used by Content providers.

Install

Add this to your package's pubspec.yaml file and execute flutter pub get:

dependencies:
  content_resolver: ^0.3.0

Usage

Resolving content

The following fragment is a use case with app_links to receive content:... URI content:

_appLinks = AppLinks(onAppLink: (uri) async {
  // If the data is some image, you can pass the data directly to Image.data or something.
  final Content content = await ContentResolver.resolveContent(uri);
  ...
});

Writing content

The following fragment illustrates how to write data to content:... URI:

  final data = Uint8List.fromList(utf8.encode('Hello World'));
  await ContentResolver.writeContent(uri.toString(), data);
  ...

Please note that if the URI is not writable, the code throws certain exception.

flutter_content_resolver's People

Contributors

espresso3389 avatar dickverweij avatar jfaltis avatar ueman avatar xay7008 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.