eventide 0.5.0 copy "eventide: ^0.5.0" to clipboard
eventide: ^0.5.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:eventide_example/event_list/logic/event_list_cubit.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:eventide/eventide.dart';
import 'package:eventide_example/calendar/logic/calendar_cubit.dart';
import 'package:eventide_example/calendar/ui/calendar_screen.dart';
import 'package:provider/provider.dart';
import 'package:timezone/data/latest.dart' as tz;

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

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

  @override
  Widget build(BuildContext context) {
    return Provider(
      create: (_) => Eventide(),
      child: MultiBlocProvider(
        providers: [
          BlocProvider(
            create: (context) => CalendarCubit(
              calendarPlugin: context.read<Eventide>(),
            )..fetchCalendars(onlyWritable: true),
          ),
          BlocProvider(
            create: (context) => EventListCubit(calendarPlugin: context.read<Eventide>()),
          ),
        ],
        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