Skip to content

Commit 5e6357d

Browse files
committed
prompt tweaks
1 parent 86ecc84 commit 5e6357d

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

examples/build.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ Send In-App Message Section (placed right after In-App Messaging):
408408
- Left-aligned text and icon content (not centered)
409409
- UPPERCASE button text
410410
- On tap: adds trigger and shows SnackBar "Sent In-App Message: {type}"
411+
- Also upserts `iam_type` in the Triggers list immediately so UI reflects the sent IAM type
411412
412413
Tooltip should explain each IAM type.
413414
```
@@ -421,7 +422,7 @@ Aliases Section (placed after Send In-App Message):
421422
- Each item shows: Label | ID
422423
- Filter out "external_id" and "onesignal_id" from display (these are special)
423424
- "No Aliases Added" text when empty
424-
- ADD button -> PairInputDialog with empty Label and ID fields (single add)
425+
- ADD button -> PairInputDialog with empty Label and ID fields on the same row (single add)
425426
- ADD MULTIPLE button -> MultiPairInputDialog (dynamic rows, add/remove)
426427
- No remove/delete functionality (aliases are add-only from the UI)
427428
```
@@ -432,7 +433,7 @@ Aliases Section (placed after Send In-App Message):
432433
Emails Section:
433434
- Section title: "Emails" with info icon for tooltip
434435
- List showing email addresses
435-
- Each item shows email with delete icon
436+
- Each item shows email with an X icon (remove action)
436437
- "No Emails Added" text when empty
437438
- ADD EMAIL button -> dialog with empty email field
438439
- Collapse behavior when >5 items:
@@ -447,7 +448,7 @@ Emails Section:
447448
SMS Section:
448449
- Section title: "SMS" with info icon for tooltip
449450
- List showing phone numbers
450-
- Each item shows phone number with delete icon
451+
- Each item shows phone number with an X icon (remove action)
451452
- "No SMS Added" text when empty
452453
- ADD SMS button -> dialog with empty SMS field
453454
- Collapse behavior when >5 items (same as Emails)
@@ -459,7 +460,7 @@ SMS Section:
459460
Tags Section:
460461
- Section title: "Tags" with info icon for tooltip
461462
- List showing key-value pairs
462-
- Each item shows: Key | Value with delete icon
463+
- Each item shows key above value (stacked layout) with an X icon on the right (remove action)
463464
- "No Tags Added" text when empty
464465
- ADD button -> PairInputDialog with empty Key and Value fields (single add)
465466
- ADD MULTIPLE button -> MultiPairInputDialog (dynamic rows)
@@ -485,7 +486,7 @@ Outcome Events Section:
485486
Triggers Section:
486487
- Section title: "Triggers" with info icon for tooltip
487488
- List showing key-value pairs
488-
- Each item shows: Key | Value with delete icon
489+
- Each item shows key above value (stacked layout) with an X icon on the right (remove action)
489490
- "No Triggers Added" text when empty
490491
- ADD button -> PairInputDialog with empty Key and Value fields (single add)
491492
- ADD MULTIPLE button -> MultiPairInputDialog (dynamic rows)
@@ -495,6 +496,7 @@ Triggers Section:
495496
496497
IMPORTANT: Triggers are stored IN MEMORY ONLY during the app session.
497498
- triggersList is a List<MapEntry<String, String>> in AppViewModel
499+
- Sending an IAM button also updates the same list by setting `iam_type`
498500
- Triggers are NOT persisted to SharedPreferences
499501
- Triggers are cleared when the app is killed/restarted
500502
- This is intentional - triggers are transient test data for IAM testing
@@ -859,7 +861,7 @@ loading_overlay.dart:
859861
dialogs.dart:
860862
- All dialogs use insetPadding: EdgeInsets.symmetric(horizontal: 16) and SizedBox(width: double.maxFinite) on content for full-width layout
861863
- SingleInputDialog (one TextField)
862-
- PairInputDialog (key-value TextFields, single pair)
864+
- PairInputDialog (key-value TextFields on the same row, single pair)
863865
- MultiPairInputDialog (dynamic rows with dividers between them, X icon to delete a row, full-width dialog, batch submit)
864866
- MultiSelectRemoveDialog (CheckboxListTile for batch remove)
865867
- LoginDialog, OutcomeDialog, TrackEventDialog

examples/demo/lib/viewmodels/app_viewmodel.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ class AppViewModel extends ChangeNotifier {
275275

276276
void sendInAppMessage(InAppMessageType type) {
277277
_repository.addTrigger('iam_type', type.triggerValue);
278+
_triggersList = List.from(_triggersList)
279+
..removeWhere((e) => e.key == 'iam_type')
280+
..add(MapEntry('iam_type', type.triggerValue));
281+
notifyListeners();
278282
_showSnackBar('Sent In-App Message: ${type.label}');
279283
}
280284

0 commit comments

Comments
 (0)