2
0
mirror of https://github.com/esiur/esiur-dart.git synced 2026-04-03 17:58:21 +00:00

null-safety

This commit is contained in:
2021-07-24 13:12:43 +03:00
parent 6be04c39ed
commit 614c6853e3
48 changed files with 3022 additions and 3320 deletions

View File

@@ -1,9 +1,9 @@
import '../../Data/DataType.dart';
class TemplateDescriber {
final List<Prop> properties;
final List<Evt> events;
final List<Func> functions;
final List<Prop>? properties;
final List<Evt>? events;
final List<Func>? functions;
final String nameSpace;
final int version;
@@ -47,8 +47,8 @@ class Prop {
final String name;
final Type type;
final bool isArray;
final String readAnnotation;
final String writeAnnotation;
final String? readAnnotation;
final String? writeAnnotation;
Prop(this.name, this.type, this.isArray,
[this.readAnnotation = null, this.writeAnnotation = null]);
}
@@ -58,7 +58,7 @@ class Evt {
final bool listenable;
final Type type;
final bool isArray;
final String annotation;
final String? annotation;
Evt(this.name, this.type, this.isArray,
[this.listenable = false, this.annotation]);
@@ -69,7 +69,7 @@ class Func {
final Type returnType;
final List<Arg> argsType;
final bool isArray;
final String annotation;
final String? annotation;
Func(this.name, this.returnType, this.isArray, this.argsType,
[this.annotation = null]);