zeba_academy_event_scheduler

A Flutter package for offline event and task scheduling with recurring events, local notifications, and an interactive calendar view.


Features

  • šŸ“… Offline Task & Event Scheduling – Manage your tasks without an internet connection.
  • šŸ” Recurring Events – Daily, weekly, monthly events with custom intervals.
  • šŸ”” Local Notifications – Get reminders for your scheduled events.
  • šŸ—“ļø Calendar View – Daily, weekly, and monthly views using TableCalendar.
  • šŸ“¤ Export to Device Calendar – Optionally integrate events into the device calendar.

Installation

Add the dependency to your pubspec.yaml:

dependencies:
  zeba_academy_event_scheduler:
    path: ../  # Path to your local package

Install it using:

flutter pub get

Usage

import 'package:flutter/material.dart';
import 'package:zeba_academy_event_scheduler/zeba_academy_event_scheduler.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Initialize the scheduler
  await ZebaEventScheduler.init();

  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: EventSchedulerHome(),
    );
  }
}

class EventSchedulerHome extends StatefulWidget {
  const EventSchedulerHome({super.key});

  @override
  State<EventSchedulerHome> createState() => _EventSchedulerHomeState();
}

class _EventSchedulerHomeState extends State<EventSchedulerHome> {
  final repository = EventRepository();

  void addEvent() async {
    final event = Event(
      title: 'New Event',
      startTime: DateTime.now().add(const Duration(minutes: 1)),
      recurrence: Recurrence(interval: RecurrenceInterval.daily, count: 3),
    );

    await repository.addEvent(event);
    await ZebaEventScheduler.scheduleNotification(event);
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Event Scheduler')),
      body: Center(
        child: ElevatedButton(
          onPressed: addEvent,
          child: const Text('Add Event'),
        ),
      ),
    );
  }
}

About Me

✨ I’m Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects. You can learn more about me and my work at sufyanism.com or connect with me on Linkedin


Your all-in-one no-bloat hub!

šŸš€ Explore cutting-edge resources in coding, tech, and development at zeba.academy and code.zeba.academy. Empower yourself with practical skills through curated directives, real-world projects, and hands-on experience. Level up your tech game today! šŸ’»āœØ

Zeba Academy is a learning platform dedicated to coding, technology, and development. āž” Visit our main site: zeba.academy
āž” Explore hands-on courses and resources at: code.zeba.academy
āž” Check out our YouTube for more tutorials: zeba.academy
āž” Follow us on Instagram: zeba.academy

Thank you for visiting!