open_file_linux 1.1.0 copy "open_file_linux: ^1.1.0" to clipboard
open_file_linux: ^1.1.0 copied to clipboard

PlatformLinux

Linux platform implementation of open_file

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:open_file_linux/open_file_linux.dart';

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

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final _openFileLinuxPlugin = OpenFileLinux();
  String _result = "click to open file";

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: GestureDetector(child: Text(_result),onTap: ()async{
            final resultType = await _openFileLinuxPlugin.open("/home/parallels/Downloads/c53c258fdd13ae138df5c6ff7aaa8e35.jpeg");

            setState(() {
              _result = resultType.message;
            });
          },),
        ),
      ),
    );
  }
}
0
likes
140
points
309k
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Linux platform implementation of open_file

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

ffi, flutter, open_file_platform_interface

More

Packages that depend on open_file_linux

Packages that implement open_file_linux