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(
builder == null
? snapshot.data.toString()
: builder?.call(snapshot.data),
fontWeight: FontWeight.bold,
),
if (isShowProgress)
if (isShowProgress && !snapshot.hasData)
const SizedBox(
width: 16,
height: 16,

8
packages/xdga_directories/lib/xdga_directories.dart

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

Loading…
Cancel
Save