add size to account icon placeholder

This commit is contained in:
Adam Velebil 2024-04-15 17:06:56 +02:00
parent b70914cea1
commit e71e6f3a34
No known key found for this signature in database
GPG Key ID: C9B1E4A3CBBD2E10

View File

@ -66,15 +66,19 @@ class AccountIcon extends ConsumerWidget {
fit: BoxFit.fill, fit: BoxFit.fill,
loader: IconFileLoader(ref, file), loader: IconFileLoader(ref, file),
placeholderBuilder: (BuildContext _) { placeholderBuilder: (BuildContext _) {
return DelayedVisibility( return SizedBox(
delay: const Duration(milliseconds: 10), width: _width,
child: Stack(alignment: Alignment.center, children: [ height: _height,
Opacity( child: DelayedVisibility(
opacity: 0.5, delay: const Duration(milliseconds: 10),
child: defaultWidget, child: Stack(alignment: Alignment.center, children: [
), Opacity(
const CircularProgressIndicator(), opacity: 0.5,
]), child: defaultWidget,
),
const CircularProgressIndicator(),
]),
),
); );
}); });
} }