Przeglądaj źródła

Fixed analysis warnings in examples

Anatoly Pulyaevskiy 6 lat temu
rodzic
commit
b0e10c000f

+ 1
- 1
packages/zefyr/example/lib/src/full_page.dart Wyświetl plik

@@ -32,7 +32,7 @@ final doc =
32 32
     r'g":2}},{"insert":"Of course:\nimport ‘package:flutter/material.dart’;"},{"insert":"\n","attributes":{"block":"code"}},{"insert":"import ‘package:zefyr/zefyr.dart’;"},{"insert":"\n\n","attributes":{"block":"code"}},{"insert":"void main() {"},{"insert":"\n","attributes":{"block":"code"}},{"insert":" runApp(MyZefyrApp());"},{"insert":"\n","attributes":{"block":"code"}},{"insert":"}"},{"insert":"\n","attributes":{"block":"code"}},{"insert":"\n\n\n"}]';
33 33
 
34 34
 Delta getDelta() {
35
-  return Delta.fromJson(json.decode(doc));
35
+  return Delta.fromJson(json.decode(doc) as List);
36 36
 }
37 37
 
38 38
 class _FullPageEditorScreenState extends State<FullPageEditorScreen> {

+ 3
- 2
packages/zefyr/example/lib/src/view.dart Wyświetl plik

@@ -19,7 +19,7 @@ final doc =
19 19
     r'g":2}},{"insert":"Of course:\nimport ‘package:flutter/material.dart’;"},{"insert":"\n","attributes":{"block":"code"}},{"insert":"import ‘package:zefyr/zefyr.dart’;"},{"insert":"\n\n","attributes":{"block":"code"}},{"insert":"void main() {"},{"insert":"\n","attributes":{"block":"code"}},{"insert":" runApp(MyZefyrApp());"},{"insert":"\n","attributes":{"block":"code"}},{"insert":"}"},{"insert":"\n","attributes":{"block":"code"}},{"insert":"\n\n\n"}]';
20 20
 
21 21
 Delta getDelta() {
22
-  return Delta.fromJson(json.decode(doc));
22
+  return Delta.fromJson(json.decode(doc) as List);
23 23
 }
24 24
 
25 25
 class _ViewScreen extends State<ViewScreen> {
@@ -51,7 +51,8 @@ class _ViewScreen extends State<ViewScreen> {
51 51
             ListTile(
52 52
               leading: Icon(Icons.info),
53 53
               title: Text('ZefyrView inside ListView'),
54
-              subtitle: Text('Allows embedding Notus documents in custom scrollables'),
54
+              subtitle: Text(
55
+                  'Allows embedding Notus documents in custom scrollables'),
55 56
               trailing: Icon(Icons.keyboard_arrow_down),
56 57
             ),
57 58
             Padding(