Showing
7 changed files
with
12 additions
and
10 deletions
1 |  | 1 |  |
2 | 2 | ||
3 | -*Idiomas: Español (este archivo), [Lengua china](README.zh-cn.md), [Inglés](README.md), [Portugués de Brasil](README.pt-br.md), [Polaco](README.pl.md).* | 3 | +*Idiomas: Español (este archivo), [Lengua china](README.zh-cn.md), [Inglés](README.md), [Portugués de Brasil](README.pt-br.md), [Russo](README-ru.md), [Polaco](README.pl.md).* |
4 | 4 | ||
5 | [](https://pub.dev/packages/get) | 5 | [](https://pub.dev/packages/get) |
6 |  | 6 |  |
1 |  | 1 |  |
2 | 2 | ||
3 | -_Languages: English (this file), [Chinese](README.zh-cn.md), [Brazilian Portuguese](README.pt-br.md), [Spanish](README-es.md),[Polish](README.pl.md)._ | 3 | +_Languages: English (this file), [Chinese](README.zh-cn.md), [Brazilian Portuguese](README.pt-br.md), [Spanish](README-es.md), [Russian](README-ru.md), [Polish](README.pl.md)._ |
4 | 4 | ||
5 | [](https://pub.dev/packages/get) | 5 | [](https://pub.dev/packages/get) |
6 |  | 6 |  |
1 |  | 1 |  |
2 | 2 | ||
3 | -*Languages: [English](README.md), [Język chiński](README.zh-cn.md), [Brazilian Portuguese](README.pt-br.md), [Spanish](README-es.md), Polish (Jesteś tu).* | 3 | +*Languages: [English](README.md), [Język chiński](README.zh-cn.md), [Brazilian Portuguese](README.pt-br.md), [Spanish](README-es.md), [Russian](README-ru.md), Polish (Jesteś tu).* |
4 | 4 | ||
5 | [](https://pub.dev/packages/get) | 5 | [](https://pub.dev/packages/get) |
6 |  | 6 |  |
1 |  | 1 |  |
2 | 2 | ||
3 | -*Idiomas: [Inglês](README.md), [Língua chinesa](README.zh-cn.md), Português Brasileiro (este arquivo), [Espanhol](README-es.md), [Polaco](README.pl.md).* | 3 | +*Idiomas: [Inglês](README.md), [Chinês](README.zh-cn.md), Português Brasileiro (este arquivo), [Espanhol](README-es.md), [Russo](README-ru.md), [Polonês](README.pl.md).* |
4 | 4 | ||
5 | [](https://pub.dev/packages/get) | 5 | [](https://pub.dev/packages/get) |
6 |  | 6 |  |
1 |  | 1 |  |
2 | 2 | ||
3 | -_语言: 中文, [英文](README.md), [巴西葡萄牙语](README.pt-br.md), [西班牙语](README-es.md), [波兰语](README.pl.md)_ | 3 | +_语言: 中文, [英文](README.md), [巴西葡萄牙语](README.pt-br.md), [俄语](README-ru.md), [西班牙语](README-es.md), [波兰语](README.pl.md)_ |
4 | 4 | ||
5 | [](https://pub.dev/packages/get) | 5 | [](https://pub.dev/packages/get) |
6 |  | 6 |  |
@@ -122,15 +122,19 @@ abstract class GetNotifier<T> extends Value<T> with GetLifeCycleBase { | @@ -122,15 +122,19 @@ abstract class GetNotifier<T> extends Value<T> with GetLifeCycleBase { | ||
122 | } | 122 | } |
123 | 123 | ||
124 | extension StateExt<T> on StateMixin<T> { | 124 | extension StateExt<T> on StateMixin<T> { |
125 | - Widget obx(NotifierBuilder<T> widget, {Widget Function(String error) onError, Widget onLoading}) { | 125 | + Widget obx( |
126 | + NotifierBuilder<T> widget, { | ||
127 | + Widget Function(String error) onError, | ||
128 | + Widget onLoading, | ||
129 | + }) { | ||
126 | assert(widget != null); | 130 | assert(widget != null); |
127 | return SimpleBuilder(builder: (_) { | 131 | return SimpleBuilder(builder: (_) { |
128 | if (status.isLoading) { | 132 | if (status.isLoading) { |
129 | - return onLoading ?? CircularProgressIndicator(); | 133 | + return onLoading ?? Center(child: CircularProgressIndicator()); |
130 | } else if (status.isError) { | 134 | } else if (status.isError) { |
131 | return onError != null | 135 | return onError != null |
132 | ? onError(status.errorMessage) | 136 | ? onError(status.errorMessage) |
133 | - : Text('A error occured: ${status.errorMessage}'); | 137 | + : Center(child: Text('A error occured: ${status.errorMessage}')); |
134 | } else { | 138 | } else { |
135 | return widget(value); | 139 | return widget(value); |
136 | } | 140 | } |
-
Please register or login to post a comment