agent-flutter 0.1.16 → 0.1.17

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.16",
3
+ "version": "0.1.17",
4
4
  "description": "Portable Flutter skill/rule pack initializer for multiple AI IDEs.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -869,7 +869,10 @@ EOF
869
869
 
870
870
  cat >lib/src/enums/toast_type.dart <<'EOF'
871
871
  import 'package:flutter/material.dart';
872
+ import 'package:get/get.dart';
872
873
 
874
+ import '../extensions/int_extensions.dart';
875
+ import '../locale/locale_key.dart';
873
876
  import '../utils/app_colors.dart';
874
877
 
875
878
  enum ToastType {
@@ -878,6 +881,31 @@ enum ToastType {
878
881
 
879
882
  final Color color;
880
883
  const ToastType(this.color);
884
+
885
+ Widget get icon {
886
+ IconData icon;
887
+ switch (this) {
888
+ case ToastType.success:
889
+ icon = Icons.check_circle_rounded;
890
+ break;
891
+ case ToastType.error:
892
+ icon = Icons.error_rounded;
893
+ }
894
+
895
+ return Padding(
896
+ padding: 20.paddingLeft,
897
+ child: Icon(icon, size: 40, color: color),
898
+ );
899
+ }
900
+
901
+ Widget get title {
902
+ switch (this) {
903
+ case ToastType.success:
904
+ return Text(LocaleKey.success.tr, style: TextStyle(color: color));
905
+ case ToastType.error:
906
+ return Text(LocaleKey.error.tr, style: TextStyle(color: color));
907
+ }
908
+ }
881
909
  }
882
910
  EOF
883
911
 
@@ -1010,6 +1038,8 @@ class LocaleKey {
1010
1038
 
1011
1039
  static const String homeTitle = 'home_title';
1012
1040
  static const String loginSessionExpires = 'loginSessionExpires';
1041
+ static const String success = 'success';
1042
+ static const String error = 'error';
1013
1043
  static const String ok = 'ok';
1014
1044
  static const String cancel = 'cancel';
1015
1045
  static const String widgetCancel = 'widgetCancel';
@@ -1023,6 +1053,8 @@ import 'locale_key.dart';
1023
1053
  final Map<String, String> enUs = <String, String>{
1024
1054
  LocaleKey.homeTitle: 'Home',
1025
1055
  LocaleKey.loginSessionExpires: 'Login session expires!',
1056
+ LocaleKey.success: 'Success',
1057
+ LocaleKey.error: 'Error',
1026
1058
  LocaleKey.ok: 'OK',
1027
1059
  LocaleKey.cancel: 'Cancel',
1028
1060
  LocaleKey.widgetCancel: 'Cancel',
@@ -1036,6 +1068,8 @@ import 'locale_key.dart';
1036
1068
  final Map<String, String> jaJp = <String, String>{
1037
1069
  LocaleKey.homeTitle: 'ホーム',
1038
1070
  LocaleKey.loginSessionExpires: 'ログインセッションが期限切れです!',
1071
+ LocaleKey.success: '成功',
1072
+ LocaleKey.error: 'エラー',
1039
1073
  LocaleKey.ok: 'OK',
1040
1074
  LocaleKey.cancel: 'キャンセル',
1041
1075
  LocaleKey.widgetCancel: 'キャンセル',