PnL class

Constructors

PnL({List<PnLLine> expense = const [], String? from, List<PnLLine> income = const [], int? netIncome, String? to, int? totalExpense, int? totalIncome})
Returns a new PnL instance.

Properties

expense ↔ List<PnLLine>
Expense is the cost lines that moved in the period, one per account.
getter/setter pair
from ↔ String?
From opens the period and is EXCLUSIVE — movement strictly after it, matching the trial balance's opening boundary so the two reports agree on what belongs to a period. Absent means from the beginning of the ledger.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
income ↔ List<PnLLine>
Income is the revenue lines that moved in the period, one per account. Accounts that did not move are omitted rather than listed at zero.
getter/setter pair
netIncome ↔ int?
NetIncome is totalIncome minus totalExpense, in cents. Negative is a loss.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
to ↔ String?
To closes the period and is inclusive. Absent means up to now.
getter/setter pair
totalExpense ↔ int?
TotalExpense is cost MATCHED to that revenue, in cents, including accrued infrastructure that has not been billed yet.
getter/setter pair
totalIncome ↔ int?
TotalIncome is revenue RECOGNIZED in the period, in cents — accrual, not cash, so a prepaid top-up is not in it until the credit is consumed.
getter/setter pair

Methods

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

Operators

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

Static Methods

fromJson(dynamic value) → PnL?
Returns a new PnL instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<PnL>
mapFromJson(dynamic json) → Map<String, PnL>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<PnL>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.