A plugin that allows developers like you to integrate with Snapchat (using SnapKit) into your Flutter applications!
Follow the Wiki for steps on how to get setup in an existing project or just copy the example project into a directory of your choosing and rename it.
Snapkit snapkit = new Snapkit();
snapkit.onAuthStateChanged.listen((SnapchatUser? user) {
// Do something with the returned SnapchatUser or null here
});
class MyAppState extends State<MyApp> implements SnapchatAuthStateListener {
snapkit.addAuthStateListener(this);
@override
void onLogin(SnapchatUser user) {
// Do something with the returned SnapchatUser here
}
@override
void onLogout() {
// Do something on logout
}
}
await snapkit.login();
// or
snapkit.login().then(user => {});
await snapkit.logout();
// or
snapkit.logout().then(() => {});
Returns a bool
if Snapchat has verified the phone number, throws
an error if there was a problem. Always returns false
on Android
snapkit.verifyPhoneNumber('US', '1231234567')
.then(isVerified {})
.catchError((error, StackTrace stacktrace) {})
snapkit.share(SnapchatMediaType.NONE,
sticker: SnapchatSticker?,
caption: String?,
attachmentUrl: String?
);
snapkit.share(SnapchatMediaType.PHOTO,
image: ImageProvider,
sticker: SnapchatSticker?,
caption: String?,
attachmentUrl: String?
);
Currently unavailable on Android
snapkit.share(SnapchatMediaType.VIDEO,
videoUrl: String,
sticker: SnapchatSticker?,
caption: String?,
attachmentUrl: String?
);
new SnapchatSticker(
image: ImageProvider
);