Skip to main content

MainScreenViewModel class

<p>MainScreenViewModel class provide methods to interact with the modal to serve data in user's action in Main Screen Views.</p> <p>The functions in this class are mainly in the context of Tutorials for different componenets of the App.</p> <p>Functions include:</p> <ul> <li><code>showTutorial</code></li> <li><code>showHome</code></li> <li><code>tourEventTargets</code></li> <li><code>tourAddPost</code></li> <li><code>tourChat</code></li> <li><code>tourProfile</code></li> </ul>

Inheritance

Constructors

MainScreenViewModel ()

Properties

contextBuildContext

context consist of parent info.
<span class="feature">read / write</span>

currentPageIndexint

var for current page in index.
<span class="feature">read / write</span>

hashCodeint

The hash code for this object.
<span class="feature">read-only</span><span class="feature">inherited</span>

hasListenersbool

Whether any listeners are currently registered.
<span class="feature">read-only</span><span class="feature">inherited</span>

isBusybool

<span class="feature">read-only</span><span class="feature">inherited</span>

keyBNChatGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

keyBNEventsGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

keyBNHomeGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

keyBNPostGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

keyBNProfileGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

keySEAddGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

keySECardGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

keySECategoryMenuGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

keySEDateFilterGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

keySHMenuIconGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

keySHOrgNameGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

keySHPinnedPostGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

keySHPostGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

keySPAppSettingGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

keySPDonateUsGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

keySPEditProfileGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

keySPHelpGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

keySPInviteGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

keySPLogoutGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

keySPPalisadoesGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

Actual <code>BottomNavigationBarItem</code>s that show up on the screen.
<span class="feature">read / write</span>

pagesList<StatelessWidget>

Contains the Widgets to be rendered for corresponding navbar items.
<span class="feature">read / write</span>

pluginListList

list of all the pluginList.
<span class="feature">read / write</span>

pluginPrototypeDataMap

Maps the feature names with their proper Icon and Page.
<span class="feature">read / write</span>

runtimeTypeType

A representation of the runtime type of the object.
<span class="feature">read-only</span><span class="feature">inherited</span>

showAppTourbool

bool to determine if we wanna show the apptour.
<span class="feature">read / write</span>

stateViewState

<span class="feature">read-only</span><span class="feature">inherited</span>

targetsList<TargetFocus>

array of target.
<span class="feature">final</span>

tourCompletebool

bool to determine if apptour is complete.
<span class="feature">read / write</span>

tourSkippedbool

bool to determine if apptour is skipped.
<span class="feature">read / write</span>

tutorialCoachMarkTutorialCoachMark

tutorialCoachMark consist of coach used to give tutorial.
<span class="feature">read / write</span>

Methods

addListener(VoidCallback listener) void

Register a closure to be called when the object changes.
<span class="feature">inherited</span>

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 <a href="https:api.flutter.dev/flutter/foundation/ChangeNotifier/addListener.html">addListener</a> will throw after the object is disposed).
<span class="feature">inherited</span>

fetchAndAddPlugins(BuildContext context) void

Dynamically adds <code>BottomNavigationBarItems</code> in <code>BottomNavigationBar</code>.

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.
<span class="feature">inherited</span>

notifyListeners() void

Call all the registered listeners.
<span class="feature">inherited</span>

onTabTapped(int index) void

Handles click on <a href="https:api.flutter.dev/flutter/widgets/BottomNavigationBarItem-class.html">BottomNavigationBarItem</a>.

removeListener(VoidCallback listener) void

Remove a previously registered closure from the list of closures that are notified when the object changes.
<span class="feature">inherited</span>

setState(ViewState viewState) void

<span class="feature">inherited</span>

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.
<span class="feature">inherited</span>

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.
<span class="feature">inherited</span>

Static Properties

keyDrawerCurOrgGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

keyDrawerJoinOrgGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

keyDrawerLeaveCurrentOrgGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

keyDrawerSwitchableOrgGlobalKey<State<StatefulWidget>>

static variables.
<span class="feature">final</span>

scaffoldKeyGlobalKey<ScaffoldState>

static variables.
<span class="feature">final</span>