Browse Source

Updated docs

Anatoly Pulyaevskiy 6 years ago
parent
commit
e1402c8d1b
2 changed files with 11 additions and 5 deletions
  1. 1
    0
      .gitignore
  2. 10
    5
      doc/quick_start.md

+ 1
- 0
.gitignore View File

1
+.idea/

+ 10
- 5
doc/quick_start.md View File

12
 
12
 
13
 ```yaml
13
 ```yaml
14
 dependencies:
14
 dependencies:
15
-  zefyr: ^0.1.0
15
+  zefyr: ^0.3.0
16
 ```
16
 ```
17
 
17
 
18
 And run `flutter packages get` to install. This installs both `zefyr`
18
 And run `flutter packages get` to install. This installs both `zefyr`
20
 
20
 
21
 ### Usage
21
 ### Usage
22
 
22
 
23
-There are 3 main objects you would normally interact with in your code:
23
+There are 4 main objects you would normally interact with in your code:
24
 
24
 
25
 * `NotusDocument`, represents a rich text document and provides
25
 * `NotusDocument`, represents a rich text document and provides
26
   high-level methods for manipulating the document's state, like
26
   high-level methods for manipulating the document's state, like
30
 * `ZefyrEditor`, a Flutter widget responsible for rendering of rich text
30
 * `ZefyrEditor`, a Flutter widget responsible for rendering of rich text
31
   on the screen and reacting to user actions.
31
   on the screen and reacting to user actions.
32
 * `ZefyrController`, ties the above two objects together.
32
 * `ZefyrController`, ties the above two objects together.
33
+* `ZefyrScaffold`, allows embedding Zefyr toolbar into any custom layout.
34
+
35
+`ZefyrEditor` depends on presence of `ZefyrScaffold` somewhere up the widget tree.
33
 
36
 
34
 Normally you would need to place `ZefyrEditor` inside of a
37
 Normally you would need to place `ZefyrEditor` inside of a
35
 `StatefulWidget`. Shown below is a minimal setup required to use the
38
 `StatefulWidget`. Shown below is a minimal setup required to use the
60
 
63
 
61
   @override
64
   @override
62
   Widget build(BuildContext context) {
65
   Widget build(BuildContext context) {
63
-    return ZefyrEditor(
64
-      controller: _controller,
65
-      focusNode: _focusNode,
66
+    return ZefyrScaffold(
67
+      child: ZefyrEditor(
68
+        controller: _controller,
69
+        focusNode: _focusNode,
70
+      ),
66
     );
71
     );
67
   }
72
   }
68
 }
73
 }