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
- ChangeNotifier
- BaseModel
- MainScreenViewModel
Constructors
Properties
context ↔ BuildContext
context consist of parent info.
read / write
currentPageIndex ↔ int
var for current page in index.
read / write
hashCode → int
The hash code for this object.
read-onlyinherited
hasListeners → bool
Whether any listeners are currently registered.
read-onlyinherited
isBusy → bool
read-onlyinherited
keyBNChat → GlobalKey<State<StatefulWidget>>
static variables.
final
keyBNEvents → GlobalKey<State<StatefulWidget>>
static variables.
final
keyBNHome → GlobalKey<State<StatefulWidget>>
static variables.
final
keyBNPost → GlobalKey<State<StatefulWidget>>
static variables.
final
keyBNProfile → GlobalKey<State<StatefulWidget>>
static variables.
final
keySEAdd → GlobalKey<State<StatefulWidget>>
static variables.
final
keySECard → GlobalKey<State<StatefulWidget>>
static variables.
final
keySECategoryMenu → GlobalKey<State<StatefulWidget>>
static variables.
final
keySEDateFilter → GlobalKey<State<StatefulWidget>>
static variables.
final
keySHMenuIcon → GlobalKey<State<StatefulWidget>>
static variables.
final
keySHOrgName → GlobalKey<State<StatefulWidget>>
static variables.
final
keySHPinnedPost → GlobalKey<State<StatefulWidget>>
static variables.
final
keySHPost → GlobalKey<State<StatefulWidget>>
static variables.
final
keySPAppSetting → GlobalKey<State<StatefulWidget>>
static variables.
final
keySPDonateUs → GlobalKey<State<StatefulWidget>>
static variables.
final
keySPEditProfile → GlobalKey<State<StatefulWidget>>
static variables.
final
keySPHelp → GlobalKey<State<StatefulWidget>>
static variables.
final
keySPInvite → GlobalKey<State<StatefulWidget>>
static variables.
final
keySPLogout → GlobalKey<State<StatefulWidget>>
static variables.
final
keySPPalisadoes → GlobalKey<State<StatefulWidget>>
static variables.
final
navBarItems ↔ List<BottomNavigationBarItem>
Actual BottomNavigationBarItem
s that show up on the screen.
read / write
pages ↔ List<StatelessWidget>
Contains the Widgets to be rendered for corresponding navbar items.
read / write
pluginList ↔ List
list of all the pluginList.
read / write
pluginPrototypeData ↔ Map
Maps the feature names with their proper Icon and Page.
read / write
runtimeType → Type
A representation of the runtime type of the object.
read-onlyinherited
showAppTour ↔ bool
bool to determine if we wanna show the apptour.
read / write
state → ViewState
read-onlyinherited
targets → List<TargetFocus>
array of target.
final
tourComplete ↔ bool
bool to determine if apptour is complete.
read / write
tourSkipped ↔ bool
bool to determine if apptour is skipped.
read / write
tutorialCoachMark ↔ TutorialCoachMark
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
keyDrawerCurOrg → GlobalKey<State<StatefulWidget>>
static variables.
final
keyDrawerJoinOrg → GlobalKey<State<StatefulWidget>>
static variables.
final
keyDrawerLeaveCurrentOrg → GlobalKey<State<StatefulWidget>>
static variables.
final
keyDrawerSwitchableOrg → GlobalKey<State<StatefulWidget>>
static variables.
final
scaffoldKey → GlobalKey<ScaffoldState>
static variables.
final