Updated design
This commit is contained in:
parent
6a8d02335b
commit
05513976a3
|
|
@ -17,24 +17,26 @@ class EntityHeader extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final textColor = Theme.of(context).primaryTextTheme.bodyText1.color;
|
||||||
|
|
||||||
Widget _value1() {
|
Widget _value1() {
|
||||||
return Column(
|
return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(label,
|
Text(label,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
fontWeight: FontWeight.w300,
|
color: textColor.withOpacity(.65),
|
||||||
)),
|
)),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 6.0,
|
height: 8,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
value ?? '',
|
value ?? '',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 22.0,
|
fontSize: 30.0,
|
||||||
fontWeight: FontWeight.bold,
|
//fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|
@ -43,22 +45,21 @@ class EntityHeader extends StatelessWidget {
|
||||||
|
|
||||||
Widget _value2() {
|
Widget _value2() {
|
||||||
return Column(
|
return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(secondLabel,
|
Text(secondLabel,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
fontWeight: FontWeight.w300,
|
color: textColor.withOpacity(.65),
|
||||||
)),
|
)),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 6.0,
|
height: 8,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
secondValue ?? '',
|
secondValue ?? '',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 22.0,
|
fontSize: 30.0,
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|
@ -76,10 +77,10 @@ class EntityHeader extends StatelessWidget {
|
||||||
direction: value.length > 12 || (secondValue ?? '').length > 12
|
direction: value.length > 12 || (secondValue ?? '').length > 12
|
||||||
? Axis.vertical
|
? Axis.vertical
|
||||||
: Axis.horizontal,
|
: Axis.horizontal,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
_value1(),
|
Expanded(child: _value1()),
|
||||||
if (secondValue != null) _value2(),
|
if (secondValue != null) Expanded(child: _value2()),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
//child: _headerRow(),
|
//child: _headerRow(),
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ class AppListTile extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Material(
|
return Material(
|
||||||
color: Theme.of(context).canvasColor,
|
color: Theme.of(context).cardColor,
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
contentPadding: EdgeInsets.only(left: 12.0, top: 8.0, bottom: 8.0),
|
contentPadding: EdgeInsets.only(left: 12.0, top: 8.0, bottom: 8.0),
|
||||||
leading: Icon(icon),
|
leading: Icon(icon),
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ class ViewScaffold extends StatelessWidget {
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
|
backgroundColor: Theme.of(context).cardColor,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
leading: !isMobile(context) && isSettings
|
leading: !isMobile(context) && isSettings
|
||||||
? IconButton(
|
? IconButton(
|
||||||
|
|
|
||||||
|
|
@ -65,28 +65,25 @@ class _ClientViewState extends State<ClientView>
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: Container(
|
body: TabBarView(
|
||||||
color: Theme.of(context).cardColor,
|
controller: _controller,
|
||||||
child: TabBarView(
|
children: <Widget>[
|
||||||
controller: _controller,
|
RefreshIndicator(
|
||||||
children: <Widget>[
|
onRefresh: () => viewModel.onRefreshed(context),
|
||||||
RefreshIndicator(
|
child: ClientOverview(viewModel: viewModel),
|
||||||
onRefresh: () => viewModel.onRefreshed(context),
|
),
|
||||||
child: ClientOverview(viewModel: viewModel),
|
RefreshIndicator(
|
||||||
|
onRefresh: () => viewModel.onRefreshed(context),
|
||||||
|
child: ClientViewDetails(client: viewModel.client),
|
||||||
|
),
|
||||||
|
RefreshIndicator(
|
||||||
|
onRefresh: () => viewModel.onRefreshed(context),
|
||||||
|
child: ClientViewActivity(
|
||||||
|
viewModel: viewModel,
|
||||||
|
key: ValueKey(viewModel.client.id),
|
||||||
),
|
),
|
||||||
RefreshIndicator(
|
),
|
||||||
onRefresh: () => viewModel.onRefreshed(context),
|
],
|
||||||
child: ClientViewDetails(client: viewModel.client),
|
|
||||||
),
|
|
||||||
RefreshIndicator(
|
|
||||||
onRefresh: () => viewModel.onRefreshed(context),
|
|
||||||
child: ClientViewActivity(
|
|
||||||
viewModel: viewModel,
|
|
||||||
key: ValueKey(viewModel.client.id),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
heroTag: 'client_view_fab',
|
heroTag: 'client_view_fab',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue