Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
JaffaKetchup committed Mar 7, 2024
1 parent 53bdacf commit e1eeebc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class PathPicker extends StatelessWidget {
color: Theme.of(context)
.buttonTheme
.colorScheme!
.primaryFixedDim,
.primaryFixed,
),
),
),
Expand Down
1 change: 1 addition & 0 deletions lib/src/backend/errors/basic.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ final class RootAlreadyInitialised extends FMTCBackendError {
final class StoreNotExists extends FMTCBackendError {
StoreNotExists({required this.storeName});

/// The referenced store name
final String storeName;

@override
Expand Down
6 changes: 2 additions & 4 deletions lib/src/backend/impls/objectbox/backend/errors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ base class FMTCObjectBoxBackendError extends FMTCBackendError {}
/// Indicates that an export failed because the specified output path directory
/// was the same as the root directory
final class ExportInRootDirectoryForbidden extends FMTCObjectBoxBackendError {
ExportInRootDirectoryForbidden({required this.directory});

final String directory;
ExportInRootDirectoryForbidden();

@override
String toString() =>
'ExportInRootDirectoryForbidden: It is forbidden to export stores to the '
'same directory ($directory) as the `rootDirectory`';
'same directory as the `rootDirectory`';
}
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ Future<void> _worker(
final outputDir = path.dirname(outputPath);

if (outputDir == input.rootDirectory.absolute.path) {
throw ExportInRootDirectoryForbidden(directory: outputDir);
throw ExportInRootDirectoryForbidden();
}

Directory(outputDir).createSync(recursive: true);
Expand Down

0 comments on commit e1eeebc

Please sign in to comment.