Skip to main content

MainScreenViewModel class

MainScreenViewModel class provide methods to interact with the modal to serve data in user's action in Main Screen Views.

The functions in this class are mainly in the context of Tutorials for different componenets of the App.

Functions include:

  • showTutorial
  • showHome
  • tourEventTargets
  • tourAddPost
  • tourChat
  • tourProfile

Inheritance

Constructors

MainScreenViewModel ()

Properties

contextBuildContext

context consist of parent info.
read / write

currentPageIndexint

var for current page in index.
read / write

hashCodeint

The hash code for this object.
read-onlyinherited

hasListenersbool

Whether any listeners are currently registered.
read-onlyinherited

isBusybool

read-onlyinherited

keyBNChatGlobalKey<State<StatefulWidget>>

static variables.
final

keyBNEventsGlobalKey<State<StatefulWidget>>

static variables.
final

keyBNHomeGlobalKey<State<StatefulWidget>>

static variables.
final

keyBNPostGlobalKey<State<StatefulWidget>>

static variables.
final

keyBNProfileGlobalKey<State<StatefulWidget>>

static variables.
final

keySEAddGlobalKey<State<StatefulWidget>>

static variables.
final

keySECardGlobalKey<State<StatefulWidget>>

static variables.
final

keySECategoryMenuGlobalKey<State<StatefulWidget>>

static variables.
final

keySEDateFilterGlobalKey<State<StatefulWidget>>

static variables.
final

keySHMenuIconGlobalKey<State<StatefulWidget>>

static variables.
final

keySHOrgNameGlobalKey<State<StatefulWidget>>

static variables.
final

keySHPinnedPostGlobalKey<State<StatefulWidget>>

static variables.
final

keySHPostGlobalKey<State<StatefulWidget>>

static variables.
final

keySPAppSettingGlobalKey<State<StatefulWidget>>

static variables.
final

keySPDonateUsGlobalKey<State<StatefulWidget>>

static variables.
final

keySPEditProfileGlobalKey<State<StatefulWidget>>

static variables.
final

keySPHelpGlobalKey<State<StatefulWidget>>

static variables.
final

keySPInviteGlobalKey<State<StatefulWidget>>

static variables.
final

keySPLogoutGlobalKey<State<StatefulWidget>>

static variables.
final

keySPPalisadoesGlobalKey<State<StatefulWidget>>

static variables.
final

Actual BottomNavigationBarItems that show up on the screen.
read / write

pagesList<StatelessWidget>

Contains the Widgets to be rendered for corresponding navbar items.
read / write

pluginListList

list of all the pluginList.
read / write

pluginPrototypeDataMap

Maps the feature names with their proper Icon and Page.
read / write

runtimeTypeType

A representation of the runtime type of the object.
read-onlyinherited

showAppTourbool

bool to determine if we wanna show the apptour.
read / write

stateViewState

read-onlyinherited

targetsList<TargetFocus>

array of target.
final

tourCompletebool

bool to determine if apptour is complete.
read / write

tourSkippedbool

bool to determine if apptour is skipped.
read / write

tutorialCoachMarkTutorialCoachMark

tutorialCoachMark consist of coach used to give tutorial.
read / write

Methods

addListener(VoidCallback listener) void

Register a closure to be called when the object changes.
inherited

dispose() void

Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited

fetchAndAddPlugins(BuildContext context) void

Dynamically adds BottomNavigationBarItems in BottomNavigationBar.

focusTarget(GlobalKey<State<StatefulWidget>> key, String keyName, String description, {bool isCircle = false, ContentAlign align = ContentAlign.bottom, CrossAxisAlignment crossAlign = CrossAxisAlignment.start, Alignment skipAlignment = Alignment.topRight, Function? next, CrossAxisAlignment nextCrossAlign = CrossAxisAlignment.end, bool isEnd = false}) TargetFocus

This returns a widget for a step in a tutorial.

initialise(BuildContext ctx, {required bool fromSignUp, required int mainScreenIndex}) void

Initalizing function.

noSuchMethod(Invocation invocation) dynamic

Invoked when a non-existent method or property is accessed.
inherited

notifyListeners() void

Call all the registered listeners.
inherited

onTabTapped(int index) void

Handles click on BottomNavigationBarItem.

removeListener(VoidCallback listener) void

Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited

setState(ViewState viewState) void

inherited

showHome(TargetFocus clickedTarget) void

This function shows the Home screen.

showTutorial({required dynamic onClickTarget(TargetFocus), required dynamic onFinish()}) void

This function show tutorial to user.

toString() String

A string representation of this object.
inherited

tourAddPost() void

This function show the tutorial to add Post in the organization.

tourChat() void

This function show the tour of chats.

tourEventTargets() void

This function show the tutorial for Events.

tourHomeTargets() void

this functions starts the tour and info to be displayed is mentioned in this functions.

tourProfile() void

This function show the tutorial for the profile page.

Operators

operator ==(Object other) bool

The equality operator.
inherited

Static Properties

keyDrawerCurOrgGlobalKey<State<StatefulWidget>>

static variables.
final

keyDrawerJoinOrgGlobalKey<State<StatefulWidget>>

static variables.
final

keyDrawerLeaveCurrentOrgGlobalKey<State<StatefulWidget>>

static variables.
final

keyDrawerSwitchableOrgGlobalKey<State<StatefulWidget>>

static variables.
final

scaffoldKeyGlobalKey<ScaffoldState>

static variables.
final