【问题标题】:Add event to Google's calendar in Flutter在 Flutter 中将事件添加到 Google 的日历
【发布时间】:2020-06-02 14:32:30
【问题描述】:

我找到了这个官方包:https://pub.dev/packages/googleapis#-readme-tab-

我希望将活动添加到 Google 的日历中,但该插件没有太多关于它的信息。它指向 Google 文档,但在该链接内部并没有提及 Flutter 或任何示例。

有人有这方面的经验吗?

【问题讨论】:

    标签: flutter flutter-dependencies


    【解决方案1】:

    使用add_2_calendar 会将活动直接添加到 Google 的日历中:

    final Event newEvent = Event(
            title: "title",
            description: "description",
            location: address,
            startDate: eventDate,
            endDate: eventDate.add(
              Duration(minutes: 30),
            ),
          );
    
          addEvent2Cal(newEvent);
    

    【讨论】:

      猜你喜欢
      • 2011-11-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多