full app done
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
/// A single values-sort card with title, description, and optional domain.
|
||||
library;
|
||||
|
||||
/// Immutable card drawn from the values deck.
|
||||
class ValueCard {
|
||||
const ValueCard({
|
||||
required this.id,
|
||||
required this.title,
|
||||
required this.description,
|
||||
this.domain = 'Values',
|
||||
});
|
||||
|
||||
final String id;
|
||||
final String title;
|
||||
final String description;
|
||||
final String domain;
|
||||
|
||||
factory ValueCard.fromJson(Map<String, dynamic> json) {
|
||||
return ValueCard(
|
||||
id: json['id'] as String,
|
||||
title: json['title'] as String,
|
||||
description: json['description'] as String? ?? '',
|
||||
domain: json['domain'] as String? ?? 'Values',
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'title': title,
|
||||
'description': description,
|
||||
'domain': domain,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user