Search packages, repositories and app categories

GitHub repositorymyriky/flutter_simple_sticker_view

flutter_simple_sticker_view

Flutter plugin for attach stickers on image, as you want. scalable, movable. attached image can also be export.

flutter_simple_sticker_view project cover
Stars
19
Forks
20
Last push (UTC)
Aug 7, 2021
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

flutter_simple_sticker_view

Flutter plugin for attach stickers on image, as you want. scalable, movable. attached image can also be export.

Getting Started

Add flutter_simple_sticker_view as a dependency in your pubspec.yaml file.

Check out the example directory for a sample app.

Usage

Import the library via

import 'package:flutter_simple_sticker_view/flutter_simple_sticker_view.dart';
Example
FlutterSimpleStickerView(
    Container(
      child: Center(child: Text("Hello, World!")),
    ),
    [
      Image.asset("assets/icons8-super-mario-50.png"),
      Image.asset("assets/icons8-superman-50.png"),
      Image.asset("assets/icons8-captain-america-50.png"),
      Image.asset("assets/icons8-avengers-50.png"),
      Image.asset("assets/icons8-iron-man-50.png"),
      Image.asset("assets/icons8-batman-50.png"),
      Image.asset("assets/icons8-thor-50.png"),
      Image.asset("assets/icons8-venom-head-50.png"),
      Image.asset("assets/icons8-homer-simpson-50.png"),
      Image.asset("assets/icons8-spider-man-head-50.png"),
      Image.asset("assets/icons8-harry-potter-50.png"),
      Image.asset("assets/icons8-genie-lamp-50.png"),
      Image.asset("assets/icons8-cyborg-50.png"),
      Image.asset("assets/icons8-one-ring-50.png"),
      Image.network("https://img.icons8.com/emoji/2x/wolf-emoji.png"),
      Image.network("https://img.icons8.com/emoji/2x/tiger-emoji.png"),
    ],
  )
Export Image
var _stickerView = FlutterSimpleStickerView(...);

Uint8List image = await _stickerView.exportImage();

See the example :)


Required paramsters
  • source: The screen to attach the sticker.
  • stickerList : List of sticker.
Optional parameters
  • stickerSize: default sticker size. width/height. (default is 100.0)

  • stickerMaxScale: maximum scale of sticker. (default is 2.0)

  • stickerMinScale: minimum scalof of sticker (default is 0.5)

  • panelHeight: sticker panel height. (default is 200)

  • panelBackgroundColor: background color of sticker panel.

  • panelStickerBackgroundColor: background color of sticker in panel.

  • panelStickercrossAxisCount: axis count of sticker (default is 4)

  • panelStickerAspectRatio: ratio of sticker in sticker panel. (default is 1.0)

  • devicePixelRatio: device pixel ratio for exporting image. (eg. MediaQuery.of(context).devicePixelRatio)

enjoy! 💃

Chul-won Kim GitHub avatar
GitHub author

Chul-won Kim ↗

freelancer 👨‍💻

가내수공업Vancouver, BCOfficial website ↗
LanguagesDartRubyKotlinSwiftObjective-C

Packages published by this repository

Dependencies used

Dependency list 3 items

  • flutter{"sdk":"flutter"}
  • vector_math^2.0.8
  • flutter_testDevelopment{"sdk":"flutter"}

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗