eventide 0.1.0 copy "eventide: ^0.1.0" to clipboard
eventide: ^0.1.0 copied to clipboard

Provides a easy-to-use flutter interface to access & modify native device calendars (iOS & Android)

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:eventide/eventide.dart';
import 'package:eventide_example/logic/calendar_cubit.dart';
import 'package:eventide_example/calendar_screen.dart';
import 'package:eventide_example/logic/event_cubit.dart';
import 'package:timezone/data/latest.dart' as tz;

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  tz.initializeTimeZones();
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  final Eventide _calendarPlugin;
  
  MyApp({super.key}) : _calendarPlugin = Eventide();

  @override
  Widget build(BuildContext context) {
    return MultiBlocProvider(
      providers: [
        BlocProvider(create: (_) => CalendarCubit(calendarPlugin: _calendarPlugin)..fetchCalendars(onlyWritable: true)),
        BlocProvider(create: (_) => EventCubit(calendarPlugin: _calendarPlugin)),
      ],
      child: const MaterialApp(
        home: Scaffold(
          body: CalendarScreen(),
        ),
      ),
    );
  }
}
8
likes
0
points
368
downloads

Publisher

verified publisherconnect-tech.sncf

Weekly Downloads

Provides a easy-to-use flutter interface to access & modify native device calendars (iOS & Android)

Repository (GitHub)
View/report issues

Topics

#flutter #calendar #api #native #eventide

License

unknown (license)

Dependencies

equatable, flutter, plugin_platform_interface

More

Packages that depend on eventide