LitConfirmAgeScreen class

A screen widget allowing the user to submit his age.

Age requirements vary depending on the user's location. In most cases, using apps downloaded on app stores require the user to be at least 13 years old.

The LitConfirmAgeScreen implements a very basic child protection on the first startup.

Inheritance

Constructors

LitConfirmAgeScreen({Key? key, int ageRequirement = 13, String invalidAgeText = "Seems like you are not old enough to use this app. " + "Please check your inputted age", String title = "Confirm your Age", String subtitle = "Are you 13 years old or older?", required void onSubmit(DateTime date), String setLabel = "Set", String submitLabel = "Submit", String yourAgeLabel = "Your age", String validLabel = "Valid", String chooseDateLabel = "Choose date"})
Creates a LitConfirmAgeScreen.
const

Properties

ageRequirement int
The age requirement (in years).
final
chooseDateLabel String
final
hashCode int
The hash code for this object.
no setterinherited
invalidAgeText String
The message displayed if the user's age don't comply with the age requirement.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onSubmit → void Function(DateTime date)
Called once the user submits a valid age.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
setLabel String
The 'set' text label.
final
submitLabel String
The 'submit' text label.
final
subtitle String
The screen's subtitle.
final
title String
The screen's title.
final
validLabel String
The 'valid' text label.
final
yourAgeLabel String
The 'your age' text label.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _LitConfirmAgeScreenState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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