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