flutter_publitio 1.0.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 80

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);


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

1.0.2 #

  • Updated publitio pod to 1.4

1.0.3 #

  • Fixed iOS configure method


import 'package:flutter/material.dart';
import 'home_screen.dart';
import 'package:flutter_publitio/flutter_publitio.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  _MyAppState createState() => _MyAppState();

class _MyAppState extends State<MyApp> {
  void initState() {

  static configurePublitio() async {
    await FlutterPublitio.configure("YOUR_API_KEY", "YOUR_API_SECRET");

  Widget build(BuildContext context) {
    return MaterialApp(home: HomeScreen());

Use this package as a library

1. Depend on it

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

  flutter_publitio: ^1.0.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';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8


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.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies