flutter_publitio 1.0.1+3

  • Readme
  • Changelog
  • Example
  • Installing
  • new69

Publit.io plugin for Flutter #

A Flutter plugin that wraps the native Publit.io API SDKs, for hosting and managing media assets (videos and images).

Getting started #

See the example directory for a complete sample app showing video upload and playback. Works on iOS and Android.

For a more advance example, check out https://github.com/syonip/flutter_video_sharing

To run the example app you'll need credentials:

  1. Create a free account at Publit.io, and get your credentials from the dashboard.
  2. Put your API key and secret in example/ios/Runner/Info.plist, and in example/lib/main.dart (replace the text "YOUR_API_KEY" and "YOUR_API_SECRET" respectively)
  3. Run the example by typing flutter run from the example directory.

Usage #

Add flutter_publitio as a dependency in your pubspec.yaml.

Configure #

await FlutterPublitio.configure("YOUR_API_KEY", "YOUR_API_SECRET");

Upload #

final uploadOptions = {
    "privacy": "1", // Marks file as publicly accessible
    "option_download": "1", // Can be downloaded by anyone
    "option_transform": "1" // Url transforms enabled
};
final response = await FlutterPublitio.uploadFile("file path", uploadOptions);

print(response["url_preview"]);

Features #

This plugin currently supports the uploadFile function. If you need more functions, please let me know by opening an issue (or make a PR 😜)

0.0.1 #

  • Supporting uploadFile

0.0.2 #

  • Added description

0.1.0 #

  • Updated readme

1.0.0 #

  • Updated example

1.0.1 #

  • Passing error back to dart on iOS

1.0.1+2 #

  • Added dartdoc

1.0.1+3 #

  • Flutter format

example/README.md

flutter_publitio_example #

Demonstrates how to use the flutter_publitio plugin.

Getting Started #

To run the example app you'll need credentials:

  1. Create a free account at Publit.io, and get your credentials from the dashboard.
  2. Put your API key and secret in example/ios/Runner/Info.plist, and in example/lib/main.dart (replace the text "YOUR_API_KEY" and "YOUR_API_SECRET" respectively)
  3. Run the example using flutter run

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_publitio: ^1.0.1+3

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_publitio/flutter_publitio.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
37
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
69
Learn more about scoring.

We analyzed this package on Dec 4, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.6

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test