💄 Optimize some styling
This commit is contained in:
parent
ed2a9a21b6
commit
1fadd850b7
@ -48,7 +48,7 @@ Future<ThemeData> createAppTheme(
|
|||||||
appBarTheme: AppBarTheme(
|
appBarTheme: AppBarTheme(
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
elevation: hasAppBarBlurry ? 0 : null,
|
elevation: hasAppBarBlurry ? 0 : null,
|
||||||
backgroundColor: hasAppBarBlurry ? colorScheme.surfaceContainer.withAlpha(200) : colorScheme.primary,
|
backgroundColor: hasAppBarBlurry ? colorScheme.primary.withAlpha(200) : colorScheme.primary,
|
||||||
foregroundColor: hasAppBarBlurry ? colorScheme.onSurface : colorScheme.onPrimary,
|
foregroundColor: hasAppBarBlurry ? colorScheme.onSurface : colorScheme.onPrimary,
|
||||||
),
|
),
|
||||||
scaffoldBackgroundColor: Colors.transparent,
|
scaffoldBackgroundColor: Colors.transparent,
|
||||||
|
@ -55,17 +55,20 @@ class UniversalImage extends StatelessWidget {
|
|||||||
? null
|
? null
|
||||||
: (BuildContext context, Widget child, ImageChunkEvent? loadingProgress) {
|
: (BuildContext context, Widget child, ImageChunkEvent? loadingProgress) {
|
||||||
if (loadingProgress == null) return child;
|
if (loadingProgress == null) return child;
|
||||||
return Center(
|
return Container(
|
||||||
child: TweenAnimationBuilder(
|
constraints: BoxConstraints(maxHeight: 80),
|
||||||
tween: Tween(
|
child: Center(
|
||||||
begin: 0,
|
child: TweenAnimationBuilder(
|
||||||
end: loadingProgress.expectedTotalBytes != null
|
tween: Tween(
|
||||||
? loadingProgress.cumulativeBytesLoaded / loadingProgress.expectedTotalBytes!
|
begin: 0,
|
||||||
: 0,
|
end: loadingProgress.expectedTotalBytes != null
|
||||||
),
|
? loadingProgress.cumulativeBytesLoaded / loadingProgress.expectedTotalBytes!
|
||||||
duration: const Duration(milliseconds: 300),
|
: 0,
|
||||||
builder: (context, value, _) => CircularProgressIndicator(
|
),
|
||||||
value: loadingProgress.expectedTotalBytes != null ? value.toDouble() : null,
|
duration: const Duration(milliseconds: 300),
|
||||||
|
builder: (context, value, _) => CircularProgressIndicator(
|
||||||
|
value: loadingProgress.expectedTotalBytes != null ? value.toDouble() : null,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user