view_app_share_option 0.0.1 copy "view_app_share_option: ^0.0.1" to clipboard
view_app_share_option: ^0.0.1 copied to clipboard

Akıllı dosya paylaşım Flutter plugini. iOS ve Android'de sistem paylaşım seçeneklerinde uygulamanızın görünmesini ve paylaşılan dosya yolunu yakalamanızı sağlar. --- Smart file share Flutter plugin. L [...]

example/lib/main.dart

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

import 'package:flutter/services.dart';
import 'package:view_app_share_option/view_app_share_option.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const MyApp());
}

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

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

class _MyAppState extends State<MyApp> {
  String _platformSharedFilePath = '';
  final _viewAppShareOptionPlugin = ViewAppShareOption();

  @override
  void initState() {
    super.initState();
    _viewAppShareOptionPlugin.onFileShared.listen((_) async {
      final newPath = await _viewAppShareOptionPlugin.getSharedFile() ?? 'Empty file path';
      if (!mounted) return;
      setState(() {
        _platformSharedFilePath = newPath;
      });
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Plugin example app')),
        body: Center(child: Text('Running on: $_platformSharedFilePath\n')),
      ),
    );
  }
}
1
likes
140
points
1
downloads

Publisher

unverified uploader

Weekly Downloads

Akıllı dosya paylaşım Flutter plugini. iOS ve Android'de sistem paylaşım seçeneklerinde uygulamanızın görünmesini ve paylaşılan dosya yolunu yakalamanızı sağlar. --- Smart file share Flutter plugin. Lets your app appear in system share options and catch shared file path on iOS & Android.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on view_app_share_option

Packages that implement view_app_share_option