Skip to content

✨ Add predefined event-type system to create-event form#547

Open
lavigarg-simform wants to merge 1 commit into
feat/schedule-viewfrom
feat/add-event-types
Open

✨ Add predefined event-type system to create-event form#547
lavigarg-simform wants to merge 1 commit into
feat/schedule-viewfrom
feat/add-event-types

Conversation

@lavigarg-simform

@lavigarg-simform lavigarg-simform commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

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_view package API is untouched.

What's added

  • EventType enum + event_types.dart — defines the types and their presets
    (kEventTypeConfigs: color, whole-day vs. timed, duration, recurrence, optional
    image). EventMetadata stores the chosen type on CalendarEventData.event so it
    travels 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, and app_ar.arb.

Behavior change

The event description field is no longer required in the create-event form — its
mandatory validator was removed.

Checklist

  • The title of my PR starts with a [Conventional Commit] prefix (fix:, feat:, docs: etc).
  • I have followed the [Contributor Guide] when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Related Issues

None

Demo

predefined.events.demo.mp4

@lavigarg-simform lavigarg-simform changed the title ✨ Add event set to example app ✨ Add predefined event-type system to create-event form Jun 8, 2026
@lavigarg-simform lavigarg-simform marked this pull request as ready for review June 9, 2026 09:17
@lavigarg-simform lavigarg-simform force-pushed the feat/add-event-types branch 2 times, most recently from 4271b54 to 4ae7778 Compare June 9, 2026 09:29
@kavantrivedi kavantrivedi requested a review from Copilot June 11, 2026 09:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, EventTypeConfig presets, and EventMetadata stored in CalendarEventData.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.

Comment thread example/lib/widgets/schedule_view/schedule_view_event_tile.dart
Comment thread example/lib/widgets/add_event_form.dart
Comment thread example/lib/extension.dart Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants