zefyr 0.3.0 copy "zefyr: ^0.3.0" to clipboard
zefyr: ^0.3.0 copied to clipboard

outdated

Clean, minimalistic and collaboration-ready rich text editor for Flutter.

example/lib/main.dart

// Copyright (c) 2018, the Zefyr project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
import 'src/form.dart';
import 'src/full_page.dart';

void main() {
  runApp(new ZefyrApp());
}

class ZefyrApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Zefyr Editor',
      theme: ThemeData(primarySwatch: Colors.cyan),
      home: HomePage(),
      routes: {
        "/fullPage": buildFullPage,
        "/form": buildFormPage,
      },
    );
  }

  Widget buildFullPage(BuildContext context) {
    return FullPageEditorScreen();
  }

  Widget buildFormPage(BuildContext context) {
    return FormEmbeddedScreen();
  }
}

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final nav = Navigator.of(context);
    return Scaffold(
      appBar: AppBar(
        elevation: 1.0,
        backgroundColor: Colors.grey.shade200,
        brightness: Brightness.light,
        title: ZefyrLogo(),
      ),
      body: Column(
        children: <Widget>[
          Expanded(child: Container()),
          FlatButton(
            onPressed: () => nav.pushNamed('/fullPage'),
            child: Text('Full page editor'),
            color: Colors.lightBlue,
            textColor: Colors.white,
          ),
          FlatButton(
            onPressed: () => nav.pushNamed('/form'),
            child: Text('Embedded in a form'),
            color: Colors.lightBlue,
            textColor: Colors.white,
          ),
          Expanded(child: Container()),
        ],
      ),
    );
  }
}
304
likes
0
pub points
82%
popularity

Publisher

verified publishermemspace.app

Clean, minimalistic and collaboration-ready rich text editor for Flutter.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

collection, flutter, image_picker, meta, notus, quill_delta, url_launcher

More

Packages that depend on zefyr