diff --git a/lib/src/easy_loading.dart b/lib/src/easy_loading.dart index 1193f48..243c8d7 100644 --- a/lib/src/easy_loading.dart +++ b/lib/src/easy_loading.dart @@ -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; @@ -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, diff --git a/lib/src/theme.dart b/lib/src/theme.dart index fdc645f..8ae6253 100644 --- a/lib/src/theme.dart +++ b/lib/src/theme.dart @@ -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; diff --git a/lib/src/widgets/container.dart b/lib/src/widgets/container.dart index 8cd8cbf..df1810a 100644 --- a/lib/src/widgets/container.dart +++ b/lib/src/widgets/container.dart @@ -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(