ams_calendar_plugin 0.0.4 copy "ams_calendar_plugin: ^0.0.4" to clipboard
ams_calendar_plugin: ^0.0.4 copied to clipboard

AMS Calendar Plugin.

example/lib/main.dart

import 'package:ams_calendar_plugin/ams_calendar_plugin.dart';
import 'package:ams_calendar_plugin/model_add_event.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    // initPlatformState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: InkWell(
            onTap: () => addEventToCalendar(),
            child: const Text('Add event to calendar'),
          ),
        ),
      ),
    );
  }

  void addEventToCalendar() {
    final ModelAddEvent model = ModelAddEvent(
      eventTitle: 'Event title',
      eventLocation: 'Event location',
      eventDescription: 'Event description',
      beginTime: 1653998400000,
      endTime: 1653998400000,
      reminderInMinutes: 10,
    );
    AmsCalendarPlugin.addEventToCalendar(model).then((String? result) {
      print('result: $result');
    });
  }
}
1
likes
130
points
27
downloads

Publisher

unverified uploader

Weekly Downloads

AMS Calendar Plugin.

Documentation

API reference

License

unknown (license)

Dependencies

flutter

More

Packages that depend on ams_calendar_plugin