{"id":22271337,"url":"https://github.com/programmingwormhole/calendar_fixed","last_synced_at":"2025-03-25T15:52:33.122Z","repository":{"id":216055633,"uuid":"740358362","full_name":"programmingwormhole/calendar_fixed","owner":"programmingwormhole","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-08T07:24:38.000Z","size":4613,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T14:18:53.333Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/programmingwormhole.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-08T07:23:26.000Z","updated_at":"2024-01-08T07:24:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"81918a11-71e3-4f63-826d-df1513d62db0","html_url":"https://github.com/programmingwormhole/calendar_fixed","commit_stats":null,"previous_names":["programmingwormhole/calendar_fixed"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programmingwormhole%2Fcalendar_fixed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programmingwormhole%2Fcalendar_fixed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programmingwormhole%2Fcalendar_fixed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/programmingwormhole%2Fcalendar_fixed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/programmingwormhole","download_url":"https://codeload.github.com/programmingwormhole/calendar_fixed/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245495686,"owners_count":20624806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T12:11:45.634Z","updated_at":"2025-03-25T15:52:33.099Z","avatar_url":"https://github.com/programmingwormhole.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flutter_neat_and_clean_calendar\n\n![Repo Card](https://github.com/rwbr/flutter_neat_and_clean_calendar/blob/main/img/github-repo-card.png)\n\nSimple flutter calendar based on [flutter_clean_calendar](https://github.com/pmcarlos/flutter_clean_calendar) package.\nThis package offers some extra functionality. It introduced a new **NeatCleanCalendarEvent** object, that gets used as the data component transfered the calendar widget as a parameter. So it is possible now to color the dots in the **Calendartiles** with a color corresponding to the event. \n\nThe event list below the calendar view is generated bei the package. Here the extra data of the **NetCleanCalendarEvent** objects again come into play. \n\nThe package is highly customizable.\n\n![Screenshot](https://github.com/rwbr/flutter_neat_and_clean_calendar/blob/main/img/screen1.png)\n![Screenshot](https://github.com/rwbr/flutter_neat_and_clean_calendar/blob/main/img/screen2.png)\n![Screenshot](https://github.com/rwbr/flutter_neat_and_clean_calendar/blob/main/img/screen3.png)\n\nThe calendar view shows a list of events for the selected date. This list view supports **three different types of events:**\n\n* Single day event (starts and ends at certain time on a single day)\n* All-day events (Span over a full day with no specific start and end time, property `isAllDay`)\n* Multi-day events (Start at a specific time on one day and end at a specific time on another day, property `isMultiDay`)\n\n![Event types](https://github.com/rwbr/flutter_neat_and_clean_calendar/blob/main/img/different-events.png)\n\nThe property `isAllDay` has a higher priority than 'isMultiDay'. This means, that when you set `isAllDay` to `true` for an event, it will show up in the events list als all-day event without start and end times, no matter if `isMultiDay` was also set to `true`.\n\nYou can include images in calendar events. The property `icon` takes a String of the image name. This parameter is optional. \n\nTo control the width of the image you can use the property `wide`, which is a bool. \n\n## Usage\n\nEmbed the 'Calendar' widget in a column. Below the calendar (as the second widget in the Column) place a 'ListView.builder' widget for rendereing the list of events.\n\n### Set dependency\n\n```\ndependencies:\n  flutter_neat_and_clean_calendar: ^0.3.0+12\n```\n\n### Install\n\n```\nflutter pub get\n```\n\n### Import it\n\n```dart\nimport 'package:flutter_neat_and_clean_calendar/flutter_neat_and_clean_calendar.dart';\n```\n\n### Use it\n\n```dart\nWidget build(BuildContext context) {\n  return Scaffold(\n    body: SafeArea(\n      child: Calendar(\n        startOnMonday: true,\n        weekDays: ['Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So'],\n        eventsList: _eventList,\n        isExpandable: true,\n        eventDoneColor: Colors.green,\n        selectedColor: Colors.pink,\n        selectedTodayColor: Colors.red,\n        todayColor: Colors.blue,\n        eventColor: null,\n        locale: 'de_DE',\n        todayButtonText: 'Heute',\n        allDayEventText: 'Ganztägig',\n        multiDayEndText: 'Ende',\n        isExpanded: true,\n        expandableDateFormat: 'EEEE, dd. MMMM yyyy',\n        datePickerType: DatePickerType.date,\n        dayOfWeekStyle: TextStyle(\n            color: Colors.black, fontWeight: FontWeight.w800, fontSize: 11),\n      ),\n    ),\n    floatingActionButton: FloatingActionButton(\n      onPressed: () {},\n      child: const Icon(Icons.add),\n      backgroundColor: Colors.green,\n    ),\n  );\n}\n```\n\nFor more details see the **example**.\n## Properties\n\n```dart\n/// [onDateSelected] is of type [ValueChanged\u003cDateTime\u003e] and it containes the callback function\n///     extecuted when tapping a date\n/// [onMonthChanged] is of type [ValueChanged\u003cDateTime\u003e] and it containes the callback function\n///     extecuted when changing to another month\n/// [onExpandStateChanged] is of type [ValueChanged\u003cbool\u003e] and it contains a callback function\n///     executed when the view changes to expanded or to condensed\n/// [onRangeSelected] contains a callback function of type [ValueChanged], that gets called on changes\n///     of the range (switch to next or previous week or month)\n/// [onEventSelected] is of type [ValueChanged\u003cNeatCleanCalendarEvent\u003e] and it contains a callback function\n///     executed when an event of the event list is selected\n/// [onEventLongPressed] is of type [ValueChanged\u003cNeatCleanCalendarEvent\u003e] and it contains a callback function\n///     executed when an event of the event list is long pressed\n/// [datePickerType] defines, if the date picker should get displayed and selects its type\n///    Choose between datePickerType.hidden, datePickerType.year, datePickerType.date\n/// [isExpandable] is a [bool]. With this parameter you can control, if the view can expand from week view\n///     to month view. Default is [false].\n/// [dayBuilder] can contain a [Widget]. If this property is not null (!= null), this widget will get used to\n///     render the calenar tiles (so you can customize the view)\n/// [eventListBuilder] can optionally contain a [Widget] that gets used to render the event list\n/// [hideArrows] is a bool. When set to [true] the arrows to navigate to the next or previous week/month in the\n///     top bar well get suppressed. Default is [false].\n/// [hideTodayIcon] is a bool. When set to [true] the dispaly of the Today-Icon (button to navigate to today) in the\n///     top bar well get suppressed. Default is [false].\n/// [hideBottomBar] at the moment has no function. Default is [false].\n/// [events] are of type [Map\u003cDateTime, List\u003cNeatCleanCalendarEvent\u003e\u003e]. This data structure containes the events to display\n/// [defaultDayColor] is the color applied to days in the current month, that are not selected.\n/// [defaultOutOfMonthDayColor] is the color applied to days outside the current month.\n/// [selctedColor] this is the color, applied to the circle on the selcted day\n/// [todayColor] this is the color of the date of today\n/// [todayButtonText] is a [String]. With this property you can set the caption of the today icon (button to navigate to today).\n///     If left empty, the calendar will use the string \"Today\".\n/// [allDayEventText] is a [String]. With this property you can set the caption of the all day event. If left empty, the\n///     calendar will use the string \"All day\".\n/// [multiDayEndText] is a [String]. With this property you can set the caption of the end of a multi day event. If left empty, the\n///    calendar will use the string \"End\".\n/// [eventColor] lets you optionally specify the color of the event (dot). If the [CleanCaendarEvents] property color is not set, the\n///     calendar will use this parameter.\n/// [eventDoneColor] with this property you can define the color of \"done\" events, that is events in the past.\n/// [initialDate] is of type [DateTime]. It can contain an optional start date. This is the day, that gets initially selected\n///     by the calendar. The default is to not set this parameter. Then the calendar uses [DateTime.now()]\n/// [isExpanded] is a bool. If is us set to [true], the calendar gets rendered in month view.\n/// [weekDays] contains a [List\u003cString\u003e] defining the names of the week days, so that it is possible to name them according\n///     to your current locale.\n/// [locale] is a [String]. This setting gets used to format dates according to the current locale.\n/// [startOnMonday] is a [bool]. This parameter allows the calendar to determine the first day of the week.\n/// [dayOfWeekStyle] is a [TextStyle] for styling the text of the weekday names in the top bar.\n/// [bottomBarTextStyle] is a [TextStyle], that sets the style of the text in the bottom bar.\n/// [bottomBarArrowColor] can set the [Color] of the arrow to expand/compress the calendar in the bottom bar.\n/// [bottomBarColor] sets the [Color] of the bottom bar\n/// [expandableDateFormat] defines the formatting of the date in the bottom bar\n/// [displayMonthTextStyle] is a [TextStyle] for styling the month name in the top bar.\n/// [datePickerConfig] is a [DatePickerConfig] object. It contains the configuration of the date picker, if enabled.\n\nfinal ValueChanged\u003cDateTime\u003e? onDateSelected;\nfinal ValueChanged\u003cDateTime\u003e? onMonthChanged;\nfinal ValueChanged\u003cbool\u003e? onExpandStateChanged;\nfinal ValueChanged? onRangeSelected;\nfinal ValueChanged\u003cNeatCleanCalendarEvent\u003e? onEventSelected;\nfinal ValueChanged\u003cNeatCleanCalendarEvent\u003e? onEventLongPressed;\nfinal bool isExpandable;\nfinal DayBuilder? dayBuilder;\nfinal EventListBuilder? eventListBuilder;\nfinal DatePickerType? datePickerType;\nfinal bool hideArrows;\nfinal bool hideTodayIcon;\n@Deprecated(\n    'Use `eventsList` instead. Will be removed in NeatAndCleanCalendar 0.4.0')\nfinal Map\u003cDateTime, List\u003cNeatCleanCalendarEvent\u003e\u003e? events;\nfinal List\u003cNeatCleanCalendarEvent\u003e? eventsList;\nfinal Color? defaultDayColor;\nfinal Color? defaultOutOfMonthDayColor;\nfinal Color? selectedColor;\nfinal Color? selectedTodayColor;\nfinal Color? todayColor;\nfinal String todayButtonText;\nfinal String allDayEventText;\nfinal String multiDayEndText;\nfinal Color? eventColor;\nfinal Color? eventDoneColor;\nfinal DateTime? initialDate;\nfinal bool isExpanded;\nfinal List\u003cString\u003e weekDays;\nfinal String? locale;\nfinal bool startOnMonday;\nfinal bool hideBottomBar;\nfinal TextStyle? dayOfWeekStyle;\nfinal TextStyle? bottomBarTextStyle;\nfinal Color? bottomBarArrowColor;\nfinal Color? bottomBarColor;\nfinal String? expandableDateFormat;\nfinal TextStyle? displayMonthTextStyle;\nfinal DatePickerConfig? datePickerConfig;\n```\n\n## Sample event data\n\nThe syntax of the event map changed due to the introduction of the 'NeatCleanCalendarEvent' class.\n\n```dart\nfinal List\u003cNeatCleanCalendarEvent\u003e _eventList = [\n  NeatCleanCalendarEvent('MultiDay Event A',\n      startTime: DateTime(DateTime.now().year, DateTime.now().month,\n          DateTime.now().day, 10, 0),\n      endTime: DateTime(DateTime.now().year, DateTime.now().month,\n          DateTime.now().day + 2, 12, 0),\n      color: Colors.orange,\n      isMultiDay: true),\n  NeatCleanCalendarEvent('Allday Event B',\n      startTime: DateTime(DateTime.now().year, DateTime.now().month,\n          DateTime.now().day - 2, 14, 30),\n      endTime: DateTime(DateTime.now().year, DateTime.now().month,\n          DateTime.now().day + 2, 17, 0),\n      color: Colors.pink,\n      isAllDay: true),\n  NeatCleanCalendarEvent('Normal Event D',\n      startTime: DateTime(DateTime.now().year, DateTime.now().month,\n          DateTime.now().day, 14, 30),\n      endTime: DateTime(DateTime.now().year, DateTime.now().month,\n          DateTime.now().day, 17, 0),\n      color: Colors.indigo),\n];\n```\n\n**CAUTION**: from v0.3.0 on the preferred way to set the calendar events is to provide a list (property `eventsList`). You can still use a map (property `events`) to do this, but this functionality is **DEPRECATED** and will get **removed from v0.4.0 on**.\n\n## Examples\n\n### Basic widget with customized colors\n\nSome colors were cutomized in this example:\n\n```dart\nCalendar(\n  eventDoneColor: Colors.green,\n  selectedColor: Colors.pink,\n  todayColor: Colors.blue,\n  eventColor: Colors.grey,\n)\n```\n\n![Screenshot](https://github.com/rwbr/flutter_neat_and_clean_calendar/blob/main/img/usage1.png)\n\n### Display a date picker to jump to a certain date\n\n```dart\nCalendar(\n  datePickerType: DatePickerType.date\n)\n```\nThese options are available:\n* 'DatePickerType.date'\n* 'DatePickerType.year'\n* 'DatePickerType.hidden'\n\nIf you set the option to 'DatePickerType.date' or 'DatePickerType.year' an icon to load the date picker is shown.\n\n![Jump-To-Date button](img/jump-date-button.png)\n\nPressing this button opens a date picker, that allows the user to jump to a certain date.\n\nIf you set the option to 'DatePickerType.hidden' no icon is displaysed. This logic replaces the option 'isJumpDateButtonEnabled' which was present in earlier releases.\n\n### Handling all-day events\n\nThe class `NeatAndCleanCalendarEvent` has a boolean property called ìsAllDay`. This property allows you to \ndefine events, that last all day with now start or end time. These events get sorted at the top of the \nevents list.\n\n![All day event at the top of the list](img/all-day-event.png)\n\nWith the property `allDayEventText` you define the string displayed for that type of events. If you\ndon't set this option the calendar will display `All day` for these events.\n\n### Expandable calendar view\n\n```dart\nCalendar(\n  isExpandable: true;\n)\n```\n\n![Screenshot](https://github.com/rwbr/flutter_neat_and_clean_calendar/blob/main/img/usage2.png)\n![Screenshot](https://github.com/rwbr/flutter_neat_and_clean_calendar/blob/main/img/usage3.png)\n\n### Custom day builder\n\n\n```dart\nCalendar(\n  // A builder function that renders each calendar tile how you'd like.\n  dayBuilder: (BuildContext context, DateTime day) {\n      return new Text(\"!\");\n  },\n)\n```\n\n![Screenshot](https://github.com/rwbr/flutter_neat_and_clean_calendar/blob/main/img/usage4.png)\n\n### Custom event list builder\n\n\n```dart\nCalendar(\n  // A builder function that renders the event list\n  eventListBuilder: (BuildContext context,\n      List\u003cNeatCleanCalendarEvent\u003e _selectesdEvents) {\n    return new Text(\"!\");\n  },\n)\n```\n\n![Screenshot](https://github.com/rwbr/flutter_neat_and_clean_calendar/blob/main/img/usage5.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogrammingwormhole%2Fcalendar_fixed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprogrammingwormhole%2Fcalendar_fixed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogrammingwormhole%2Fcalendar_fixed/lists"}