Lucra Flows Setup and Usage
Lucra Flows are responsible for displaying specific user "flows" within the Lucra experience. This can be done one of 3 ways...
Obtaining a
LucraFragmentand inflating it within your preferred experience.Generating
LucraDialogFragmentviaLucraClient().getLucraDialogFragment(lucraFlow)for a full screen experience.Retrieving a
ComposableviaLucraClient().GetLucraFlowComposable(lucraFlow)and adding it to you existingComposablelayout.
Most flows can be navigated to from other Flows, e.g. the Profile flow is a common launch point. The other Flows are offered to launch specific experiences based on your use case.
After launching any given Flow, the nuance of what and how resulting Flows show up (within the user journey) is controlled by the LucraUi#LucraFlowListener, see more details in the initialization guide
Requires :sdk-ui
Example Usage
Fragment inflation
val lucraFlow = LucraUiProvider.LucraFlow.Profile
supportFragmentManager.beginTransaction()
.add(
R.id.lucraFragment,
LucraClient().getLucraFragment(LucraUiProvider.LucraFlow.Profile),
lucraFlow.toString()
)
.commit()Fullscreen Dialog Fragment
Composable
Close all open Lucra Flows Fragments
We offer a simple way to close all open Lucra Flows programmatically. This only works if the Flow is launched using our LucraClient().getLucraDialogFragment(lucraFlow)
Supported Lucra Flows
LucraUiProvider.LucraFlow.Login Launch to view the login flow
LucraUiProvider.LucraFlow.VerifyIdentity Launch the verify identity flow for users. Allowing users to add and withdrawal money, as well as create and join real money matchups. This Flow will be launched automatically when other Flows require Verification before moving forward
LucraUiProvider.LucraFlow.DemographicForm Launch the demographic form to collect user demographic information. This flow is required for free buy in tournaments and matchups.
LucraUiProvider.LucraFlow.Profile Launch the profile view for users to add and withdrawal funds, identity verification will launch if the user hasn't verified their identity yet
LucraUiProvider.LucraFlow.Wallet Launch the wallet view to see balance, add/withdraw funds, and perform basic profile actions
LucraUiProvider.LucraFlow.MyMatchup Launch to view the current user's matchups
LucraUiProvider.LucraFlow.AddFunds Launch the add funds flow for users, identity verification will launch if the user hasn't verified their identity yet
LucraUiProvider.LucraFlow.WithdrawFunds Launch the withdraw funds flow for users, identity verification will launch if the user hasn't verified their identity yet
LucraUiProvider.LucraFlow.CreateSportsMatchup Launch the Create Sport Matchup flow to create a new sports matchup
LucraUiProvider.LucraFlow.CreateGamesMatchup Launch the Create Games Landing page. Can support unauthenticated access. See Games You Play Specific Flows for details.
LucraUiProvider.LucraFlow.HomePage Launch the home page where user can create tournaments or matchups. Can support unauthenticated access. Takes optional location ID to initialize with specific location.
LucraUiProvider.LucraFlow.PublicFeed Launch to view the public feed of sports matchups.
Last updated
