Files
buzz/mobile/lib/shared/widgets/media_loading_placeholder.dart
klopez4212 46e60206a4 fix(mobile): fill and stabilize content-aware loading placeholders (#8083)
Fill mobile loading views across the screen and use known image, video,
voice-note, and file shapes in message placeholders. Freeze each loading
cycle’s layout so arriving metadata cannot reshuffle the shimmer just
before content appears; preserve cached Home and forum content during
reconnects.

Validation: mobile analysis and full test suite passed (2,752 passed, 4
skipped), plus 3 unconfigured-push tests and file-size checks. Installed
and launched the loading changes on Pixel 10 before the latest main
merge. Full `just ci` was stopped during desktop checks due to low disk
space.

---------

Signed-off-by: kenny lopez <klopez4212@gmail.com>
2026-10-05 11:26:48 -04:00

28 lines
793 B
Dart

import 'package:flutter/material.dart';
import '../theme/theme.dart';
import 'skeleton.dart';
/// Fills the attachment's reserved geometry until its first frame is ready.
class MediaLoadingPlaceholder extends StatelessWidget {
final String label;
const MediaLoadingPlaceholder({required this.label, super.key});
@override
Widget build(BuildContext context) {
return Semantics(
label: label,
child: LayoutBuilder(
builder: (context, constraints) => SkeletonShimmer(
child: SkeletonBar(
width: constraints.hasBoundedWidth ? constraints.maxWidth : 240,
height: constraints.hasBoundedHeight ? constraints.maxHeight : 180,
borderRadius: BorderRadius.circular(Radii.md),
),
),
),
);
}
}