-
Notifications
You must be signed in to change notification settings - Fork 550
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed analysis warnings, added example
- Loading branch information
1 parent
26cb7e9
commit 8598fb5
Showing
3 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
## 0.1.1 | ||
|
||
* Added `meta` package to dependencies. | ||
* Fixed analysis warnings. | ||
* Added example. | ||
|
||
## 0.1.0 | ||
|
||
* Initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// 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:notus/notus.dart'; | ||
|
||
void main() { | ||
final doc = new NotusDocument(); | ||
// Modify this document with insert, delete and format operations | ||
doc.insert( | ||
0, 'Notus package provides rich text document model for Zefyr editor'); | ||
doc.format(0, 5, NotusAttribute.bold); // Makes first word bold. | ||
doc.format(0, 0, NotusAttribute.h1); // Makes first line a heading. | ||
doc.delete(23, 10); // Deletes "rich text " segment. | ||
|
||
// Collects style attributes at 1 character in this document. | ||
doc.collectStyle(1, 0); // returned style would include "bold" and "h1". | ||
|
||
// Listen to all changes applied to this document. | ||
doc.changes.listen((change){ | ||
print(change); | ||
}); | ||
|
||
// Dispose resources allocated by this document, e.g. closes "changes" stream. | ||
// After document is closed it cannot be modified. | ||
doc.close(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
name: notus | ||
description: Rich text document model for Zefyr editor. | ||
version: 0.1.0 | ||
description: Platform-agnostic rich text document model based on Delta format and used in Zefyr editor. | ||
version: 0.1.1 | ||
author: Anatoly Pulyaevskiy <[email protected]> | ||
homepage: https://github.com/memspace/zefyr | ||
|
||
environment: | ||
sdk: '>=2.0.0-dev.58.0 <2.0.0' | ||
sdk: '>=2.0.0-dev.58.0 <3.0.0' | ||
|
||
dependencies: | ||
collection: ^1.14.6 | ||
meta: ^1.1.6 | ||
quill_delta: ^1.0.0-dev | ||
quiver_hashcode: ^1.0.0 | ||
|
||
|