Skill class

This class represents the skill information in the course user is learning.

This skill information includes information about lessons that user have not yet learned, and you can use the isAccessible flag to check if a lesson has already been learned.

Also, the skill information for lessons that user have not yet learned will be set to incomplete and you will not be able to access information such as tipsAndNotes. Therefore, if you want to use the complete skill information, be sure to use isAccessible for handling.

Example:

void main() async {
 final duolingo = Duolingo.getInstance();

 final authResponse = await duolingo.authenticate(
   username: 'test_username',
   password: 'test_password',
 );

 final userResponse = await duolingo.user(userId: authResponse.userId);

 for (final skill in userResponse.currentCourse.skills) {
   if (skill.isAccessible) {
      print(skill.name);
      print(skill.proficiency);
      print(skill.tipsAndNotes);
   }
 }
}

Constructors

Skill.from({required String id, required int iconId, required String name, required String shortName, required String urlName, required int levels, required int finishedLevels, required int lessons, required int finishedLessons, required double proficiency, required String tipsAndNotes, required int finalLevelTimeLimit, required bool isAccessible, required bool isPerfectOnLastLesson, required int perfectLessonStreak, required bool hasFinalLevel})
Returns the new instance of Skill based on arguments.

Properties

finalLevelTimeLimit int
The final level time limit
final
finishedLessons int
The finished lessons
final
finishedLevels int
The finished levels
final
hasFinalLevel bool
The flag that represents ha final level or not
final
hashCode int
The hash code for this object.
no setteroverride
iconId int
The icon id
final
id String
The id
final
isAccessible bool
The flag that represents is accessible or not
final
isPerfectOnLastLesson bool
The flag that represents is perfect on last lesson or not
final
lessons int
The lessons
final
levels int
The levels
final
name String
The name
final
perfectLessonStreak int
The streak of perfect lesson
final
proficiency double
The proficiency
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shortName String
The short name
final
tipsAndNotes String
The tips and notes
final
urlName String
The url name
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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