Profile class

The different users in the app are instances of this class. Its fields are

nickname Nickname used to identify the user

sex Sex ('M' for male 'F' for female)

levelOfStudies Level of finished studies (1 for primary, 2 for secondary, G for degree, M for master, D for doctorate)

dateOfBirth Date of birth

testList List of the class Test with all the completed tests of the profile

isSymbols1 Variable that determines the set of symbols used for the test (true for the set GeneralConstants.symbols1 and false for the set GeneralConstants.symbols2

Constructors

Profile.new({String? nickname, String? sex, String? levelOfStudies, DateTime? dateOfBirth, List<Test>? testList, bool? isSymbols1})
Profile.fromJson(Map<String, dynamic> json)
Takes the Map json as an argument and assigns values to nickname, dateOfBirth, sex, levelOfStudies, testList and isSymbols1 Used when loading data from SharedPreferences
factory

Properties

dateOfBirth DateTime?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isSymbols1 bool?
getter/setter pair
levelOfStudies String?
getter/setter pair
nickname String?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sex String?
getter/setter pair
testList List<Test>?
getter/setter pair

Methods

addTest(Test t) → void
Receives a test instance t as an argument and adds it to the testList. If the list does not exist, it creates one and adds the new test.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setIsSymbols1(bool b) → void
Assigns the argument b to isSymbols1
setLevelOfStudies(String l) → void
Assigns the argument l to levelOfStudies
setNickname(String n) → void
Assigns the argument n to nickname
setSex(String s) → void
Assigns the argument s to sex
toJson() Map<String, dynamic>
Creates a Map in Json format so data can be saved in SharedPreferences
toString() String
A string representation of this object.
inherited

Operators

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