zefyr_nitro 0.10.2

  • Readme
  • Changelog
  • Installing
  • 70

Zefyr Build Status codecov #

Soft and gentle rich text editing for Flutter applications.

Zefyr is currently in early preview. If you have a feature request or found a bug, please file it at the issue tracker.

For documentation see https://github.com/memspace/zefyr.

zefyr screenshot

Installation #

Official releases of Zefyr can be installed from Dart's Pub package repository.

Note that versions from Pub track stable channel of Flutter.

To install Zefyr from Pub add zefyr package as a dependency to your pubspec.yaml:

  zefyr: [latest_version]

And run flutter packages get.

Continue to https://github.com/memspace/zefyr/blob/master/doc/concepts/quick_start.md to learn more about Zefyr and how to use it in your projects.

0.10.2 #

  • Code blocks can be copied :)
  • Font issues on web platform are now fixed <3

0.10.1-dev.0 #

The Code widget direction in zefyr editor is now ltr.

0.10.0 #

This release contains breaking changes. The entire theming layer of ZefyrEditor has been rewritten. Most notable changes include:

  • Removed selectionColor and cursorColor from ZefyrThemeData. Relying on the Flutter ThemeData.textSelectionColor and ThemeData.cursorColor instead.
  • All attribute styles moved to the new AttributeTheme class.
  • indentSize renamed to indentWidth
  • Purpose of BlockTheme changed to specify styles for particular block type (list, quote, code)
  • Removed HeadingTheme and StyleTheme
  • Added new LineTheme to describe styles of headings and paragraphs

Other changes in this release include:

  • Added: Support for Dark Mode
  • Changed: Minor tweaks to default theme
  • Fixed: ZefyrField decoration when focused appeared as disabled
  • Fixed: Caret color for iOS

0.9.1 #

  • Added: Support for iOS keyboard appearance. See ZefyrEditor.keyboardAppearance and ZefyrField.keyboardAppearance
  • Fixed: Preserve inline style when replacing formatted text from the first character (#201)
  • Fixed: Toggling toolbar between two editors (#229)

0.9.0 #

  • Feature: toggle inline styles (works for bold and italic)
  • Updated to support Flutter 1.12.0
  • Upgraded dependencies
  • Fixed analyzer issues

0.8.0 #

  • Updated to support Flutter 1.9.0 (#154)

0.7.0 #

This release contains breaking changes.

  • Breaking change: ZefyrEditor.enabled field replaced by ZefyrEditor.mode which can take one of three default values:
    • ZefyrMode.edit: the same as enabled: true, all editing controls are available to the user
    • ZefyrMode.select: user can't modify text itself, but allowed to select it and optionally apply formatting.
    • ZefyrMode.view: the same as enabled: false, read-only.
  • Added optional selectionControls field to ZefyrEditor and ZefyrEditableText. If not provided then by default uses platform-specific implementation.
  • Added support for "selectAll" action in selection toolbar.
  • Breaking change: removed ZefyrDefaultImageDelegate as well as dependency on image_picker plugin. Users are required to provide their own implementation. If image delegate is not provided then image toolbar button is disabled.
  • Breaking change: added ZefyrImageDelegate.cameraSource and ZefyrImageDelegate.gallerySource fields. For users of image_picker plugin these should return ImageSource.camera and ImageSource.gallery respectively. See documentation on implementing image support for more details.

0.6.1 #

  • Relaxed dependency constraint on image_picker library to allow latest version. Note that Zefyr 0.7 will stop depending on image_picker and introduce some breaking changes, which will be described here when 0.7 is released.

0.6.0 #

  • Updated to support Flutter 1.7.8

0.5.0 #

  • Updated to support Flutter 1.2
  • Experimental: Added non-scrollable ZefyrView widget which allows previewing Notus documents inside layouts using their own scrollables like ListView.
  • Breaking change: renamed EditableRichText to ZefyrRichText. User code is unlikely to be affected unless you've extended Zefyr with custom implementations of block widgets.
  • Breaking change: renamed RenderEditableParagraph to RenderZefyrParagraph. User code is unlikely to be affected unless you've extended Zefyr with custom implementations of block widgets.
  • Added ZefyrScope class - replaces previously used scope objects ZefyrEditableTextScope and ZefyrEditorScope. Unified all shared resources under one class.
  • Breaking change: removed ZefyrEditor.of and ZefyrEditableText.of static methods. Use ZefyrScope.of instead.

0.4.0 #

0.3.1 #

  • Fixed autofocus not being triggered when set to true for the first time.
  • Allow customizing cursor color via ZefyrTheme.

0.3.0 #

This version introduces new widget ZefyrScaffold which allows embedding Zefyr in custom layouts, like forms with multiple input fields.

It is now required to always wrap ZefyrEditor with an instance of this new widget. See examples and readme for more details.

There is also new ZefyrField widget which integrates Zefyr with material design decorations.

  • Breaking change: ZefyrEditor requires an ancestor ZefyrScaffold.
  • Upgraded to url_launcher version 4.0.0.
  • Exposed ZefyrEditor.physics property to allow customization of ScrollPhysics.
  • Added basic ZefyrField widget with material design decorations.

0.2.0 #

  • Breaking change: ZefyrImageDelegate.createImageProvider replaced with ZefyrImageDelegate.buildImage.
  • Fixed redundant updates on composing range for Android.
  • Added TextCapitalization.sentences
  • Added docs for embedding images.

0.1.2 #

  • Fixed analysis warnings.
  • UX: User taps on padding area around the editor and in empty space inside it now look for the nearest paragraph to move caret to.
  • UX: Toggle selection toolbar on double tap instead of refreshing it.

0.1.1 #

  • Fixed: Prevent sending excessive value updates to the native side which cause race conditions (#12).

0.1.0 #

  • Initial release.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  zefyr_nitro: ^0.10.2

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:zefyr_nitro/util.dart';
import 'package:zefyr_nitro/zefyr.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jul 11, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.14
  • Flutter: 1.17.5

Analysis suggestions

Package does not support Flutter platform windows


  • package:zefyr_nitro/zefyr.dart that imports:
  • package:zefyr_nitro/src/widgets/view.dart that imports:
  • package:zefyr_nitro/src/widgets/scope.dart that imports:
  • package:zefyr_nitro/src/widgets/editor.dart that imports:
  • package:zefyr_nitro/src/widgets/toolbar.dart that imports:
  • package:zefyr_nitro/src/widgets/buttons.dart that imports:
  • package:url_launcher/url_launcher.dart that declares support for platforms: android, ios, linux, macos, web

Package not compatible with SDK dart


  • zefyr_nitro that is a package requiring null.

Health issues and suggestions

Fix lib/src/widgets/__theme.dart. (-14.26 points)

Analysis of lib/src/widgets/__theme.dart reported 3 warnings:

line 231 col 5: Missing case clause for 'linux'.

line 231 col 5: Missing case clause for 'macOS'.

line 231 col 5: Missing case clause for 'windows'.

Fix lib/src/widgets/common.dart. (-14.26 points)

Analysis of lib/src/widgets/common.dart reported 3 warnings:

line 62 col 7: Missing case clause for 'linux'.

line 62 col 7: Missing case clause for 'macOS'.

line 62 col 7: Missing case clause for 'windows'.

Fix lib/src/widgets/buttons.dart. (-1 points)

Analysis of lib/src/widgets/buttons.dart reported 2 hints:

line 530 col 35: 'subhead' is deprecated and shouldn't be used. This is the term used in the 2014 version of material design. The modern term is subtitle1. This feature was deprecated after v1.13.8..

line 570 col 38: 'subhead' is deprecated and shouldn't be used. This is the term used in the 2014 version of material design. The modern term is subtitle1. This feature was deprecated after v1.13.8..

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and zefyr_nitro.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

The package description is too short. (-10 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.2 <3.0.0
clipboard_manager ^0.0.4 0.0.4
collection ^1.14.6 1.14.12 1.14.13
flutter 0.0.0
meta ^1.1.0 1.1.8 1.2.2
notus ^0.1.0 0.1.5
quill_delta ^1.0.0 1.0.2
quiver_hashcode ^2.0.0 2.0.0
url_launcher ^5.0.0 5.5.0
Transitive dependencies
flutter_web_plugins 0.0.0
platform_detect 1.4.0
plugin_platform_interface 1.0.2
pub_semver 1.4.4
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
url_launcher_linux 0.0.1+1
url_launcher_macos 0.0.1+7
url_launcher_platform_interface 1.0.7
url_launcher_web 0.1.2
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
pedantic ^1.0.0