agent-flutter 0.1.16 → 0.1.18
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
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
set -Eeuo pipefail
|
|
3
3
|
trap 'echo "Error at line $LINENO: $BASH_COMMAND" >&2' ERR
|
|
4
4
|
|
|
5
|
+
if [[ -z "${BASH_VERSION:-}" ]]; then
|
|
6
|
+
echo "Error: Please run this script with bash." >&2
|
|
7
|
+
exit 1
|
|
8
|
+
fi
|
|
9
|
+
|
|
5
10
|
usage() {
|
|
6
11
|
cat <<'EOF'
|
|
7
12
|
Bootstrap a new Flutter template project (script-first workflow).
|
|
@@ -178,10 +183,10 @@ discover_working_fvm() {
|
|
|
178
183
|
fi
|
|
179
184
|
|
|
180
185
|
if command -v which >/dev/null 2>&1; then
|
|
181
|
-
|
|
186
|
+
for candidate in $(which -a fvm 2>/dev/null); do
|
|
182
187
|
[[ -n "$candidate" ]] || continue
|
|
183
188
|
candidates+=("$candidate")
|
|
184
|
-
done
|
|
189
|
+
done
|
|
185
190
|
fi
|
|
186
191
|
|
|
187
192
|
if [[ -x "$pub_cache_fvm" ]]; then
|
|
@@ -869,7 +874,10 @@ EOF
|
|
|
869
874
|
|
|
870
875
|
cat >lib/src/enums/toast_type.dart <<'EOF'
|
|
871
876
|
import 'package:flutter/material.dart';
|
|
877
|
+
import 'package:get/get.dart';
|
|
872
878
|
|
|
879
|
+
import '../extensions/int_extensions.dart';
|
|
880
|
+
import '../locale/locale_key.dart';
|
|
873
881
|
import '../utils/app_colors.dart';
|
|
874
882
|
|
|
875
883
|
enum ToastType {
|
|
@@ -878,6 +886,31 @@ enum ToastType {
|
|
|
878
886
|
|
|
879
887
|
final Color color;
|
|
880
888
|
const ToastType(this.color);
|
|
889
|
+
|
|
890
|
+
Widget get icon {
|
|
891
|
+
IconData icon;
|
|
892
|
+
switch (this) {
|
|
893
|
+
case ToastType.success:
|
|
894
|
+
icon = Icons.check_circle_rounded;
|
|
895
|
+
break;
|
|
896
|
+
case ToastType.error:
|
|
897
|
+
icon = Icons.error_rounded;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
return Padding(
|
|
901
|
+
padding: 20.paddingLeft,
|
|
902
|
+
child: Icon(icon, size: 40, color: color),
|
|
903
|
+
);
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
Widget get title {
|
|
907
|
+
switch (this) {
|
|
908
|
+
case ToastType.success:
|
|
909
|
+
return Text(LocaleKey.success.tr, style: TextStyle(color: color));
|
|
910
|
+
case ToastType.error:
|
|
911
|
+
return Text(LocaleKey.error.tr, style: TextStyle(color: color));
|
|
912
|
+
}
|
|
913
|
+
}
|
|
881
914
|
}
|
|
882
915
|
EOF
|
|
883
916
|
|
|
@@ -1010,6 +1043,8 @@ class LocaleKey {
|
|
|
1010
1043
|
|
|
1011
1044
|
static const String homeTitle = 'home_title';
|
|
1012
1045
|
static const String loginSessionExpires = 'loginSessionExpires';
|
|
1046
|
+
static const String success = 'success';
|
|
1047
|
+
static const String error = 'error';
|
|
1013
1048
|
static const String ok = 'ok';
|
|
1014
1049
|
static const String cancel = 'cancel';
|
|
1015
1050
|
static const String widgetCancel = 'widgetCancel';
|
|
@@ -1023,6 +1058,8 @@ import 'locale_key.dart';
|
|
|
1023
1058
|
final Map<String, String> enUs = <String, String>{
|
|
1024
1059
|
LocaleKey.homeTitle: 'Home',
|
|
1025
1060
|
LocaleKey.loginSessionExpires: 'Login session expires!',
|
|
1061
|
+
LocaleKey.success: 'Success',
|
|
1062
|
+
LocaleKey.error: 'Error',
|
|
1026
1063
|
LocaleKey.ok: 'OK',
|
|
1027
1064
|
LocaleKey.cancel: 'Cancel',
|
|
1028
1065
|
LocaleKey.widgetCancel: 'Cancel',
|
|
@@ -1036,6 +1073,8 @@ import 'locale_key.dart';
|
|
|
1036
1073
|
final Map<String, String> jaJp = <String, String>{
|
|
1037
1074
|
LocaleKey.homeTitle: 'ホーム',
|
|
1038
1075
|
LocaleKey.loginSessionExpires: 'ログインセッションが期限切れです!',
|
|
1076
|
+
LocaleKey.success: '成功',
|
|
1077
|
+
LocaleKey.error: 'エラー',
|
|
1039
1078
|
LocaleKey.ok: 'OK',
|
|
1040
1079
|
LocaleKey.cancel: 'キャンセル',
|
|
1041
1080
|
LocaleKey.widgetCancel: 'キャンセル',
|