agent-flutter 0.1.13 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-flutter",
3
- "version": "0.1.13",
3
+ "version": "0.1.16",
4
4
  "description": "Portable Flutter skill/rule pack initializer for multiple AI IDEs.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- set -euo pipefail
2
+ set -Eeuo pipefail
3
+ trap 'echo "Error at line $LINENO: $BASH_COMMAND" >&2' ERR
3
4
 
4
5
  usage() {
5
6
  cat <<'EOF'
@@ -204,20 +205,16 @@ run_fvm() {
204
205
  ensure_fvm() {
205
206
  append_path_once "$HOME/.pub-cache/bin"
206
207
 
207
- if discover_working_fvm; then
208
- return
208
+ if ! discover_working_fvm; then
209
+ ensure_dart
209
210
  fi
210
211
 
211
- ensure_dart
212
-
213
- if discover_working_fvm; then
214
- return
212
+ if ! discover_working_fvm; then
213
+ echo "Installing FVM..."
214
+ dart pub global activate fvm >/dev/null
215
+ append_path_once "$HOME/.pub-cache/bin"
215
216
  fi
216
217
 
217
- echo "Installing FVM..."
218
- dart pub global activate fvm >/dev/null
219
- append_path_once "$HOME/.pub-cache/bin"
220
-
221
218
  if ! discover_working_fvm; then
222
219
  echo "Error: FVM installation failed or fvm is not runnable." >&2
223
220
  exit 1
@@ -261,18 +258,30 @@ echo "- App package name: $APP_PACKAGE_NAME"
261
258
  echo "- Org: $ORG_ID"
262
259
  echo "- Flutter version: $FLUTTER_VERSION"
263
260
 
261
+ echo "Preparing Flutter toolchain..."
264
262
  ensure_fvm
263
+ echo "- FVM binary: $FVM_BIN"
265
264
 
266
265
  mkdir -p "$PROJECT_DIR"
267
266
  cd "$PROJECT_DIR"
268
267
 
269
- run_fvm use "$FLUTTER_VERSION" --force
268
+ echo "Running: fvm use $FLUTTER_VERSION --force"
269
+ if ! run_fvm use "$FLUTTER_VERSION" --force; then
270
+ echo "Error: fvm use failed. Please verify your Flutter version and FVM setup." >&2
271
+ echo "Try manually: $FVM_BIN use $FLUTTER_VERSION --force" >&2
272
+ exit 1
273
+ fi
270
274
 
271
275
  create_args=(run_fvm flutter create . --org "$ORG_ID" --project-name "$APP_PACKAGE_NAME")
272
276
  if [[ "$FORCE" -eq 1 ]]; then
273
277
  create_args+=(--overwrite)
274
278
  fi
275
- "${create_args[@]}"
279
+
280
+ echo "Running: flutter create"
281
+ if ! "${create_args[@]}"; then
282
+ echo "Error: flutter create failed. Please verify Flutter SDK and project arguments." >&2
283
+ exit 1
284
+ fi
276
285
 
277
286
  mkdir -p .vscode
278
287
  cat >.vscode/settings.json <<'JSON'
@@ -291,6 +300,7 @@ run_fvm flutter pub add get flutter_bloc equatable dio retrofit json_annotation
291
300
  run_fvm flutter pub add flutter_keyboard_visibility:^6.0.0 cached_network_image:^3.3.1 flutter_inappwebview:^6.1.5 pin_code_fields:^8.0.1 gif:^2.3.0
292
301
  run_fvm flutter pub add carousel_slider:^5.1.1 smooth_page_indicator:^2.0.1
293
302
  run_fvm flutter pub add shared_preferences
303
+ run_fvm flutter pub add percent_indicator:^4.2.2
294
304
  run_fvm flutter pub add common_widget --git-url https://github.com/tuan-urani/common_widget --git-ref main
295
305
  run_fvm flutter pub add --dev build_runner retrofit_generator json_serializable
296
306
 
@@ -857,6 +867,20 @@ cat >lib/src/ui/base/interactor/page_states.dart <<'EOF'
857
867
  enum PageState { initial, loading, failure, success }
858
868
  EOF
859
869
 
870
+ cat >lib/src/enums/toast_type.dart <<'EOF'
871
+ import 'package:flutter/material.dart';
872
+
873
+ import '../utils/app_colors.dart';
874
+
875
+ enum ToastType {
876
+ success(Colors.green),
877
+ error(AppColors.error);
878
+
879
+ final Color color;
880
+ const ToastType(this.color);
881
+ }
882
+ EOF
883
+
860
884
  cat >lib/src/utils/app_shared.dart <<'EOF'
861
885
  import 'dart:async';
862
886
 
@@ -986,6 +1010,8 @@ class LocaleKey {
986
1010
 
987
1011
  static const String homeTitle = 'home_title';
988
1012
  static const String loginSessionExpires = 'loginSessionExpires';
1013
+ static const String ok = 'ok';
1014
+ static const String cancel = 'cancel';
989
1015
  static const String widgetCancel = 'widgetCancel';
990
1016
  static const String widgetConfirm = 'widgetConfirm';
991
1017
  }
@@ -997,6 +1023,8 @@ import 'locale_key.dart';
997
1023
  final Map<String, String> enUs = <String, String>{
998
1024
  LocaleKey.homeTitle: 'Home',
999
1025
  LocaleKey.loginSessionExpires: 'Login session expires!',
1026
+ LocaleKey.ok: 'OK',
1027
+ LocaleKey.cancel: 'Cancel',
1000
1028
  LocaleKey.widgetCancel: 'Cancel',
1001
1029
  LocaleKey.widgetConfirm: 'Confirm',
1002
1030
  };
@@ -1008,6 +1036,8 @@ import 'locale_key.dart';
1008
1036
  final Map<String, String> jaJp = <String, String>{
1009
1037
  LocaleKey.homeTitle: 'ホーム',
1010
1038
  LocaleKey.loginSessionExpires: 'ログインセッションが期限切れです!',
1039
+ LocaleKey.ok: 'OK',
1040
+ LocaleKey.cancel: 'キャンセル',
1011
1041
  LocaleKey.widgetCancel: 'キャンセル',
1012
1042
  LocaleKey.widgetConfirm: '決定する',
1013
1043
  };