Updated design

This commit is contained in:
Hillel Coren 2020-05-05 20:54:09 +03:00
parent 6a8d02335b
commit 05513976a3
4 changed files with 34 additions and 35 deletions

View File

@ -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(),

View File

@ -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),

View File

@ -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(

View File

@ -65,9 +65,7 @@ class _ClientViewState extends State<ClientView>
), ),
], ],
), ),
body: Container( body: TabBarView(
color: Theme.of(context).cardColor,
child: TabBarView(
controller: _controller, controller: _controller,
children: <Widget>[ children: <Widget>[
RefreshIndicator( RefreshIndicator(
@ -87,7 +85,6 @@ class _ClientViewState extends State<ClientView>
), ),
], ],
), ),
),
floatingActionButton: FloatingActionButton( floatingActionButton: FloatingActionButton(
heroTag: 'client_view_fab', heroTag: 'client_view_fab',
backgroundColor: Theme.of(context).primaryColorDark, backgroundColor: Theme.of(context).primaryColorDark,