LearningResource class

A learning resources is attached to a LearningTopic and offers more information on the topic.

Practially a learning resource is just a link with some extra meta data like the time expected to completed the resource. We also store if the user has completed the resource. // TODO Do this

Inheritance
Annotations

Constructors

LearningResource({required int id, required String title, required double time, required String link, required LearningResourceType type, required DateTime createdAt, required bool completed, required ListCause cause, String? source})
const
LearningResource.fromJson(Map<String, dynamic> data)
factory

Properties

cause ListCause
final
completed bool
final
createdAt DateTime
final
hashCode int
The hash code for this object.
read-onlyinherited
icon IconData
read-only
id int
Api id
final
Link to the resource (This could be internal or external see NavigationService)
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
source String?
String name of the source of the article eg BBC news
final
time double
Time expected to complete the resource (in mins)
final
timeText String
read-only
title String
Title of the resource
final
type LearningResourceType
The type of the resource (eg article/video)
final

Methods

isNew() bool
Whether the resource has been created in the last 2 days
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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