Showing
4 changed files
with
2 additions
and
9 deletions
1 | part of 'app_pages.dart'; | 1 | part of 'app_pages.dart'; |
2 | 2 | ||
3 | -abstract class Routes{ | ||
4 | - | 3 | +abstract class Routes { |
5 | static const HOME = '/home'; | 4 | static const HOME = '/home'; |
6 | static const COUNTRY = '/country'; | 5 | static const COUNTRY = '/country'; |
7 | static const DETAILS = '/details'; | 6 | static const DETAILS = '/details'; |
@@ -261,4 +261,3 @@ class GetMaterialApp extends StatelessWidget { | @@ -261,4 +261,3 @@ class GetMaterialApp extends StatelessWidget { | ||
261 | abstract class Translations { | 261 | abstract class Translations { |
262 | Map<String, Map<String, String>> get keys; | 262 | Map<String, Map<String, String>> get keys; |
263 | } | 263 | } |
264 | - |
@@ -3,7 +3,6 @@ import 'dart:collection'; | @@ -3,7 +3,6 @@ import 'dart:collection'; | ||
3 | 3 | ||
4 | import '../rx_core/rx_interface.dart'; | 4 | import '../rx_core/rx_interface.dart'; |
5 | 5 | ||
6 | - | ||
7 | /// global object that registers against `GetX` and `Obx`, and allows the | 6 | /// global object that registers against `GetX` and `Obx`, and allows the |
8 | /// reactivity | 7 | /// reactivity |
9 | /// of those `Widgets` and Rx values. | 8 | /// of those `Widgets` and Rx values. |
@@ -115,7 +114,7 @@ class _RxImpl<T> implements RxInterface<T> { | @@ -115,7 +114,7 @@ class _RxImpl<T> implements RxInterface<T> { | ||
115 | /// print('${inputError.runtimeType}: $inputError'); // outputs > RxString: null | 114 | /// print('${inputError.runtimeType}: $inputError'); // outputs > RxString: null |
116 | /// ``` | 115 | /// ``` |
117 | void nil() { | 116 | void nil() { |
118 | - subject.add(_value=null); | 117 | + subject.add(_value = null); |
119 | } | 118 | } |
120 | 119 | ||
121 | /// Same as `toString()` but using a getter. | 120 | /// Same as `toString()` but using a getter. |
@@ -162,7 +161,6 @@ class _RxImpl<T> implements RxInterface<T> { | @@ -162,7 +161,6 @@ class _RxImpl<T> implements RxInterface<T> { | ||
162 | 161 | ||
163 | bool firstRebuild = true; | 162 | bool firstRebuild = true; |
164 | 163 | ||
165 | - | ||
166 | /// Updates the [value] and adds it to the stream, updating the observer | 164 | /// Updates the [value] and adds it to the stream, updating the observer |
167 | /// Widget, only if it's different from the previous value. | 165 | /// Widget, only if it's different from the previous value. |
168 | set value(T val) { | 166 | set value(T val) { |
@@ -186,14 +184,12 @@ class _RxImpl<T> implements RxInterface<T> { | @@ -186,14 +184,12 @@ class _RxImpl<T> implements RxInterface<T> { | ||
186 | {Function onError, void Function() onDone, bool cancelOnError}) => | 184 | {Function onError, void Function() onDone, bool cancelOnError}) => |
187 | stream.listen(onData, onError: onError, onDone: onDone); | 185 | stream.listen(onData, onError: onError, onDone: onDone); |
188 | 186 | ||
189 | - | ||
190 | /// Binds an existing stream to this Rx to keep the values in sync. | 187 | /// Binds an existing stream to this Rx to keep the values in sync. |
191 | void bindStream(Stream<T> stream) => stream.listen((va) => value = va); | 188 | void bindStream(Stream<T> stream) => stream.listen((va) => value = va); |
192 | 189 | ||
193 | Stream<R> map<R>(R mapper(T data)) => stream.map(mapper); | 190 | Stream<R> map<R>(R mapper(T data)) => stream.map(mapper); |
194 | } | 191 | } |
195 | 192 | ||
196 | - | ||
197 | /// Rx class for `bool` Type. | 193 | /// Rx class for `bool` Type. |
198 | class RxBool extends _RxImpl<bool> { | 194 | class RxBool extends _RxImpl<bool> { |
199 | RxBool([bool initial]) { | 195 | RxBool([bool initial]) { |
@@ -298,7 +294,6 @@ class RxInt extends _BaseRxNum<int> { | @@ -298,7 +294,6 @@ class RxInt extends _BaseRxNum<int> { | ||
298 | } | 294 | } |
299 | } | 295 | } |
300 | 296 | ||
301 | - | ||
302 | /// Foundation class used for custom `Types` outside the common native Dart | 297 | /// Foundation class used for custom `Types` outside the common native Dart |
303 | /// types. | 298 | /// types. |
304 | /// For example, any custom "Model" class, like User().obs will use `Rx` as | 299 | /// For example, any custom "Model" class, like User().obs will use `Rx` as |
-
Please register or login to post a comment