Skip to content

afei1223/AddCalendar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

add_calendar

A new Flutter plugin.

Getting Started

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

使用方法

具体使用方法见main.dart

void CalendarsInit() {
    //更新参数
    calendars.setEventId = '111';
    calendars.setTitle = 'hola2';
    calendars.setAlert = [3,15];
    calendars.setBeginTime = DateTime(2020,5,2,12,34);
    calendars.setEndTime = DateTime(2020,5,2,12,35);
    calendars.setNote = '这里不是备注内容/🐶';
  }

  Future<void> createEvent(Calendars calendars) async {
    //查询是否有读权限。
    await AddCalendar.CheckReadPermission().then((res) async {
      if(res){
        //查询是否有写权限
        await AddCalendar.CheckWritePermission().then((resWrite){
          if(resWrite){
            AddCalendar.createEvent(calendars);
          }
        });
      }
    });
  }

About

目前仅支持安卓

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors