Skip to content

Commit 8f1dc36

Browse files
author
nslog11
authored
Merge pull request nslogx#115 from LiLinXiang/develop
loading增加阴影配置
2 parents 0073195 + 9d58f86 commit 8f1dc36

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

lib/src/easy_loading.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ class EasyLoading {
165165

166166
/// background color of loading, only used for [EasyLoadingStyle.custom].
167167
Color? backgroundColor;
168+
169+
/// boxShadow of loading, only used for [EasyLoadingStyle.custom].
170+
List<BoxShadow>? boxShadow;
168171

169172
/// mask color of loading, only used for [EasyLoadingMaskType.custom].
170173
Color? maskColor;

lib/src/theme.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ class EasyLoadingTheme {
5353
? Colors.black.withOpacity(0.9)
5454
: Colors.white;
5555

56+
/// boxShadow color of loading
57+
static List<BoxShadow>? get boxShadow =>
58+
EasyLoading.instance.loadingStyle == EasyLoadingStyle.custom
59+
? EasyLoading.instance.boxShadow!
60+
: null;
61+
5662
/// font color of status
5763
static Color get textColor =>
5864
EasyLoading.instance.loadingStyle == EasyLoadingStyle.custom

lib/src/widgets/container.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ class _Indicator extends StatelessWidget {
195195
borderRadius: BorderRadius.circular(
196196
EasyLoadingTheme.radius,
197197
),
198+
boxShadow: EasyLoadingTheme.boxShadow,
198199
),
199200
padding: EasyLoadingTheme.contentPadding,
200201
child: Column(

0 commit comments

Comments
 (0)