Snapkit class

Constructors

Snapkit()
Creates a new Snapkit instance

Properties

currentUser Future<SnapchatUser>
currentUser fetches an up to date SnapchatUser and returns it.
no setter
hashCode int
The hash code for this object.
no setterinherited
isSnapchatInstalled Future<bool>
isSnapchatInstalled returns a bool of whether or not the Snapchat app is installed on the user's phone.
no setter
onAuthStateChanged Stream<SnapchatUser?>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
snapchatButton SnapchatButton
snapchatButton returns a SnapchatButton Widget that is already setup and will start the login flow when pressed
no setter

Methods

addAuthStateListener(SnapchatAuthStateListener authStateListener) → void
Add a class that implements the SnapchatAuthStateListener class as a listener
closeStream() → void
Closes the AuthState Stream
login() Future<SnapchatUser>
login opens Snapchat's OAuth screen in-app or through a browser if Snapchat is not installed. It will then return the logged in SnapchatUser An error will be thrown if something goes wrong
logout() Future<void>
logout clears your apps local session and refresh tokens. You will no longer be able to make requests to fetch the SnapchatUser with currentUser.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
share(SnapchatMediaType mediaType, {ImageProvider<Object>? image, String? videoPath, SnapchatSticker? sticker, String? caption, String? attachmentUrl}) Future<void>
share shares Media to be sent in the Snapchat app. mediaType defines what type of background media is to be shared.
toString() String
A string representation of this object.
inherited
verifyPhoneNumber(String region, String phoneNumber) Future<bool>
verifyPhoneNumber verifies if the phoneNumber passed matches the phone number of the currently signed in user in the snapchat app. Always returns false on Android. A two character region code and phoneNumber must be passed

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

platformVersion Future<String>
platformVersion returns a String of the current platform the appplication is running on, it usally includes both the Operating System name eg (iOS / Android) and the Version Number eg (15 / 12)
no setter