finished contacts page
parent
e2f534b0fc
commit
079c10e82f
|
@ -8,6 +8,7 @@ const indicatorColor = const Color(0xFFFF7865);
|
|||
|
||||
ThemeData buildTheme() {
|
||||
final ThemeData base = ThemeData.light();
|
||||
final TextTheme textBase = buildTextTheme(base.textTheme);
|
||||
|
||||
return base.copyWith(
|
||||
accentColor: accentColor,
|
||||
|
@ -15,9 +16,9 @@ ThemeData buildTheme() {
|
|||
primaryColorLight: Colors.white,
|
||||
primaryColorDark: primaryColorDark,
|
||||
indicatorColor: indicatorColor,
|
||||
textTheme: buildTextTheme(base.textTheme),
|
||||
primaryTextTheme: buildTextTheme(base.textTheme),
|
||||
accentTextTheme: buildTextTheme(base.textTheme),
|
||||
textTheme: textBase,
|
||||
primaryTextTheme: textBase,
|
||||
accentTextTheme: buildAltTextTheme(textBase),
|
||||
iconTheme: buildIconTheme(),
|
||||
primaryIconTheme: buildIconTheme(),
|
||||
accentIconTheme: buildIconTheme());
|
||||
|
@ -26,8 +27,10 @@ ThemeData buildTheme() {
|
|||
TextTheme buildTextTheme(TextTheme base) {
|
||||
return base
|
||||
.copyWith(
|
||||
display2: base.display2
|
||||
.copyWith(fontSize: 18.0, fontWeight: FontWeight.w400),
|
||||
display1: base.display1
|
||||
.copyWith(fontSize: 18.0, fontWeight: FontWeight.w500),
|
||||
.copyWith(fontSize: 20.0, fontWeight: FontWeight.w500),
|
||||
title:
|
||||
base.title.copyWith(fontSize: 16.0, fontWeight: FontWeight.w500),
|
||||
subtitle: base.subtitle
|
||||
|
@ -38,10 +41,14 @@ TextTheme buildTextTheme(TextTheme base) {
|
|||
base.body1.copyWith(fontSize: 12.0, fontWeight: FontWeight.w400))
|
||||
.apply(
|
||||
fontFamily: 'Inter',
|
||||
displayColor: Colors.white,
|
||||
displayColor: accentColor,
|
||||
bodyColor: accentColor);
|
||||
}
|
||||
|
||||
TextTheme buildAltTextTheme(TextTheme base) {
|
||||
return base.apply(displayColor: Colors.white, bodyColor: Colors.white);
|
||||
}
|
||||
|
||||
IconThemeData buildIconTheme() {
|
||||
return IconThemeData(color: Colors.white, opacity: 1.0, size: 24.0);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,24 @@ class ContactItem extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListTile(
|
||||
leading: UserAvatar(active: true, name: "SU", radius: 25.0),
|
||||
title: Text("Sudharshan"));
|
||||
contentPadding:
|
||||
EdgeInsets.only(top: 5.0, left: 20.0, right: 20.0, bottom: 5.0),
|
||||
leading: Row(mainAxisSize: MainAxisSize.min, children: <Widget>[
|
||||
/*Icon(Icons.star, color: Theme.of(context).primaryColorDark),*/
|
||||
Text("A",
|
||||
style: TextStyle(
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Theme.of(context).primaryColorDark)),
|
||||
UserAvatar(
|
||||
active: true,
|
||||
name: "SU",
|
||||
radius: 22.0,
|
||||
padding: EdgeInsets.only(left: 20.0))
|
||||
]),
|
||||
title: Text("Ambrose Chua",
|
||||
style: Theme.of(context).textTheme.display2,
|
||||
overflow: TextOverflow.ellipsis),
|
||||
onTap: () => {});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,12 +7,11 @@ class ConversationItem extends StatelessWidget {
|
|||
return ListTile(
|
||||
isThreeLine: true,
|
||||
onTap: () => {},
|
||||
title:
|
||||
Text("Family Chat", style: Theme.of(context).primaryTextTheme.title),
|
||||
title: Text("Family Chat", style: Theme.of(context).textTheme.title),
|
||||
subtitle: Text("Mum I might have forgotten to close the windows",
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: Theme.of(context).primaryTextTheme.subtitle),
|
||||
style: Theme.of(context).textTheme.subtitle),
|
||||
trailing: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
|
|
|
@ -41,7 +41,7 @@ class TopBar extends StatelessWidget {
|
|||
),
|
||||
Positioned(
|
||||
child: Text(title,
|
||||
style: Theme.of(context).textTheme.display1)),
|
||||
style: Theme.of(context).accentTextTheme.display1)),
|
||||
]),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
|
Loading…
Reference in New Issue