Format
This commit is contained in:
@@ -44,7 +44,7 @@ class AccountListPageState extends State<AccountListPage> {
|
||||
width: 150,
|
||||
height: 100,
|
||||
child: Card(
|
||||
color: colorHash(state.accounts[index].name!),
|
||||
color: colorHash(state.accounts[index].name),
|
||||
shape:
|
||||
index == state.activeAccountIndex
|
||||
? RoundedRectangleBorder(
|
||||
@@ -61,7 +61,7 @@ class AccountListPageState extends State<AccountListPage> {
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(state.accounts[index].name!),
|
||||
Text(state.accounts[index].name),
|
||||
FutureBuilder(
|
||||
future: GetIt.I
|
||||
.get<OkaneDatabase>()
|
||||
|
||||
@@ -91,6 +91,7 @@ class AddLoanPopupState extends State<AddLoanChangePopup> {
|
||||
sign * double.parse(_amountController.text).abs(),
|
||||
),
|
||||
date: Value(DateTime.now()),
|
||||
loanId: Value(widget.loan.loan.id),
|
||||
),
|
||||
);
|
||||
widget.onDone();
|
||||
|
||||
@@ -43,10 +43,9 @@ class LoanDetailsPage extends StatelessWidget {
|
||||
return Text("No loan selected");
|
||||
}
|
||||
|
||||
final loanChanges = state.activeLoan!.changes.toList();
|
||||
final loanSum =
|
||||
loanChanges.isNotEmpty
|
||||
? loanChanges
|
||||
state.loanChanges.isNotEmpty
|
||||
? state.loanChanges
|
||||
.map((c) => c.amount)
|
||||
.reduce((acc, val) => acc + val)
|
||||
: 0.0;
|
||||
@@ -94,9 +93,9 @@ class LoanDetailsPage extends StatelessWidget {
|
||||
|
||||
SliverToBoxAdapter(
|
||||
child:
|
||||
loanChanges.isNotEmpty
|
||||
state.loanChanges.isNotEmpty
|
||||
? GroupedListView(
|
||||
elements: loanChanges,
|
||||
elements: state.loanChanges,
|
||||
shrinkWrap: true,
|
||||
reverse: true,
|
||||
groupBy:
|
||||
|
||||
Reference in New Issue
Block a user