Skip to content

Commit

Permalink
fix: Support for masamune_picker changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathrunet committed Jun 27, 2023
1 parent d5fb193 commit 3c01f86
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 31 deletions.
39 changes: 9 additions & 30 deletions packages/katana_cli/lib/action/app/picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,35 +51,14 @@ class AppPickerCliAction extends CliCommand with CliActionMixin {
.map((key, value) => MapEntry(key, value.toString()))
.where((key, value) => value.isNotEmpty),
);
final platform = picker.get("platform", "any");
switch (platform) {
case "mobile":
await command(
"Import packages.",
[
flutter,
"pub",
"add",
"masamune_picker_mobile",
],
);
break;
case "any":
await command(
"Import packages.",
[
flutter,
"pub",
"add",
"masamune_picker_file",
],
);
break;
default:
error(
"The item [app]->[picker]->[platform] is missing. Write `any` or `mobile`.",
);
return;
}
await command(
"Import packages.",
[
flutter,
"pub",
"add",
"masamune_picker",
],
);
}
}
1 change: 0 additions & 1 deletion packages/katana_cli/lib/config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ app:
# `en`や`ja`などを記載しそこにその言語でのメッセージを記述してください。
picker:
enable: false
platform: any
permission:
en: Use the library for profile images.
Expand Down

0 comments on commit 3c01f86

Please sign in to comment.