Browse Source

[plugin] Fix block item

merge-requests/33/head
Vitaliy Zarubin 2 years ago
parent
commit
5c2d8e97dc
  1. 4
      example/lib/widgets/blocks/block_item.dart
  2. 8
      packages/xdga_directories/lib/xdga_directories.dart

4
example/lib/widgets/blocks/block_item.dart

@ -49,14 +49,14 @@ class BlockItem<T> extends AppStatelessWidget {
], ],
), ),
), ),
if (!isShowProgress) if (!isShowProgress || snapshot.hasData)
TextBodyMedium( TextBodyMedium(
builder == null builder == null
? snapshot.data.toString() ? snapshot.data.toString()
: builder?.call(snapshot.data), : builder?.call(snapshot.data),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
if (isShowProgress) if (isShowProgress && !snapshot.hasData)
const SizedBox( const SizedBox(
width: 16, width: 16,
height: 16, height: 16,

8
packages/xdga_directories/lib/xdga_directories.dart

@ -14,11 +14,15 @@ final XdgaDirectoriesBindings _bindings = XdgaDirectoriesBindings(_dylib);
/// QStandardPaths::CacheLocation /// QStandardPaths::CacheLocation
String getCacheLocation() => String getCacheLocation() =>
_bindings.getCacheLocation().cast<Utf8>().toDartString().replaceAll('/qsource', ''); _bindings.getCacheLocation().cast<Utf8>().toDartString()
// @todo remove after fix EnableQtCompatibility
.replaceAll('/qsource', '');
/// QStandardPaths::AppDataLocation /// QStandardPaths::AppDataLocation
String getAppDataLocation() => String getAppDataLocation() =>
_bindings.getAppDataLocation().cast<Utf8>().toDartString().replaceAll('/qsource', ''); _bindings.getAppDataLocation().cast<Utf8>().toDartString()
// @todo remove after fix EnableQtCompatibility
.replaceAll('/qsource', '');
/// QStandardPaths::DocumentsLocation /// QStandardPaths::DocumentsLocation
String getDocumentsLocation() => String getDocumentsLocation() =>

Loading…
Cancel
Save