Dashboard

This commit is contained in:
Hillel Coren 2020-07-21 12:49:29 +03:00
parent 1a1b4b6237
commit 3951efdabd
4 changed files with 23 additions and 13 deletions

View File

@ -188,8 +188,10 @@ class CreditListItem extends StatelessWidget {
child: Text(
client.displayName,
style: Theme.of(context).textTheme.headline6,
overflow: TextOverflow.ellipsis,
),
),
SizedBox(width: 4),
Text(
formatNumber(
credit.balance > 0

View File

@ -311,7 +311,7 @@ class _DashboardSidebar extends StatelessWidget {
child: Text(label1, style: textTheme.bodyText2),
padding: const EdgeInsets.symmetric(vertical: 12),
),
Flexible(
Expanded(
child: list1 == null ? Text(localization.noRecordsFound) : list1,
),
if (label2 != null) ...[
@ -319,12 +319,14 @@ class _DashboardSidebar extends StatelessWidget {
child: Text(label2, style: textTheme.bodyText2),
padding: const EdgeInsets.symmetric(vertical: 12),
),
Flexible(
Expanded(
child: list2 == null ? Text(localization.noRecordsFound) : list2,
),
],
AnimatedContainer(
height: label3 == null ? 0 : 200,
height: label3 == null
? 0
: (MediaQuery.of(context).size.height - 50) / 2,
duration: Duration(milliseconds: kDefaultAnimationDuration),
child: Column(
children: [
@ -383,16 +385,18 @@ class _InvoiceSidebar extends StatelessWidget {
},
),
label3: selectedIds == null ? null : localization.selectedInvoices,
list3: ListView.builder(
shrinkWrap: true,
itemCount: selectedIds?.length,
itemBuilder: (BuildContext context, int index) {
return InvoiceListItem(
invoice: state.invoiceState.get(selectedIds[index]),
showCheckbox: false,
);
},
),
list3: selectedIds == null
? null
: ListView.builder(
shrinkWrap: true,
itemCount: selectedIds?.length,
itemBuilder: (BuildContext context, int index) {
return InvoiceListItem(
invoice: state.invoiceState.get(selectedIds[index]),
showCheckbox: false,
);
},
),
);
}
}

View File

@ -198,8 +198,10 @@ class InvoiceListItem extends StatelessWidget {
child: Text(
client.displayName,
style: Theme.of(context).textTheme.headline6,
overflow: TextOverflow.ellipsis,
),
),
SizedBox(width: 4),
Text(
formatNumber(
invoice.balance > 0

View File

@ -197,8 +197,10 @@ class QuoteListItem extends StatelessWidget {
child: Text(
client.displayName,
style: Theme.of(context).textTheme.headline6,
overflow: TextOverflow.ellipsis,
),
),
SizedBox(width: 4),
Text(
formatNumber(
quote.balance > 0