Test.fromJson constructor
Takes the Map json as an argument and assigns values to date, hand, displayed and mistakes
Used when loading data from SharedPreferences
Implementation
factory Test.fromJson(Map<String, dynamic> json) => Test(
date: DateTime.parse(json['date']),
hand: json['hand'],
displayed: json['displayed'],
mistakes: json['mistakes'],
);