✨ Add predefined event-type system to create-event form#547
Open
lavigarg-simform wants to merge 1 commit into
Open
✨ Add predefined event-type system to create-event form#547lavigarg-simform wants to merge 1 commit into
lavigarg-simform wants to merge 1 commit into
Conversation
bfe999e to
c93babe
Compare
c93babe to
aa1e9fb
Compare
4271b54 to
4ae7778
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a predefined event-type system to the example app (not the calendar_view package API), allowing users to choose a type (Birthday/Task/OOO/Meeting/Reminder/Event) that seeds the create-event form and enables image-backed schedule tiles, plus localized labels/descriptions.
Changes:
- Introduces
EventType,EventTypeConfigpresets, andEventMetadatastored inCalendarEventData.event(example-only payload). - Updates the add/edit event form with an event-type dropdown that applies presets and makes description optional.
- Enhances schedule tiles and details page to display event-type visuals/labels; adds l10n keys for new strings.
Reviewed changes
Copilot reviewed 10 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| example/lib/widgets/schedule_view/schedule_view_event_tile.dart | Adds image-backed tile rendering + description preview based on selected event type. |
| example/lib/widgets/add_event_form.dart | Adds type picker and preset application; removes description validator; stores EventMetadata. |
| example/lib/pages/home_page.dart | Seeds some demo events with EventMetadata(EventType...) and tightens the events list typing. |
| example/lib/pages/event_details_page.dart | Displays the localized event type label when present. |
| example/lib/l10n/app_en.arb | Adds English strings for event types and preset descriptions. |
| example/lib/l10n/app_es.arb | Adds Spanish strings for event types and preset descriptions. |
| example/lib/l10n/app_ar.arb | Adds Arabic strings for event types and preset descriptions. |
| example/lib/extension.dart | Adds extensions to read event type from payload + localize type label/description. |
| example/lib/event_types.dart | New file defining event-type presets and the EventMetadata payload. |
| example/lib/enumerations.dart | Adds EventType enum to the example’s enumerations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4ae7778 to
3569f47
Compare
f456092 to
dc7f19b
Compare
3569f47 to
a99afd3
Compare
dc7f19b to
99f57a1
Compare
a99afd3 to
cde30fa
Compare
kavantrivedi
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a predefined event-type system to the example app, Google-Calendar
style: picking a type (Birthday, Task, Out of office, Meeting, Reminder, or the
default Event) preconfigures the create-event form. Example-only — the
calendar_viewpackage API is untouched.What's added
EventTypeenum +event_types.dart— defines the types and their presets(
kEventTypeConfigs: color, whole-day vs. timed, duration, recurrence, optionalimage).
EventMetadatastores the chosen type onCalendarEventData.eventso ittravels with the event without changing the package API.
Type picker in the form (
add_event_form.dart) — a dropdown seeds color, time,duration, and recurrence from the selected type's preset. All values stay editable,
and edited events remember their type. (The description field is no longer required.)
Image-backed schedule tiles — when a type has a background image, the tile shows
it as a hero background with a scrim and light text; other tiles keep the solid tint.
A description preview line was also added.
Details page — shows the localized event-type label when present.
Demo data, assets & l10n — seeded events tagged with types, 5 background images,
and new localization keys in
app_en.arb,app_es.arb, andapp_ar.arb.Behavior change
The event description field is no longer required in the create-event form — its
mandatory validator was removed.
Checklist
fix:,feat:,docs:etc).docsand added dartdoc comments with///.examplesordocs.Breaking Change?
Related Issues
None
Demo
predefined.events.demo.mp4