Using dart and flutter with google calendar api to get a list of events on the a user's calendar

前端 未结 1 978
我在风中等你
我在风中等你 2021-01-14 13:49

I am trying to learn how to use dart and flutter by re-building an app I\'ve previously coded in Java, which involves getting events from a Google Calendar using Google\'s o

相关标签:
1条回答
  • 2021-01-14 14:19

    I was able to get this working using your code with one change (step 6). First, ensure server-side is correctly setup (steps 1-5).
    Google Developer Console
    1. create project
    2. enable calendar api
    3. create service account - download json credentials
    Google Calendar Settings
    4. share with specific people - add email of service account
    5. copy Calendar ID (alphanumericstring@group.calendar.google.com)
    Your Code
    6. replace "primary" with Calendar ID from step 5

    There's a well-done overview of steps 1-5 at https://murze.be/how-to-setup-and-use-the-google-calendar-api. They are for PHP, but the Google-side setup is the same.

    Hope this helps someone.

    0 讨论(0)
提交回复
热议问题