lucky1213 vor 4 Jahren
Ursprung
Commit
d7bf355974

+ 2
- 5
packages/zefyr/example/lib/src/full_page.dart Datei anzeigen

@@ -161,9 +161,7 @@ class _FullPageEditorScreenState extends State<FullPageEditorScreen> {
161 161
           // ),
162 162
           Expanded(
163 163
             child: ZefyrScaffold(
164
-              child: ZefyrTheme(
165
-                data: ZefyrThemeData(),
166
-                child: ZefyrEditor(
164
+              child: ZefyrEditor(
167 165
                   autofocus: false,
168 166
                   controller: _controller,
169 167
                   focusNode: _focusNode,
@@ -176,7 +174,6 @@ class _FullPageEditorScreenState extends State<FullPageEditorScreen> {
176 174
                     print(_controller.document.toJson());
177 175
                   },
178 176
                 ),
179
-              ),
180 177
             ),
181 178
           ),
182 179
         ],
@@ -188,7 +185,7 @@ class _FullPageEditorScreenState extends State<FullPageEditorScreen> {
188 185
     return GestureDetector(
189 186
       behavior: HitTestBehavior.translucent,
190 187
       onTap: () {
191
-        FocusScope.of(context).unfocus();
188
+        primaryFocus.unfocus();
192 189
       },
193 190
       child: Theme(
194 191
         data: ThemeData(primarySwatch: Colors.cyan),

+ 2
- 7
packages/zefyr/example/lib/src/images.dart Datei anzeigen

@@ -14,13 +14,8 @@ import 'package:zefyr/zefyr.dart';
14 14
 
15 15
 /// Custom image delegate used by this example to load image from application
16 16
 /// assets.
17
-class CustomImageDelegate implements ZefyrImageDelegate<ImageSource> {
18
-  @override
19
-  ImageSource get cameraSource => ImageSource.camera;
20
-
21
-  @override
22
-  ImageSource get gallerySource => ImageSource.gallery;
23
-
17
+class CustomImageDelegate implements ZefyrImageDelegate {
18
+  
24 19
   @override
25 20
   Future<String> pickImage(ImageSource source) async {
26 21
     final file = await ImagePicker.pickImage(source: source);