Money.fromMap constructor

Money.fromMap(
  1. Map<String, dynamic>? json, [
  2. String? id,
  3. bool okey = false
])

id and okey do not meaning anything. its is used to meet the serialization convention of Laams data types.

Implementation

factory Money.fromMap(
  Map<String, dynamic>? json, [
  String? id,
  bool okey = false,
]) {
  if (json == null) return const Money.init();
  return Money._(
    fmu: _toInt(json['fmu']),
    precision: _toInt(json['precision']),
    currency: json['currency'] ?? '',
  );
}