Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/src/easy_loading.dart
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ class EasyLoading {
/// textAlign of status, default [TextAlign.center].
late TextAlign textAlign;

/// content padding of loading.
late EdgeInsets contentMargin;

/// content padding of loading.
late EdgeInsets contentPadding;

Expand Down Expand Up @@ -223,6 +226,7 @@ class EasyLoading {
displayDuration = const Duration(milliseconds: 2000);
animationDuration = const Duration(milliseconds: 200);
textPadding = const EdgeInsets.only(bottom: 10.0);
contentMargin = const EdgeInsets.all(50.0);
contentPadding = const EdgeInsets.symmetric(
vertical: 15.0,
horizontal: 20.0,
Expand Down
3 changes: 3 additions & 0 deletions lib/src/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ class EasyLoadingTheme {
static Duration get animationDuration =>
EasyLoading.instance.animationDuration;

/// contentMargin of loading
static EdgeInsets get contentMargin => EasyLoading.instance.contentMargin;

/// contentPadding of loading
static EdgeInsets get contentPadding => EasyLoading.instance.contentPadding;

Expand Down
2 changes: 1 addition & 1 deletion lib/src/widgets/container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class _Indicator extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
margin: const EdgeInsets.all(50.0),
margin: EasyLoadingTheme.contentMargin,
decoration: BoxDecoration(
color: EasyLoadingTheme.backgroundColor,
borderRadius: BorderRadius.circular(
Expand Down