Skip to content

Commit

Permalink
chore: format files
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobaraujo7 committed Jan 25, 2024
1 parent a4c4a15 commit c2cf8fe
Show file tree
Hide file tree
Showing 7 changed files with 262 additions and 18 deletions.
23 changes: 23 additions & 0 deletions lib/app/(public)/config/edit_platform_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,29 @@ class _EditPlatformPageState extends State<EditPlatformPage> {
}
},
),
const Gap(17),
if (platform.category.id != 'android')
TextFormField(
key: Key(beautifyPath('${platform.folderCover ?? platform.folder}_cover')),
decoration: InputDecoration(
border: const OutlineInputBorder(),
labelText: 'import_covers'.i18n(),
suffixIcon: const Icon(Icons.folder),
),
initialValue: beautifyPath(platform.folderCover ?? platform.folder),
readOnly: true,
onTap: () async {
final selectedDirectory = await getDirectoryPath();

if (selectedDirectory != null) {
setState(() {
platform = platform.copyWith(
folderCover: selectedDirectory,
);
});
}
},
),
const Gap(50),
],
),
Expand Down
2 changes: 2 additions & 0 deletions lib/app/data/repositories/isar/adapters/platform_adapter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ abstract class PlatformAdapter {
data.lastUpdate = DateTime.now();
data.playerPackageId = model.player?.app.package;
data.playerExtra = model.player?.extra;
data.folderCover = model.folderCover;
return data;
}

Expand Down Expand Up @@ -58,6 +59,7 @@ abstract class PlatformAdapter {
extra: model.playerExtra,
),
games: model.games.map((e) => gameFromData(e)).toList(),
folderCover: model.folderCover,
);
}

Expand Down
1 change: 1 addition & 0 deletions lib/app/data/repositories/isar/db/platform_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class PlatformData {
late String category;
String? playerPackageId;
String? playerExtra;
String? folderCover;
late String folder;
late DateTime lastUpdate;
List<GameData> games = [];
Expand Down
238 changes: 223 additions & 15 deletions lib/app/data/repositories/isar/db/platform_data.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c2cf8fe

Please sign in to comment.