4
2
Fork 0

fix: making stuff smaller

pull/53/head
Sudharshan S. 2019-06-14 10:48:38 +08:00
parent c12a850b58
commit 2638fede0b
Signed by: sudharshan
GPG Key ID: C861C97AAF3D9559
13 changed files with 70 additions and 70 deletions

View File

@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'src/ui/home/home.dart';
import 'src/ui/home.dart';
import "src/ui/login/welcome.dart";
import 'themer.dart';

View File

@ -47,8 +47,8 @@ class _ConversationActiveViewState extends State<ConversationActiveView> {
print(users[0].id);
setState(() {
_users = users
.map((user) =>
UserAvatar(padding: EdgeInsets.only(right: 5.0), user: user))
.map((user) => UserAvatar(
radius: 18.0, padding: EdgeInsets.only(right: 5.0), user: user))
.toList();
});
});
@ -67,8 +67,8 @@ class _ConversationActiveViewState extends State<ConversationActiveView> {
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Container(
width: 22.0,
height: 22.0,
width: 15.0,
height: 15.0,
decoration: BoxDecoration(
color: Theme.of(context).indicatorColor,
shape: BoxShape.circle)),

View File

@ -13,12 +13,15 @@ class ConversationInactiveView extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
UserAvatar(
radius: 18,
padding: EdgeInsets.only(right: 5.0),
user: User("1", "Isaac", "Tay", "+65 91043593")),
UserAvatar(
radius: 18,
padding: EdgeInsets.only(right: 5.0),
user: User("1", "Isaac", "Tay", "+65 91043593")),
UserAvatar(
radius: 18,
padding: EdgeInsets.only(right: 5.0),
user: User("1", "Isaac", "Tay", "+65 91043593"))
])

View File

@ -89,17 +89,15 @@ class _ContactViewState extends State<ContactView> {
return Column(mainAxisSize: MainAxisSize.min, children: <Widget>[
StickyHeader(
header: Container(
height: 25.0,
height: 20.0,
color: Colors.grey[200],
padding: EdgeInsets.symmetric(horizontal: 15.0),
alignment: Alignment.centerLeft,
child: Text(
entry.key,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.w700,
color: Theme.of(context).primaryColorDark),
),
child: Text(entry.key,
style: Theme.of(context)
.primaryTextTheme
.display1
.copyWith(color: Theme.of(context).primaryColorDark)),
),
content: ListView.builder(
physics: const NeverScrollableScrollPhysics(),
@ -119,16 +117,15 @@ class _ContactViewState extends State<ContactView> {
SearchInput(
controller: searchController, hintText: "Search for people"),
Padding(
padding: EdgeInsets.only(top: 5.0, bottom: 5.0),
padding: EdgeInsets.only(top: 10.0, bottom: 10.0),
child: Row(children: <Widget>[
Icon(Icons.people_outline,
color: Theme.of(context).primaryColorDark, size: 40.0),
color: Theme.of(context).primaryColorDark, size: 30.0),
Padding(
padding: EdgeInsets.only(left: 20.0),
child: Text("Invite Friends",
style: Theme.of(context).textTheme.display1.copyWith(
color: Theme.of(context).primaryColorDark,
fontWeight: FontWeight.w400))),
style: Theme.of(context).textTheme.title.copyWith(
color: Theme.of(context).primaryColorDark))),
])),
])),
]);

View File

@ -17,7 +17,7 @@ class ContactItem extends StatelessWidget {
children: <Widget>[
UserAvatar(
user: user,
radius: 22.0,
radius: 18.0,
padding: EdgeInsets.only(left: 15.0)),
Padding(
padding: EdgeInsets.only(left: 15.0),
@ -25,7 +25,7 @@ class ContactItem extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(user.firstName + " " + user.lastName,
style: Theme.of(context).textTheme.display2,
style: Theme.of(context).textTheme.title,
overflow: TextOverflow.ellipsis),
Padding(
padding: EdgeInsets.only(top: 2),

View File

@ -60,9 +60,8 @@ class _ConversationItemState extends State<ConversationItem> {
Text("12:25 PM",
style: Theme.of(context)
.primaryTextTheme
.body1
.display2
.copyWith(
fontWeight: FontWeight.w500,
color: Theme.of(context).primaryColorDark)),
]),
Padding(
@ -101,7 +100,7 @@ class _ConversationItemState extends State<ConversationItem> {
crossAxisAlignment: CrossAxisAlignment.start,
children: data
.map((user) => UserAvatar(
radius: 18.0,
radius: 16.0,
padding: EdgeInsets.only(top: 0.0, left: 5.0),
user: user))
.toList());

View File

@ -110,9 +110,9 @@ class _HomeState extends State<Home> with SingleTickerProviderStateMixin {
],
);
},
child: Icon(data, size: 30.0),
child: Icon(data, size: 25.0),
)
: Icon(data, color: Colors.grey),
: Icon(data, color: Colors.grey, size: 20),
title: Container(),
);
}).toList())

View File

@ -41,12 +41,11 @@ class _LoginPageState extends State<LoginPage> {
Text("First things first.",
textAlign: TextAlign.left,
style: Theme.of(context).accentTextTheme.display3),
Text(
"Enter your phone number, to connect to your existing Beep account.",
style: Theme.of(context)
.accentTextTheme
.title
.copyWith(fontWeight: FontWeight.w400)),
Padding(
padding: EdgeInsets.only(top: 5.0),
child: Text(
"Enter your phone number, to connect to your existing Beep account.",
style: Theme.of(context).accentTextTheme.title)),
Padding(
padding: EdgeInsets.only(top: 20.0),
child: PhoneInput(controller: controller)),

View File

@ -36,12 +36,11 @@ class _OtpPageState extends State<OtpPage> {
Text("Almost there.",
textAlign: TextAlign.left,
style: Theme.of(context).accentTextTheme.display3),
Text(
"I've sent an authentication code via SMS to your device, enter it below.",
style: Theme.of(context)
.accentTextTheme
.title
.copyWith(fontWeight: FontWeight.w400)),
Padding(
padding: EdgeInsets.only(top: 5.0),
child: Text(
"I've sent an authentication code via SMS to your device, enter it below.",
style: Theme.of(context).accentTextTheme.title)),
Padding(
padding: EdgeInsets.only(top: 20.0),
child: Center(

View File

@ -15,7 +15,7 @@ class PhoneInput extends StatelessWidget {
width: 45,
child: Center(
child: Text("+65",
style: Theme.of(context).textTheme.body2.copyWith(
style: Theme.of(context).textTheme.title.copyWith(
color: Theme.of(context).primaryColorDark))),
decoration: BoxDecoration(
color: Colors.white,

View File

@ -11,28 +11,30 @@ class SearchInput extends StatelessWidget {
return Container(
child: Padding(
padding: EdgeInsets.only(left: 10.0, right: 10.0),
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: <
Widget>[
Padding(
padding: EdgeInsets.only(right: 5.0),
child: Icon(Icons.search, color: Colors.grey[500])),
Flexible(
child: TextField(
controller: controller,
autocorrect: false,
cursorWidth: 2.0,
cursorColor: Colors.grey[500],
style: Theme.of(context).textTheme.body2.copyWith(
color: Colors.grey[500], fontWeight: FontWeight.w300),
decoration: InputDecoration(
border: InputBorder.none,
filled: false,
hintText: hintText,
hintStyle: Theme.of(context).textTheme.body2.copyWith(
color: Colors.grey[500],
fontWeight: FontWeight.w300,
)))),
])),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Padding(
padding: EdgeInsets.only(right: 5.0),
child: Icon(Icons.search, color: Colors.grey[500])),
Flexible(
child: TextField(
controller: controller,
autocorrect: false,
cursorWidth: 2.0,
cursorColor: Colors.grey[500],
style: Theme.of(context).textTheme.subtitle.copyWith(
color: Colors.grey[500],
fontWeight: FontWeight.w300),
decoration: InputDecoration(
border: InputBorder.none,
filled: false,
hintText: hintText,
hintStyle: Theme.of(context)
.textTheme
.subtitle
.copyWith(color: Colors.grey[500])))),
])),
decoration: BoxDecoration(
color: Colors.grey[200],
borderRadius: BorderRadius.all(Radius.circular(10.00)),

View File

@ -32,8 +32,8 @@ class TopBar extends StatelessWidget {
child: Text("Edit",
style: Theme.of(context)
.accentTextTheme
.display2
.copyWith(fontWeight: FontWeight.w400))),
.title
.copyWith(fontWeight: FontWeight.w300))),
Spacer(),
Text(titleList[state],
style: Theme.of(context).accentTextTheme.display1),

View File

@ -31,16 +31,17 @@ TextTheme buildTextTheme(TextTheme base) {
.copyWith(fontSize: 40.0, fontWeight: FontWeight.w600),
display3: base.display3
.copyWith(fontSize: 30.0, fontWeight: FontWeight.w700),
display2: base.display2
.copyWith(fontSize: 18.0, fontWeight: FontWeight.w500),
display1: base.display1
.copyWith(fontSize: 19.0, fontWeight: FontWeight.w600),
display2: base.display2.copyWith(
fontSize: 12.0, fontWeight: FontWeight.w500), // Used for time
display1: base.display1.copyWith(
fontSize: 16.0,
fontWeight: FontWeight.w600), // Used for overall title
title:
base.title.copyWith(fontSize: 18.0, fontWeight: FontWeight.w500),
base.title.copyWith(fontSize: 16.0, fontWeight: FontWeight.w500),
subtitle: base.subtitle
.copyWith(fontSize: 14.0, fontWeight: FontWeight.w300),
body2:
base.body2.copyWith(fontSize: 16.0, fontWeight: FontWeight.w600),
.copyWith(fontSize: 13.0, fontWeight: FontWeight.w300),
body2: base.body2.copyWith(
fontSize: 12.0, fontWeight: FontWeight.w600), // Bold normal
body1:
base.body1.copyWith(fontSize: 12.0, fontWeight: FontWeight.w400))
.apply(