Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: "WhatsApp",
title: "WhatsApp Clone Using Flutter",
theme: new ThemeData(
primaryColor: new Color(0xff075E54),
accentColor: new Color(0xff25D366),
primaryColor: new Color(0xff078E54),
accentColor: new Color(0xff25D966),
),
debugShowCheckedModeBanner: false,
home: new WhatsAppHome(cameras:cameras),
Expand Down
9 changes: 7 additions & 2 deletions lib/pages/chat_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class ChatScreen extends StatefulWidget {
class ChatScreenState extends State<ChatScreen> {
@override
Widget build(BuildContext context) {
int online = 0; //may be zero or 1
return new ListView.builder(
itemCount: dummyData.length,
itemBuilder: (context, i) => new Column(
Expand All @@ -31,17 +32,21 @@ class ChatScreenState extends State<ChatScreen> {
dummyData[i].name,
style: new TextStyle(fontWeight: FontWeight.bold),
),
online ? new Text(
"Online",
style: new TextStyle(color: Colors.grey, fontSize: 15.0),
) :
new Text(
dummyData[i].time,
style: new TextStyle(color: Colors.grey, fontSize: 14.0),
style: new TextStyle(color: Colors.grey, fontSize: 15.0),
),
],
),
subtitle: new Container(
padding: const EdgeInsets.only(top: 5.0),
child: new Text(
dummyData[i].message,
style: new TextStyle(color: Colors.grey, fontSize: 15.0),
style: new TextStyle(color: Colors.grey, fontSize: 16.0),
),
),
)
Expand Down