mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-05 08:40:12 +08:00
@@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
|
||||
class StyleString {
|
||||
static const double cardSpace = 8;
|
||||
static const double safeSpace = 12;
|
||||
static BorderRadius mdRadius = BorderRadius.circular(10);
|
||||
static const BorderRadius mdRadius = BorderRadius.all(Radius.circular(10));
|
||||
static const Radius imgRadius = Radius.circular(10);
|
||||
static const double aspectRatio = 16 / 10;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ class ShimmerState extends State<Shimmer> with SingleTickerProviderStateMixin {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return widget.child ?? const SizedBox();
|
||||
return widget.child ?? const SizedBox.shrink();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ class _ShimmerLoadingState extends State<ShimmerLoading> {
|
||||
|
||||
final shimmer = Shimmer.of(context)!;
|
||||
if (!shimmer.isSized) {
|
||||
return const SizedBox();
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
final shimmerSize = shimmer.size;
|
||||
final gradient = shimmer.gradient;
|
||||
|
||||
@@ -37,11 +37,12 @@ class HttpError extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 5),
|
||||
child: SelectableText(
|
||||
errMsg ?? '没有数据',
|
||||
textAlign: TextAlign.center,
|
||||
style: Theme.of(context).textTheme.titleSmall,
|
||||
scrollPhysics: const NeverScrollableScrollPhysics(),
|
||||
),
|
||||
),
|
||||
if (onReload != null)
|
||||
|
||||
@@ -97,7 +97,7 @@ class NetworkImgLayer extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
child: type == 'bg'
|
||||
? const SizedBox()
|
||||
? const SizedBox.shrink()
|
||||
: Center(
|
||||
child: Image.asset(
|
||||
type == 'avatar'
|
||||
|
||||
@@ -38,7 +38,7 @@ class _SelfSizedHorizontalListState extends State<SelfSizedHorizontalList> {
|
||||
if (height == null) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((v) => setState(() {}));
|
||||
}
|
||||
if (widget.itemCount == 0) return const SizedBox();
|
||||
if (widget.itemCount == 0) return const SizedBox.shrink();
|
||||
if (isInit) {
|
||||
return Container(
|
||||
key: infoKey,
|
||||
|
||||
Reference in New Issue
Block a user