Skip to content

Commit

Permalink
Merge pull request #242 from takenet/feature/563027-active-messages-u…
Browse files Browse the repository at this point in the history
…rl-media

Center the image loading
  • Loading branch information
githubdoandre authored Dec 29, 2023
2 parents 83ca0a1 + bc0dbe3 commit d177a82
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 21 deletions.
9 changes: 5 additions & 4 deletions lib/src/widgets/utils/ds_circular_progress.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ class DSCircularProgress extends StatelessWidget {
: null,
),
),
DSCaptionSmallText(
_buildProgress(),
color: foregroundColor ?? DSColors.neutralDarkCity,
)
if (currentProgress.value > 0 && maximumProgress.value > 0)
DSCaptionSmallText(
_buildProgress(),
color: foregroundColor ?? DSColors.neutralDarkCity,
)
],
),
);
Expand Down
29 changes: 12 additions & 17 deletions lib/src/widgets/utils/ds_expanded_image.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -165,23 +165,18 @@ class DSExpandedImage extends StatelessWidget {
),
);

Widget _buildLoading() => Column(
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: const EdgeInsets.symmetric(
vertical: 8.0,
),
child: Center(
child: DSSpinnerLoading(
color: style.isLightBubbleBackground(align)
? DSColors.primaryNight
: DSColors.neutralLightSnow,
size: 32.0,
lineWidth: 4.0,
),
),
Widget _buildLoading() => Center(
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 8.0,
),
],
child: DSSpinnerLoading(
color: style.isLightBubbleBackground(align)
? DSColors.primaryNight
: DSColors.neutralLightSnow,
size: 32.0,
lineWidth: 4.0,
),
),
);
}

0 comments on commit d177a82

Please sign in to comment.