storyly_flutter 1.9.0 copy "storyly_flutter: ^1.9.0" to clipboard
storyly_flutter: ^1.9.0 copied to clipboard

outdated

storyly_flutter is the official flutter package of Storyly. You can easily add stories to your Flutter app with this package.

example/lib/main.dart

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

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  StorylyViewController storylyViewController;

  @override
  void initState() {
    super.initState();
  }

  void onStorylyViewCreated(StorylyViewController storylyViewController) {
    this.storylyViewController = storylyViewController;
    // You can call any function after this.
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Container(
          // margin: const EdgeInsets.only(top: 5.0),
          height: 120,
          child: StorylyView(
            onStorylyViewCreated: onStorylyViewCreated,
            androidParam: StorylyParam()
            ..storylyId = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY2NfaWQiOjg0NiwiYXBwX2lkIjo0NzAsImluc19pZCI6NDY2fQ.5Ag5dqOxAWzKwYnuM1Voo_bTl7RMXFRh2S1EzVeI01w"
            // ..storyGroupTextColor = Color.fromARGB(255, 255, 128, 0),
            ..storyGroupTextColor = Color.fromRGBO(0, 0, 0, 0),
            
            iosParam: StorylyParam()
            ..storylyId = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY2NfaWQiOjg0NiwiYXBwX2lkIjo0NzAsImluc19pZCI6NDY2fQ.5Ag5dqOxAWzKwYnuM1Voo_bTl7RMXFRh2S1EzVeI01w"
            ..storyGroupTextColor = Color.fromRGBO(0, 0, 0, 0),
            storylyLoaded: (storyGroupList) => print("storylyLoaded"),
            storylyLoadFailed: (errorMessage) => print("storylyLoadFailed"),
            storylyActionClicked: (story) {
              print("storylyActionClicked");
              this.storylyViewController.storyDismiss();
            },
            storylyEvent: (event) => print("storylyEvent"),
            storylyStoryShown: () => print("storylyStoryShown"),
            storylyStoryDismissed: () => print("storylyStoryDismissed"),
            storylyUserInteracted: (eventPayload) => print("storylyUserInteracted")
          ),
        ),
      ),
    );
  }
}
27
likes
0
points
4.61k
downloads

Publisher

verified publisherappsamurai.com

Weekly Downloads

storyly_flutter is the official flutter package of Storyly. You can easily add stories to your Flutter app with this package.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on storyly_flutter