패키지, 저장소 및 앱 카테고리 검색

패키지 상세v1.0.2

esys_flutter_share

다른 애플리케이션과 이미지 및 텍스트를 공유하기 위한 플러터 플러그인입니다.

30일 다운로드
3.3천
좋아요
212
Pub 점수
30

패키지 설치

flutter pub add esys_flutter_share

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

EsysFlutterShare는 네이티브 공유 인텐트를 통해 텍스트 및 이미지를 다른 앱으로 원활하게 공유할 수 있는 Flutter 플러그인입니다. Android와 iOS에서 크로스플랫폼 공유를 간소화하여 사용자가 앱에서 소셜 미디어, 메시징 앱 또는 이메일 클라이언트로 콘텐츠를 직접 전송할 수 있도록 합니다. 이 플러그인은 Flutter 생태계와 원활하게 통합되며 최소한의 설정만 필요합니다. 일반 텍스트, URL, 이미지 파일의 공유를 지원하여 빠른 콘텐츠 배포가 필요한 앱에 적합합니다. 패키지는 EsysBerlin에서 유지보수되며 투명성과 커뮤니티 기여를 위해 GitHub에 호스팅되어 있습니다.

사용 사례

  • 소셜 미디어에 링크 공유
  • 앱에서 다른 앱으로 이미지 보내기
  • 공유 시트를 통한 텍스트 콘텐츠 배포
  • 사용자 생성 콘텐츠 공유 활성화
  • 메시징 플랫폼과의 통합

주요 기능

  • 텍스트 및 이미지 공유를 지원합니다
  • 크로스 플랫폼 호환성
  • 최소 구성으로 간단한 API
  • 네이티브 공유 인텐트 통합
  • 오픈소스이며 적극적으로 유지 관리되고 있습니다

적합한 대상

  • 소셜 미디어 앱
  • 사진 공유 애플리케이션
  • 콘텐츠 탐색 플랫폼
  • 사용자 생성 콘텐츠 기능
  • 간편한 외부 공유가 필요한 앱

고려 사항

  • 일부 기기에서는 플랫폼별 권한이 필요합니다
  • 기본 공유 기능에 제한됨
  • 공유 시트의 내장된 사용자 정의 없음
  • 네이티브 OS 공유 대화 상자에 의존합니다
  • 큰 이미지 파일 처리를 위해 추가 조치가 필요할 수 있습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Important Note

We have decided to discontinue the development of this library to concentrate our efforts on other projects. You can use share_plus instead for example.

esys_flutter_share

A Flutter plugin for sharing files & text with other applications.

IMPORTANT Note for iOS

If you are starting a new fresh app, you need to create the Flutter App with flutter create -i swift (see flutter/flutter#13422 (comment)), otherwise, you will get this message:

=== BUILD TARGET flutter_inappbrowser OF PROJECT Pods WITH CONFIGURATION Debug ===
The "Swift Language Version" (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. Supported values are: 3.0, 4.0, 4.2. This setting can be set in the build settings editor.

If you still have this problem, try to edit iOS Podfile like this (see #15):

target 'Runner' do
  use_frameworks!  # required by simple_permission
  ...
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '4.0'  # required by simple_permission
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end

Instead, if you have already a non-swift project, you can check this issue to solve the problem: Friction adding swift plugin to objective-c project.

Usage

Import:

import 'package:esys_flutter_share/esys_flutter_share.dart';

Share text:

Share.text('my text title', 'This is my text to share with other applications.', 'text/plain');

Share file:

final ByteData bytes = await rootBundle.load('assets/image1.png');
await Share.file('esys image', 'esys.png', bytes.buffer.asUint8List(), 'image/png', text: 'My optional text.');

Share files:

final ByteData bytes1 = await rootBundle.load('assets/image1.png');
final ByteData bytes2 = await rootBundle.load('assets/image2.png');
final ByteData bytes3 = await rootBundle.load('assets/addresses.csv');

await Share.files(
    'esys images',
    {
        'esys.png': bytes1.buffer.asUint8List(),
        'bluedan.png': bytes2.buffer.asUint8List(),
        'addresses.csv': bytes3.buffer.asUint8List(),
    },
    '*/*',
    text: 'My optional text.');

Share file from url:

var request = await HttpClient().getUrl(Uri.parse('https://shop.esys.eu/media/image/6f/8f/af/amlog_transport-berwachung.jpg'));
var response = await request.close();
Uint8List bytes = await consolidateHttpClientResponseBytes(response);
await Share.file('ESYS AMLOG', 'amlog.jpg', bytes, 'image/jpg');

Check out the example app in the Repository for further information.

카테고리

의존성

의존성 목록 1 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.