story_editor 1.0.2 copy "story_editor: ^1.0.2" to clipboard
story_editor: ^1.0.2 copied to clipboard

A new Story Editor

example/lib/main.dart

import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:story_editor/story_editor.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _platformVersion = 'Unknown';
  final _storyEditorPlugin = StoryEditor();

  Future<void> initPlatformState() async {
    String storyMedia;

    try {
      storyMedia = await _storyEditorPlugin.openStoryEditor() ??
          'Unknown platform version';
    } on PlatformException {
      storyMedia = 'Failed to get platform version.';
    }

    if (!mounted) return;

    setState(() {
      _platformVersion = storyMedia;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: GestureDetector(
              onTap: () {
                initPlatformState();
              },
              child: Text('Running on: $_platformVersion\n')),
        ),
      ),
    );
  }
}
0
likes
140
points
1
downloads

Publisher

unverified uploader

Weekly Downloads

A new Story Editor

Documentation

API reference

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on story_editor

Packages that implement story_editor