Skip to content

Commit 2ce0382

Browse files
committed
update version 1.2.0
1 parent 551af5f commit 2ce0382

11 files changed

Lines changed: 97 additions & 79 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## [1.2.0] - 2020.09.16
2+
3+
* add textStyle option [#34](https://github.com/huangjianke/flutter_easyloading/issues/34)
4+
* fixed bugs
5+
16
## [1.1.4] - 2020.03.23
27

38
* add lineWidth option [#9](https://github.com/huangjianke/flutter_easyloading/issues/9)

README-zh_CN.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
```yaml
1414
dependencies:
15-
flutter_easyloading: ^1.1.3
15+
flutter_easyloading: ^1.2.0
1616
```
1717
1818
## 导入
@@ -78,6 +78,9 @@ EasyLoadingMaskType maskType;
7878
/// 文本的对齐方式 , 默认[TextAlign.center].
7979
TextAlign textAlign;
8080
81+
/// 文本的样式 , 默认 null.
82+
TextStyle textStyle;
83+
8184
/// loading内容区域的内边距.
8285
EdgeInsets contentPadding;
8386

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Add this to your package's `pubspec.yaml` file:
1212

1313
```yaml
1414
dependencies:
15-
flutter_easyloading: ^1.1.3
15+
flutter_easyloading: ^1.2.0
1616
```
1717
1818
## Import
@@ -78,6 +78,9 @@ EasyLoadingMaskType maskType;
7878
/// textAlign of status, default [TextAlign.center].
7979
TextAlign textAlign;
8080
81+
/// textStyle of status, default null.
82+
TextStyle textStyle;
83+
8184
/// content padding of loading.
8285
EdgeInsets contentPadding;
8386

example/pubspec.lock

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,63 +5,63 @@ packages:
55
dependency: transitive
66
description:
77
name: archive
8-
url: "https://pub.dartlang.org"
8+
url: "https://pub.flutter-io.cn"
99
source: hosted
1010
version: "2.0.11"
1111
args:
1212
dependency: transitive
1313
description:
1414
name: args
15-
url: "https://pub.dartlang.org"
15+
url: "https://pub.flutter-io.cn"
1616
source: hosted
1717
version: "1.5.2"
1818
async:
1919
dependency: transitive
2020
description:
2121
name: async
22-
url: "https://pub.dartlang.org"
22+
url: "https://pub.flutter-io.cn"
2323
source: hosted
2424
version: "2.4.0"
2525
boolean_selector:
2626
dependency: transitive
2727
description:
2828
name: boolean_selector
29-
url: "https://pub.dartlang.org"
29+
url: "https://pub.flutter-io.cn"
3030
source: hosted
3131
version: "1.0.5"
3232
charcode:
3333
dependency: transitive
3434
description:
3535
name: charcode
36-
url: "https://pub.dartlang.org"
36+
url: "https://pub.flutter-io.cn"
3737
source: hosted
3838
version: "1.1.2"
3939
collection:
4040
dependency: transitive
4141
description:
4242
name: collection
43-
url: "https://pub.dartlang.org"
43+
url: "https://pub.flutter-io.cn"
4444
source: hosted
4545
version: "1.14.11"
4646
convert:
4747
dependency: transitive
4848
description:
4949
name: convert
50-
url: "https://pub.dartlang.org"
50+
url: "https://pub.flutter-io.cn"
5151
source: hosted
5252
version: "2.1.1"
5353
crypto:
5454
dependency: transitive
5555
description:
5656
name: crypto
57-
url: "https://pub.dartlang.org"
57+
url: "https://pub.flutter-io.cn"
5858
source: hosted
5959
version: "2.1.3"
6060
cupertino_icons:
6161
dependency: "direct main"
6262
description:
6363
name: cupertino_icons
64-
url: "https://pub.dartlang.org"
64+
url: "https://pub.flutter-io.cn"
6565
source: hosted
6666
version: "0.1.3"
6767
flutter:
@@ -75,14 +75,14 @@ packages:
7575
path: ".."
7676
relative: true
7777
source: path
78-
version: "1.1.1"
78+
version: "1.2.0"
7979
flutter_spinkit:
8080
dependency: transitive
8181
description:
8282
name: flutter_spinkit
83-
url: "https://pub.dartlang.org"
83+
url: "https://pub.flutter-io.cn"
8484
source: hosted
85-
version: "4.1.2"
85+
version: "4.1.2+1"
8686
flutter_test:
8787
dependency: "direct dev"
8888
description: flutter
@@ -92,49 +92,49 @@ packages:
9292
dependency: transitive
9393
description:
9494
name: image
95-
url: "https://pub.dartlang.org"
95+
url: "https://pub.flutter-io.cn"
9696
source: hosted
9797
version: "2.1.4"
9898
matcher:
9999
dependency: transitive
100100
description:
101101
name: matcher
102-
url: "https://pub.dartlang.org"
102+
url: "https://pub.flutter-io.cn"
103103
source: hosted
104104
version: "0.12.6"
105105
meta:
106106
dependency: transitive
107107
description:
108108
name: meta
109-
url: "https://pub.dartlang.org"
109+
url: "https://pub.flutter-io.cn"
110110
source: hosted
111111
version: "1.1.8"
112112
path:
113113
dependency: transitive
114114
description:
115115
name: path
116-
url: "https://pub.dartlang.org"
116+
url: "https://pub.flutter-io.cn"
117117
source: hosted
118118
version: "1.6.4"
119119
pedantic:
120120
dependency: transitive
121121
description:
122122
name: pedantic
123-
url: "https://pub.dartlang.org"
123+
url: "https://pub.flutter-io.cn"
124124
source: hosted
125125
version: "1.8.0+1"
126126
petitparser:
127127
dependency: transitive
128128
description:
129129
name: petitparser
130-
url: "https://pub.dartlang.org"
130+
url: "https://pub.flutter-io.cn"
131131
source: hosted
132132
version: "2.4.0"
133133
quiver:
134134
dependency: transitive
135135
description:
136136
name: quiver
137-
url: "https://pub.dartlang.org"
137+
url: "https://pub.flutter-io.cn"
138138
source: hosted
139139
version: "2.0.5"
140140
sky_engine:
@@ -146,63 +146,63 @@ packages:
146146
dependency: transitive
147147
description:
148148
name: source_span
149-
url: "https://pub.dartlang.org"
149+
url: "https://pub.flutter-io.cn"
150150
source: hosted
151151
version: "1.5.5"
152152
stack_trace:
153153
dependency: transitive
154154
description:
155155
name: stack_trace
156-
url: "https://pub.dartlang.org"
156+
url: "https://pub.flutter-io.cn"
157157
source: hosted
158158
version: "1.9.3"
159159
stream_channel:
160160
dependency: transitive
161161
description:
162162
name: stream_channel
163-
url: "https://pub.dartlang.org"
163+
url: "https://pub.flutter-io.cn"
164164
source: hosted
165165
version: "2.0.0"
166166
string_scanner:
167167
dependency: transitive
168168
description:
169169
name: string_scanner
170-
url: "https://pub.dartlang.org"
170+
url: "https://pub.flutter-io.cn"
171171
source: hosted
172172
version: "1.0.5"
173173
term_glyph:
174174
dependency: transitive
175175
description:
176176
name: term_glyph
177-
url: "https://pub.dartlang.org"
177+
url: "https://pub.flutter-io.cn"
178178
source: hosted
179179
version: "1.1.0"
180180
test_api:
181181
dependency: transitive
182182
description:
183183
name: test_api
184-
url: "https://pub.dartlang.org"
184+
url: "https://pub.flutter-io.cn"
185185
source: hosted
186186
version: "0.2.11"
187187
typed_data:
188188
dependency: transitive
189189
description:
190190
name: typed_data
191-
url: "https://pub.dartlang.org"
191+
url: "https://pub.flutter-io.cn"
192192
source: hosted
193193
version: "1.1.6"
194194
vector_math:
195195
dependency: transitive
196196
description:
197197
name: vector_math
198-
url: "https://pub.dartlang.org"
198+
url: "https://pub.flutter-io.cn"
199199
source: hosted
200200
version: "2.0.8"
201201
xml:
202202
dependency: transitive
203203
description:
204204
name: xml
205-
url: "https://pub.dartlang.org"
205+
url: "https://pub.flutter-io.cn"
206206
source: hosted
207207
version: "3.5.0"
208208
sdks:

lib/src/easy_loading.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import 'package:flutter/material.dart';
21
import 'dart:async';
2+
import 'package:flutter/material.dart';
33

44
import './widgets/container.dart';
55
import './widgets/progress.dart';
66
import './widgets/indicator.dart';
7-
import 'theme.dart';
7+
import './theme.dart';
88

99
/// loading style
1010
enum EasyLoadingStyle {
@@ -65,6 +65,9 @@ class EasyLoading {
6565
/// textAlign of status, default [TextAlign.center].
6666
TextAlign textAlign;
6767

68+
/// textStyle of status, default null.
69+
TextStyle textStyle;
70+
6871
/// content padding of loading.
6972
EdgeInsets contentPadding;
7073

lib/src/theme.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import 'package:flutter/material.dart';
2-
3-
import 'easy_loading.dart';
2+
import './easy_loading.dart';
43

54
class EasyLoadingTheme {
65
/// color of indicator
@@ -71,6 +70,9 @@ class EasyLoadingTheme {
7170
/// textAlign of status
7271
static TextAlign get textAlign => EasyLoading.instance.textAlign;
7372

73+
/// textStyle of status
74+
static TextStyle get textStyle => EasyLoading.instance.textStyle;
75+
7476
/// radius of loading
7577
static double get radius => EasyLoading.instance.radius;
7678

lib/src/widgets/container.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import 'package:flutter/material.dart';
21
import 'dart:async';
2+
import 'package:flutter/material.dart';
33

44
import '../theme.dart';
55

@@ -95,10 +95,11 @@ class LoadingContainerState extends State<LoadingContainer> {
9595
_status?.isNotEmpty == true
9696
? Text(
9797
_status,
98-
style: TextStyle(
99-
color: EasyLoadingTheme.textColor,
100-
fontSize: EasyLoadingTheme.fontSize,
101-
),
98+
style: EasyLoadingTheme.textStyle ??
99+
TextStyle(
100+
color: EasyLoadingTheme.textColor,
101+
fontSize: EasyLoadingTheme.fontSize,
102+
),
102103
textAlign: EasyLoadingTheme.textAlign,
103104
)
104105
: null,

lib/src/widgets/loading.dart

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,20 @@ class _FlutterEasyLoadingState extends State<FlutterEasyLoading> {
3131

3232
@override
3333
Widget build(BuildContext context) {
34-
return Directionality(
35-
child: Overlay(
36-
initialEntries: [
37-
OverlayEntry(
38-
builder: (BuildContext _context) {
39-
EasyLoading.instance.context = _context;
40-
return widget.child;
41-
},
42-
),
43-
],
34+
return Material(
35+
child: Directionality(
36+
child: Overlay(
37+
initialEntries: [
38+
OverlayEntry(
39+
builder: (BuildContext _context) {
40+
EasyLoading.instance.context = _context;
41+
return widget.child;
42+
},
43+
),
44+
],
45+
),
46+
textDirection: widget.textDirection,
4447
),
45-
textDirection: widget.textDirection,
4648
);
4749
}
4850
}

lib/src/widgets/progress.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import 'package:flutter/material.dart';
21
import 'dart:math' as math;
3-
2+
import 'package:flutter/material.dart';
43
import '../theme.dart';
54

65
class Progress extends StatefulWidget {

0 commit comments

Comments
 (0)