Skip to content

Instantly share code, notes, and snippets.

@nkenna
Created April 14, 2022 13:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nkenna/3834778446db9012c12b28e82df88600 to your computer and use it in GitHub Desktop.
Save nkenna/3834778446db9012c12b28e82df88600 to your computer and use it in GitHub Desktop.
Configuration createConfiguration() {
// final flutterSticker = Sticker(
// "example_sticker_logos_flutter", "Flutter", "assets/Flutter-logo.png");
// final imglySticker = Sticker(
// "example_sticker_logos_imgly", "img.ly", "assets/IgorSticker.png");
/// A completely custom category.
// final logos = StickerCategory(
// "example_sticker_category_logos", "Logos", "assets/Flutter-logo.png",
// items: [flutterSticker, imglySticker]);
/// A predefined category.
final emoticons = StickerCategory.existing("imgly_sticker_category_emoticons");
/// A customized predefined category.
final shapes = StickerCategory.existing("imgly_sticker_category_shapes", items: [
Sticker.existing("imgly_sticker_shapes_badge_01"),
Sticker.existing("imgly_sticker_shapes_arrow_02")
]);
var categories = <StickerCategory>[emoticons, shapes];
final audio = AudioOptions(
canvasActions: [
AudioCanvasAction.delete,
AudioCanvasAction.playPause
],
categories: [
AudioClipCategory(
'${DateTime.now().millisecondsSinceEpoch}',
'audio-1',
items: [
AudioClip('audio-clip-1', 'https://cdn.trendybeatz.com/audio/Praiz-Save-Us-(TrendyBeatz.com).mp3')
]
)
]
);
final configuration =
Configuration(sticker: StickerOptions(personalStickers: true, categories: categories, ), audio: audio);
return configuration;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment