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

: - Object

Constructors

MainScreenViewModel

:

Properties

[appTour] [↔ AppTour] : tutorialCoachMark consist of coach used to give tutorial. ::: features getter/setter pair :::

[context] [↔ BuildContext] : context consist of parent info. ::: features getter/setter pair :::

[currentPageIndex] [↔ int] : var for current page in index. ::: features getter/setter pair :::

[hashCode] [→ int] : The hash code for this object. ::: features no setterinherited :::

[hasListeners] [→ bool] : Whether any listeners are currently registered. ::: features no setterinherited :::

[isBusy] [→ bool]

: ::: features no setterinherited :::

[keyBNChat] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keyBNDemoEvents] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keyBNDemoHome] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keyBNDemoPost] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keyBNDemoProfile] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keyBNEvents] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keyBNHome] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keyBNPost] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keyBNProfile] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keySEAdd] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keySECard] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keySECategoryMenu] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keySEDateFilter] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keySHMenuIcon] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keySHOrgName] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keySHPinnedPost] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keySHPost] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keySPAppSetting] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keySPDonateUs] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keySPEditProfile] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keySPHelp] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keySPInvite] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keySPLogout] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keySPPalisadoes] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[navBarItems] [↔ List[<[BottomNavigationBarItem]>]] : Actual BottomNavigationBarItems that show up on the screen. ::: features getter/setter pair :::

[pages] [↔ List[<[Widget]>]] : Contains the Widgets to be rendered for corresponding navbar items. ::: features getter/setter pair :::

[pluginList] [↔ List] : list of all the pluginList. ::: features getter/setter pair :::

[pluginPrototypeData] [↔ Map] : Maps the feature names with their proper Icon and Page. ::: features getter/setter pair :::

[runtimeType] [→ Type] : A representation of the runtime type of the object. ::: features no setterinherited :::

[showAppTour] [↔ bool] : bool to determine if we wanna show the apptour. ::: features getter/setter pair :::

[state] [→ ViewState]

: ::: features no setterinherited :::

[targets] [→ List[<[FocusTarget]>]] : array of target. ::: features final :::

[testMode] [↔ bool] : flag to represent if app is in testMode. ::: features getter/setter pair :::

[tourComplete] [↔ bool] : bool to determine if apptour is complete. ::: features getter/setter pair :::

[tourSkipped] [↔ bool] : bool to determine if apptour is skipped. ::: features getter/setter pair :::

Methods

[addListener][([[VoidCallback] listener]) → void ] : Register a closure to be called when the object changes. ::: features inherited :::

[appTourDialog][([[BuildContext] ctx]) [→ Widget] ] : Builds and returns an AppTourDialog.

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). ::: features inherited :::

[fetchAndAddPlugins][([[BuildContext] context]) → void ] : Dynamically adds BottomNavigationBarItems in BottomNavigationBar.

[initialise][([[BuildContext] ctx, ) → void ] : Initalizing function.

[noSuchMethod][([[Invocation] invocation]) → dynamic ] : Invoked when a nonexistent method or property is accessed. ::: features inherited :::

notifyListeners [→ void ] : Call all the registered listeners. ::: features 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. ::: features inherited :::

[setState][([[ViewState] viewState]) → void ]

: ::: features inherited :::

[showHome][([[TargetFocus] clickedTarget]) → void ] : This function shows the Home screen.

[toString][ [→ String] ] : A string representation of this object. ::: features 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][([[[UserConfig?] givenUserConfig]]) → void ] : 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. ::: features inherited :::

Static Properties

[demoMode] [↔ bool] : flag to represent if app is in demoMode. ::: features getter/setter pair :::

[keyDrawerCurOrg] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keyDrawerJoinOrg] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keyDrawerLeaveCurrentOrg] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[keyDrawerSwitchableOrg] [→ GlobalKey[<[State[<[StatefulWidget]>]]>]] : static variables. ::: features final :::

[scaffoldKey] [→ GlobalKey[<[ScaffoldState]>]] : static variables. ::: features final :::

  1. talawa
  2. main_screen_view_model
  3. MainScreenViewModel class
main_screen_view_model library