Skip to content

Commit

Permalink
chore: added path for join() method to ensure windows compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
khatruong2009 committed Sep 7, 2023
1 parent f987672 commit 076322c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
import 'dart:convert';
import 'dart:io';

import 'package:path/path.dart' as p;
import 'package:path_provider/path_provider.dart';

/// Save constraint locally to file
Future<void> saveConstraintLocally(Map<String, dynamic> constraint) async {
final directory = await getApplicationSupportDirectory();
final path = directory.path;
final file = File('$path/logging_constraint.json');
final file = File(p.join(path, 'logging_constraint.json'));
await file.writeAsString(jsonEncode(constraint));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ dependencies:
intl: ">=0.18.0 <1.0.0"
json_annotation: ^4.8.1
meta: ^1.9.1
path: ^1.8.0
path_provider: ^2.0.1
smithy: ^0.5.0+3
smithy_aws: ^0.5.0+3
Expand Down

0 comments on commit 076322c

Please sign in to comment.