This commit is contained in:
Thibault Deckers 2023-01-30 13:58:23 +01:00
parent 0e56ce5e2d
commit d5e702266f
14 changed files with 23 additions and 23 deletions

View file

@ -33,7 +33,7 @@ class CollectionSectionHeader extends StatelessWidget {
height: height,
child: header,
)
: const SizedBox.shrink();
: const SizedBox();
}
Widget? _buildHeader(BuildContext context) {

View file

@ -203,7 +203,7 @@ class _EntryLeafletMapState<T> extends State<EntryLeafletMap<T>> with TickerProv
case EntryMapStyle.stamenWatercolor:
return const StamenWatercolorLayer();
default:
return const SizedBox.shrink();
return const SizedBox();
}
}

View file

@ -36,7 +36,7 @@ class _DebugAndroidCodecSectionState extends State<DebugAndroidCodecSection> wit
future: _loader,
builder: (context, snapshot) {
if (snapshot.hasError) return Text(snapshot.error.toString());
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
if (snapshot.connectionState != ConnectionState.done) return const SizedBox();
final codecs = snapshot.data!.map((codec) {
return codec.map((k, v) => MapEntry(k.toString(), v.toString()));
}).toList()

View file

@ -34,7 +34,7 @@ class _DebugAndroidDirSectionState extends State<DebugAndroidDirSection> with Au
future: _loader,
builder: (context, snapshot) {
if (snapshot.hasError) return Text(snapshot.error.toString());
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
if (snapshot.connectionState != ConnectionState.done) return const SizedBox();
final data = SplayTreeMap.of(snapshot.data!.map((k, v) => MapEntry(k.toString(), v?.toString() ?? 'null')));
return InfoRowGroup(info: data);
},

View file

@ -50,7 +50,7 @@ class _DebugAppDatabaseSectionState extends State<DebugAppDatabaseSection> with
builder: (context, snapshot) {
if (snapshot.hasError) return Text(snapshot.error.toString());
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
if (snapshot.connectionState != ConnectionState.done) return const SizedBox();
return Row(
children: [
@ -71,7 +71,7 @@ class _DebugAppDatabaseSectionState extends State<DebugAppDatabaseSection> with
builder: (context, snapshot) {
if (snapshot.hasError) return Text(snapshot.error.toString());
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
if (snapshot.connectionState != ConnectionState.done) return const SizedBox();
return Row(
children: [
@ -92,7 +92,7 @@ class _DebugAppDatabaseSectionState extends State<DebugAppDatabaseSection> with
builder: (context, snapshot) {
if (snapshot.hasError) return Text(snapshot.error.toString());
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
if (snapshot.connectionState != ConnectionState.done) return const SizedBox();
return Row(
children: [
@ -113,7 +113,7 @@ class _DebugAppDatabaseSectionState extends State<DebugAppDatabaseSection> with
builder: (context, snapshot) {
if (snapshot.hasError) return Text(snapshot.error.toString());
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
if (snapshot.connectionState != ConnectionState.done) return const SizedBox();
return Row(
children: [
@ -134,7 +134,7 @@ class _DebugAppDatabaseSectionState extends State<DebugAppDatabaseSection> with
builder: (context, snapshot) {
if (snapshot.hasError) return Text(snapshot.error.toString());
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
if (snapshot.connectionState != ConnectionState.done) return const SizedBox();
return Row(
children: [
@ -155,7 +155,7 @@ class _DebugAppDatabaseSectionState extends State<DebugAppDatabaseSection> with
builder: (context, snapshot) {
if (snapshot.hasError) return Text(snapshot.error.toString());
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
if (snapshot.connectionState != ConnectionState.done) return const SizedBox();
return Row(
children: [
@ -176,7 +176,7 @@ class _DebugAppDatabaseSectionState extends State<DebugAppDatabaseSection> with
builder: (context, snapshot) {
if (snapshot.hasError) return Text(snapshot.error.toString());
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
if (snapshot.connectionState != ConnectionState.done) return const SizedBox();
return Row(
children: [
@ -197,7 +197,7 @@ class _DebugAppDatabaseSectionState extends State<DebugAppDatabaseSection> with
builder: (context, snapshot) {
if (snapshot.hasError) return Text(snapshot.error.toString());
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
if (snapshot.connectionState != ConnectionState.done) return const SizedBox();
return Row(
children: [
@ -218,7 +218,7 @@ class _DebugAppDatabaseSectionState extends State<DebugAppDatabaseSection> with
builder: (context, snapshot) {
if (snapshot.hasError) return Text(snapshot.error.toString());
if (snapshot.connectionState != ConnectionState.done) return const SizedBox.shrink();
if (snapshot.connectionState != ConnectionState.done) return const SizedBox();
return Row(
children: [

View file

@ -18,7 +18,7 @@ class DebugTaskQueueOverlay extends StatelessWidget {
child: StreamBuilder<QueueState>(
stream: servicePolicy.queueStream,
builder: (context, snapshot) {
if (snapshot.hasError) return const SizedBox.shrink();
if (snapshot.hasError) return const SizedBox();
final queuedEntries = <MapEntry<dynamic, int>>[];
if (snapshot.hasData) {
final state = snapshot.data!;

View file

@ -204,7 +204,7 @@ class _AppDrawerState extends State<AppDrawer> {
stream: source.eventBus.on<AlbumsChangedEvent>(),
builder: (context, snapshot) {
final albums = settings.drawerAlbumBookmarks ?? AppDrawer.getDefaultAlbums(context);
if (albums.isEmpty) return const SizedBox.shrink();
if (albums.isEmpty) return const SizedBox();
return Column(
children: [
const Divider(),

View file

@ -40,7 +40,7 @@ class _StorageAccessPageState extends State<StorageAccessPage> {
return Text(snapshot.error.toString());
}
if (snapshot.connectionState != ConnectionState.done && _lastPaths == null) {
return const SizedBox.shrink();
return const SizedBox();
}
_lastPaths = snapshot.data!..sort();
if (_lastPaths!.isEmpty) {

View file

@ -42,7 +42,7 @@ class _MimeDonutState extends State<MimeDonut> with AutomaticKeepAliveClientMixi
Widget build(BuildContext context) {
super.build(context);
if (byMimeTypes.isEmpty) return const SizedBox.shrink();
if (byMimeTypes.isEmpty) return const SizedBox();
final l10n = context.l10n;
final locale = l10n.localeName;

View file

@ -79,7 +79,7 @@ class _MetadataSectionSliverState extends State<MetadataSectionSliver> {
builder: (context, metadata, child) {
Widget content;
if (metadata.isEmpty) {
content = const SizedBox.shrink();
content = const SizedBox();
} else {
final durations = context.watch<DurationsData>();
content = Column(

View file

@ -50,7 +50,7 @@ class _MetadataThumbnailsState extends State<MetadataThumbnails> {
),
);
}
return const SizedBox.shrink();
return const SizedBox();
});
}
}

View file

@ -40,7 +40,7 @@ class _SourceViewerPageState extends State<SourceViewerPage> {
future: _loader,
builder: (context, snapshot) {
if (snapshot.hasError) return Text(snapshot.error.toString());
if (!snapshot.hasData) return const SizedBox.shrink();
if (!snapshot.hasData) return const SizedBox();
final data = snapshot.data!;
final source = data.length < maxCodeSize ? data : '${data.substring(0, maxCodeSize)}\n\n*** TRUNCATED ***';

View file

@ -164,7 +164,7 @@ class _RasterImageViewState extends State<RasterImageView> {
return ValueListenableBuilder<bool>(
valueListenable: _fullImageLoaded,
builder: (context, fullImageLoaded, child) {
if (fullImageLoaded) return const SizedBox.shrink();
if (fullImageLoaded) return const SizedBox();
return Center(
child: AspectRatio(
@ -196,7 +196,7 @@ class _RasterImageViewState extends State<RasterImageView> {
child = ValueListenableBuilder<bool>(
valueListenable: _fullImageLoaded,
builder: (context, fullImageLoaded, child) {
if (!fullImageLoaded) return const SizedBox.shrink();
if (!fullImageLoaded) return const SizedBox();
return CustomPaint(
painter: CheckeredPainter(

View file

@ -138,7 +138,7 @@ class _VectorImageViewState extends State<VectorImageView> {
return ValueListenableBuilder<bool>(
valueListenable: _fullImageLoaded,
builder: (context, fullImageLoaded, child) {
if (fullImageLoaded) return const SizedBox.shrink();
if (fullImageLoaded) return const SizedBox();
return Center(
child: AspectRatio(