google_meet_sdk
一個 Flutter 套件,可幫助您在專案中新增 Google Meet,同時協助您建立、修改和刪除日曆事件,並通知參與者。
一個 Flutter 套件,可幫助您在專案中新增 Google Meet,同時協助您建立、修改和刪除日曆事件,並通知參與者。
以下為英文專案原文快照,最新內容請造訪 GitHub。
A flutter package which will help you to add add google meet in your projects and also help you to create, modify and delete calender events and notify the attendee
Created by Techahead Software
dependencies:
google_meet_sdk: <VERSION>
$ flutter packages get
Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.
import 'package:google_meet_sdk/google_meet_sdk.dart';
add your clientId in android manifest and in iOS info.plist
In Android
<meta-data android:name="clientId" android:value="12234" />
In iOS
<key>clientId</key>
<string> 12234 </string>
1. enable google authentication from firebase
2. enable Google Calendar API from gcp console and select thesr scopes ( CalendarApi.calendarScope ,CalendarApi.calendarEventsScope )
3. get your clientId (required) and serverClientId (optional) from gcp console
first login via google
ElevatedButton(
key: UniqueKey(),
onPressed: () {
GoogleAuthentication.signInWithGoogle(context: context)
.then((value) {
if (value != null) {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const DashboardScreen(),
));
} else {
debugPrint('something went wrong while login...');
}
});
},
child: const Text("click"),
)
to insert/ add google meet and added event in your calender
var result = await CalendarClient() .insert(title: currentTitle??"",
description: currentDesc ?? '',
location: currentLocation??"",
attendeeEmailList: attendeeEmails,
shouldNotifyAttendees: shouldNofityAttendees,
hasConferenceSupport: hasConferenceSupport,
startTime: DateTime.fromMillisecondsSinceEpoch(startTimeInEpoch),
endTime: DateTime.fromMillisecondsSinceEpoch(endTimeInEpoch)
);
to modify/update google meet and added event in your calender
var result = await CalendarClient().modify(title: currentTitle??"",
description: currentDesc ?? '',
location: currentLocation??"",
attendeeEmailList: attendeeEmails,
shouldNotifyAttendees: shouldNofityAttendees,
hasConferenceSupport: hasConferenceSupport,
startTime: DateTime.fromMillisecondsSinceEpoch(startTimeInEpoch),
endTime: DateTime.fromMillisecondsSinceEpoch(endTimeInEpoch)
);
to delete/remove google meet and added event in your calender
var result = await CalendarClient().delete(eventId!, true)
https://user-images.githubusercontent.com/37922543/219462854-b5249e9e-2896-425b-82c8-d0e8953c8d82.mp4
依賴清單 9 項
{"sdk":"flutter"}^10.1.0^1.3.1^4.2.6^5.4.4^0.13.5^0.0.1{"sdk":"flutter"}^2.0.0先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗