singularity_flutter 1.5.8 copy "singularity_flutter: ^1.5.8" to clipboard
singularity_flutter: ^1.5.8 copied to clipboard

A Flutter plugin for Singularity. It provide easy integration of login and wallet connection.

Flutter wrapper for Singularity SDK #

You can integrate singularity sdk to easy implement login flow and wallet integration

SigularitySDKProtocol #

Implement this protocol to get callbacks

  • onGetSingularityUserInfo This callback you get after successfully login. You will get the login user detail as json string in parameter. You also get user detail anytime from shared preference using SingularityUser as key.
@override
  onGetSingularityUserInfo(Map user) {
   
  }

To get user detail from shared preference

final prefs = await SharedPreferences.getInstance();
final Map user = prefs.getString('SingularityUser');// for ios it return map for android it return Json String
  • onSingularityClose This callback you get when you click on close icon or press back button.
@override
  onSingularityClose() {
   
  }
  • onSingularityLogout This callback you get after successfully logout. It also delete user detail from shared preference.
@override
  onSingularityLogout() {
  
  }
  • onSingularityError This callback you get when any error occured.
@override
  onSingularityError(String msg) {
  
  }

openLoginScreen #

You can call this function to start login flow or can open profile page

key - provide user key as string
singularityConfig - provide configurations details as map
_gamepay.openLoginScreen(key: <your_key>, singularityConfig: {<configuration_details>}); // pass'environment' to set environment 0 for test 1 for production

1
likes
110
pub points
3%
popularity

Publisher

verified publisherneobrix.io

A Flutter plugin for Singularity. It provide easy integration of login and wallet connection.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, js, plugin_platform_interface, universal_html

More

Packages that depend on singularity_flutter