Browse Source

Fixed analysis warnings in examples

Anatoly Pulyaevskiy 6 years ago
parent
commit
b0e10c000f

+ 1
- 1
packages/zefyr/example/lib/src/full_page.dart View File

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"}]';
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
 Delta getDelta() {
34
 Delta getDelta() {
35
-  return Delta.fromJson(json.decode(doc));
35
+  return Delta.fromJson(json.decode(doc) as List);
36
 }
36
 }
37
 
37
 
38
 class _FullPageEditorScreenState extends State<FullPageEditorScreen> {
38
 class _FullPageEditorScreenState extends State<FullPageEditorScreen> {

+ 3
- 2
packages/zefyr/example/lib/src/view.dart View File

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"}]';
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
 Delta getDelta() {
21
 Delta getDelta() {
22
-  return Delta.fromJson(json.decode(doc));
22
+  return Delta.fromJson(json.decode(doc) as List);
23
 }
23
 }
24
 
24
 
25
 class _ViewScreen extends State<ViewScreen> {
25
 class _ViewScreen extends State<ViewScreen> {
51
             ListTile(
51
             ListTile(
52
               leading: Icon(Icons.info),
52
               leading: Icon(Icons.info),
53
               title: Text('ZefyrView inside ListView'),
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
               trailing: Icon(Icons.keyboard_arrow_down),
56
               trailing: Icon(Icons.keyboard_arrow_down),
56
             ),
57
             ),
57
             Padding(
58
             Padding(