@@ -80,7 +80,7 @@ abstract class NgControl implements NgAttachAware, NgDetachAware {
80
80
81
81
get element => _element;
82
82
83
- get pristine => ! _dirty;
83
+ bool get pristine => ! _dirty;
84
84
set pristine (value) {
85
85
//only mark as pristine if all the child controls are pristine
86
86
if (_controls.any ((control) => control.dirty)) return ;
@@ -91,7 +91,7 @@ abstract class NgControl implements NgAttachAware, NgDetachAware {
91
91
_parentControl.pristine = true ;
92
92
}
93
93
94
- get dirty => _dirty;
94
+ bool get dirty => _dirty;
95
95
set dirty (value) {
96
96
_dirty = true ;
97
97
_animate.addClass (element, NG_DIRTY_CLASS );
@@ -102,21 +102,21 @@ abstract class NgControl implements NgAttachAware, NgDetachAware {
102
102
_parentControl.dirty = true ;
103
103
}
104
104
105
- get valid => _valid;
105
+ bool get valid => _valid;
106
106
set valid (value) {
107
107
_valid = true ;
108
108
_animate.addClass (element, NG_VALID_CLASS );
109
109
_animate.removeClass (element, NG_INVALID_CLASS );
110
110
}
111
111
112
- get invalid => ! _valid;
112
+ bool get invalid => ! _valid;
113
113
set invalid (value) {
114
114
_valid = false ;
115
115
_animate.addClass (element, NG_INVALID_CLASS );
116
116
_animate.removeClass (element, NG_VALID_CLASS );
117
117
}
118
118
119
- get touched => _touched;
119
+ bool get touched => _touched;
120
120
set touched (value) {
121
121
_touched = true ;
122
122
_animate.addClass (element, NG_TOUCHED_CLASS );
@@ -126,7 +126,7 @@ abstract class NgControl implements NgAttachAware, NgDetachAware {
126
126
_parentControl.touched = true ;
127
127
}
128
128
129
- get untouched => ! _touched;
129
+ bool get untouched => ! _touched;
130
130
set untouched (value) {
131
131
_touched = false ;
132
132
_animate.addClass (element, NG_UNTOUCHED_CLASS );
@@ -212,26 +212,26 @@ class NgNullControl implements NgControl {
212
212
get name => null ;
213
213
set name (name) {}
214
214
215
- get submitted => null ;
216
- get valid_submit => null ;
217
- get invalid_submit => null ;
215
+ bool get submitted => false ;
216
+ bool get valid_submit => true ;
217
+ bool get invalid_submit => false ;
218
218
219
- get pristine => null ;
219
+ bool get pristine => true ;
220
220
set pristine (value) {}
221
221
222
- get dirty => null ;
222
+ bool get dirty => false ;
223
223
set dirty (value) {}
224
224
225
- get valid => null ;
225
+ bool get valid => true ;
226
226
set valid (value) {}
227
227
228
- get invalid => null ;
228
+ bool get invalid => false ;
229
229
set invalid (value) {}
230
230
231
- get touched => null ;
231
+ bool get touched => false ;
232
232
set touched (value) {}
233
233
234
- get untouched => null ;
234
+ bool get untouched => true ;
235
235
set untouched (value) {}
236
236
237
237
reset () => null ;
0 commit comments