rzrobert / screen_shot_share

flutter截屏分享功能

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

截屏并分享功能,实现快速分享指定widget

Features

截屏并分享功能

功能不全,后面有时间优化

引用的三方库

Getting started

start

Usage

 final ShotController shotController = ShotController();

 ScreenShotShare(
        shotController: shotController,
        actionHeight: 100,
        actions: Row(
          mainAxisSize: MainAxisSize.min,
          children: [
            _item('QQ', 'assets/images/ic/ic_news_family_apply.png'),
            _item('微信', 'assets/images/ic/ic_news_feedback.png'),
            _item('小红书', 'assets/images/ic/default_song_cover.png'),
          ],
        ),
        child: SizeBox(),
        )
        
          Widget _item(String title, String iconPath) {
    return Padding(
      padding: const EdgeInsets.symmetric(horizontal: 5),
      child: Column(
        mainAxisSize: MainAxisSize.min,
        children: [
          Image.asset(
            iconPath,
            height: 50,
          ),
          SizedBox(
            height: 5,
          ),
          Text(
            title,
            style: TextStyle(
              fontSize: 10,
              color: Colors.white,
            ),
          )
        ],
      ),
    );
  }

Additional information

no

About

flutter截屏分享功能

License:Other


Languages

Language:Dart 71.2%Language:Objective-C 12.7%Language:Java 10.0%Language:Shell 6.1%