uri_to_file 0.1.0 copy "uri_to_file: ^0.1.0" to clipboard
uri_to_file: ^0.1.0 copied to clipboard

outdated

A Flutter plugin for converting uri to file. Supports Android.

example/lib/main.dart

import 'dart:io';

import 'package:flutter/material.dart';

import 'package:uni_links/uni_links.dart';
import 'package:uri_to_file/uri_to_file.dart';

void main() {
  runApp(MyApp());
}

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

class _MyAppState extends State<MyApp> {
  String message = '';

  @override
  void initState() {
    getInitialUri().then((value) async {
      int i;
      if (value != null) {
        try {
          File file = await UriToFile.toFile(value.toString());
          message = file.path;
          int i;
        } catch (e) {
          message = 'Exception';
          int i;
        }
        setState(() {});
      }
    });
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Uri To File'),
        ),
        body: Center(
          child: CircularProgressIndicator(),
        ),
      ),
    );
  }
}
33
likes
0
pub points
95%
popularity

Publisher

unverified uploader

A Flutter plugin for converting uri to file. Supports Android.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on uri_to_file