minor
This commit is contained in:
parent
0e56ce5e2d
commit
d5e702266f
14 changed files with 23 additions and 23 deletions
|
@ -33,7 +33,7 @@ class CollectionSectionHeader extends StatelessWidget {
|
|||
height: height,
|
||||
child: header,
|
||||
)
|
||||
: const SizedBox.shrink();
|
||||
: const SizedBox();
|
||||
}
|
||||
|
||||
Widget? _buildHeader(BuildContext context) {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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);
|
||||
},
|
||||
|
|
|
@ -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: [
|
||||
|
|
|
@ -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!;
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -50,7 +50,7 @@ class _MetadataThumbnailsState extends State<MetadataThumbnails> {
|
|||
),
|
||||
);
|
||||
}
|
||||
return const SizedBox.shrink();
|
||||
return const SizedBox();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 ***';
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue