Safety class

Constructors

Safety({required SafetyPlanFrequency frequencyUsage, required List<SafetyPlanOptions> eligiblePlanOptions, bool? isActionBarDevEnabled = false, List<TabObject>? quickActionItems = const []})
const

Properties

eligiblePlanOptions List<SafetyPlanOptions>
A map that contains product specific Safety Plan options aside from the base options This is where YOU pass to Aureus what options you can adopt. Please ensure ALL ELIGIBLE plan options are choosen when passed to packageVariables in initialization.
final
frequencyUsage SafetyPlanFrequency
The frequency usage is how often you anticipate someone to use your piece of software.
final
hashCode int
The hash code for this object.
no setterinherited
isActionBarDevEnabled bool?
This is if you are using a quick action bar that allows user to access certain functionality on every single page. This is helpful if you have 'emergency' features that need to be accessed on every page (e.g: dealing with suicidal users who may emergency access a tool).
final
quickActionItems List<TabObject>?
If you do want a quick action bar to appear on every screen, these are the objects that will show up in the bar. The tabs can do anything from call an emergency hotline, to segue users to a specific tool. The idea is to limit these to really sensitive resources that need to be close at all times
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

actionSafetyCheck(List<SafetyPlanFallback> fallbackItems, VoidCallback primaryItem) Future<VoidCallback>
Takes a list of fallbacks (options that a specific piece of code violates, and the desired fallback to complete instead). You should use this to check if the piece of code you wrote violated a SafetyPlan request.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readAllFailedLogInAttempts() Future<List<String>>
recordFailedLogInAttempt() Future<void>
An interface to record failed log-in attempts for users to look back at.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

basePlanOptions Map<SafetyPlanOptions, bool>
A map that contains Safety Plan options that ALL software can complete. If you pass an empty list to productEligiblePlanOptions, basePlanOptions will be used to create a safety plan for the user.
getter/setter pair

Constants

detailMetaData → const SafetyOptionDetailMetadata
A reference to the metadata class in a separate file