Updated design
This commit is contained in:
parent
577322f054
commit
9f5846ca60
|
|
@ -68,23 +68,16 @@ class EntityHeader extends StatelessWidget {
|
|||
|
||||
return Container(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(8.0),
|
||||
child: Card(
|
||||
elevation: 2.0,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(16.0),
|
||||
child: Flex(
|
||||
direction: value.length > 12 || (secondValue ?? '').length > 12
|
||||
? Axis.vertical
|
||||
: Axis.horizontal,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Expanded(child: _value1()),
|
||||
if (secondValue != null) Expanded(child: _value2()),
|
||||
],
|
||||
)
|
||||
//child: _headerRow(),
|
||||
),
|
||||
padding: EdgeInsets.only(left: 25, top: 30, right: 25, bottom: 25),
|
||||
child: Flex(
|
||||
direction: value.length > 12 || (secondValue ?? '').length > 12
|
||||
? Axis.vertical
|
||||
: Axis.horizontal,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Expanded(child: _value1()),
|
||||
if (secondValue != null) Expanded(child: _value2()),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class AppListTile extends StatelessWidget {
|
|||
return Material(
|
||||
color: Theme.of(context).cardColor,
|
||||
child: ListTile(
|
||||
contentPadding: EdgeInsets.only(left: 12.0, top: 8.0, bottom: 8.0),
|
||||
contentPadding: EdgeInsets.symmetric(horizontal: 25, vertical: 10),
|
||||
leading: Icon(icon),
|
||||
title: Text(title),
|
||||
subtitle: subtitle == null ? Container() : Text(subtitle),
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/lists/activity_list_tile.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/lists/list_divider.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/loading_indicator.dart';
|
||||
import 'package:invoiceninja_flutter/ui/client/view/client_view_vm.dart';
|
||||
|
||||
|
|
@ -27,11 +28,15 @@ class _ClientViewActivityState extends State<ClientViewActivity> {
|
|||
return LoadingIndicator();
|
||||
}
|
||||
|
||||
return ListView.builder(
|
||||
return ListView.separated(
|
||||
itemCount: activities.length,
|
||||
separatorBuilder: (context, index) => ListDivider(),
|
||||
itemBuilder: (BuildContext context, index) {
|
||||
final activity = activities[index];
|
||||
return ActivityListTile(activity: activity);
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: ActivityListTile(activity: activity),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -217,13 +217,16 @@ class EntityListTile extends StatelessWidget {
|
|||
children: <Widget>[
|
||||
Material(
|
||||
color: Theme.of(context).cardColor,
|
||||
child: ListTile(
|
||||
title: Text(title),
|
||||
subtitle: Text(subtitle),
|
||||
leading: Icon(icon, size: 18.0),
|
||||
trailing: Icon(Icons.navigate_next),
|
||||
onTap: onTap,
|
||||
onLongPress: onLongPress,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: ListTile(
|
||||
title: Text(title),
|
||||
subtitle: Text(subtitle),
|
||||
leading: Icon(icon, size: 18.0),
|
||||
trailing: Icon(Icons.navigate_next),
|
||||
onTap: onTap,
|
||||
onLongPress: onLongPress,
|
||||
),
|
||||
),
|
||||
),
|
||||
ListDivider(),
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import 'package:invoiceninja_flutter/ui/app/FieldGrid.dart';
|
|||
import 'package:invoiceninja_flutter/ui/app/entities/entity_state_title.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/icon_message.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/entity_header.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/lists/list_divider.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/view_scaffold.dart';
|
||||
import 'package:invoiceninja_flutter/ui/payment/view/payment_view_vm.dart';
|
||||
import 'package:invoiceninja_flutter/utils/formatting.dart';
|
||||
|
|
@ -73,8 +74,9 @@ class _PaymentViewState extends State<PaymentView> {
|
|||
secondValue:
|
||||
formatNumber(payment.applied, context, clientId: client.id),
|
||||
),
|
||||
ListDivider(),
|
||||
Material(
|
||||
color: Theme.of(context).canvasColor,
|
||||
color: Theme.of(context).cardColor,
|
||||
child: ListTile(
|
||||
title: EntityStateTitle(entity: client),
|
||||
leading: Icon(FontAwesomeIcons.users, size: 18.0),
|
||||
|
|
@ -83,13 +85,10 @@ class _PaymentViewState extends State<PaymentView> {
|
|||
onLongPress: () => viewModel.onClientPressed(context, true),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
color: Theme.of(context).backgroundColor,
|
||||
height: 12.0,
|
||||
),
|
||||
ListDivider(),
|
||||
for (final paymentable in payment.paymentables)
|
||||
Material(
|
||||
color: Theme.of(context).canvasColor,
|
||||
color: Theme.of(context).cardColor,
|
||||
child: ListTile(
|
||||
title: EntityStateTitle(
|
||||
entity: state.invoiceState.map[paymentable.invoiceId],
|
||||
|
|
@ -109,16 +108,13 @@ class _PaymentViewState extends State<PaymentView> {
|
|||
context, paymentable.invoiceId, true),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
color: Theme.of(context).backgroundColor,
|
||||
height: 12.0,
|
||||
),
|
||||
ListDivider(),
|
||||
payment.privateNotes != null && payment.privateNotes.isNotEmpty
|
||||
? Column(
|
||||
children: <Widget>[
|
||||
IconMessage(payment.privateNotes),
|
||||
Container(
|
||||
color: Theme.of(context).backgroundColor,
|
||||
color: Theme.of(context).cardColor,
|
||||
height: 12.0,
|
||||
),
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in New Issue