Skip to content
Merged
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ Contra flutter kit will be having screens developed in all the categories.(Curre
<img src = "screenshots/login_type_1.jpg" width=220><img src = "screenshots/login_type_2.jpg" width=220><img src = "screenshots/login_type_3.jpg" width=220><img src = "screenshots/login_type_4.jpg" width=220>
<img src = "screenshots/signup_type_1.jpg" width=220><img src = "screenshots/verification_type_1.jpg" width=220><img src = "screenshots/contact_us_type_1.jpg" width=220>

- Chat Screens

<img src = "screenshots/chat_home_page.jpg" width=220><img src = "screenshots/chat_message_page.jpg" width=220><img src = "screenshots/chat_search_page.jpg" width=220>

## Mentions
- Special thanks to [vijay verma](https://twitter.com/realvjy) for the awesome design kit.
- Link to the wireframe official page [Contra wireframe kit](https://contrauikit.com/)
Expand Down
3 changes: 0 additions & 3 deletions assets/icons/arrow.svg

This file was deleted.

5 changes: 2 additions & 3 deletions assets/icons/arrow_back.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/icons/arrow_forward.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/ic_circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/ic_circle_not_selected.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/icons/ic_search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/ic_star.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/peep_avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions assets/images/peep_avatar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions lib/chat/chat.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class Chat {
final String name;
final String message;
final String time;
final String count;

const Chat({this.name, this.message, this.time, this.count});
}
57 changes: 57 additions & 0 deletions lib/chat/chat_home_page.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import 'package:contraflutterkit/utils/colors.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

import 'chat_list_page.dart';

class ChatHomePage extends StatefulWidget {
@override
_ChatHomePageState createState() => _ChatHomePageState();
}

class _ChatHomePageState extends State<ChatHomePage> {
int _currentIndex = 0;
final List<Widget> _childrenWidgets = [
ChatListPage(),
ChatListPage(),
ChatListPage(),
ChatListPage()
];

void _onItemTapped(int index) {
setState(() {
_currentIndex = index;
});
}

@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: _childrenWidgets.elementAt(_currentIndex),
),
bottomNavigationBar: BottomNavigationBar(
items: [
BottomNavigationBarItem(icon: Icon(Icons.home), title: Text("Home")),
BottomNavigationBarItem(
icon: Icon(Icons.search), title: Text("Search")),
BottomNavigationBarItem(
icon: Icon(Icons.chat_bubble), title: Text("Chat")),
BottomNavigationBarItem(icon: Icon(Icons.info), title: Text("About")),
],
currentIndex: _currentIndex,
onTap: _onItemTapped,
selectedItemColor: wood_smoke,
unselectedItemColor: trout,
showSelectedLabels: true,
showUnselectedLabels: true,
selectedIconTheme: IconThemeData(color: wood_smoke, opacity: 1),
unselectedIconTheme: IconThemeData(color: trout, opacity: 0.6),
selectedLabelStyle: TextStyle(
color: wood_smoke, fontSize: 12, fontWeight: FontWeight.w800),
unselectedLabelStyle:
TextStyle(color: trout, fontSize: 12, fontWeight: FontWeight.w800),
),
);
}
}
93 changes: 93 additions & 0 deletions lib/chat/chat_list_item.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import 'package:contraflutterkit/custom_widgets/badge_text.dart';
import 'package:contraflutterkit/custom_widgets/image_round_text.dart';
import 'package:contraflutterkit/utils/colors.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

import 'chat.dart';

class ChatListItemWidget extends StatelessWidget {
final Chat chat;
final VoidCallback callback;

const ChatListItemWidget({this.chat, this.callback});

@override
Widget build(BuildContext context) {
return InkWell(
onTap: callback,
child: Container(
padding: EdgeInsets.symmetric(vertical: 24),
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: RoundImageWithText(
size: 48,
text: chat.name.substring(0, 1),
color: dandelion,
borderColor: wood_smoke,
shadowColor: wood_smoke,
),
),
SizedBox(
width: 12,
),
Expanded(
flex: 4,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
chat.name,
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 21,
color: wood_smoke,
fontWeight: FontWeight.w800),
),
SizedBox(
height: 6,
),
Text(
chat.message,
textAlign: TextAlign.start,
style: TextStyle(
color: trout,
fontWeight: FontWeight.w500,
fontSize: 15),
)
],
),
),
Expanded(
flex: 1,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
chat.time,
style: TextStyle(
fontSize: 11,
color: santas_gray_10,
fontWeight: FontWeight.bold),
),
SizedBox(
height: 10,
),
chat.count.isNotEmpty
? BadgeText(
text: chat.count,
color: flamingo,
)
: SizedBox()
],
),
)
],
),
),
);
}
}
156 changes: 156 additions & 0 deletions lib/chat/chat_list_page.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
import 'package:contraflutterkit/chat/chat_messages_page.dart';
import 'package:contraflutterkit/chat/chat_search_page.dart';
import 'package:contraflutterkit/custom_widgets/custom_search_text.dart';
import 'package:contraflutterkit/login/login_text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

import 'chat.dart';
import 'chat_list_item.dart';

class ChatListPage extends StatefulWidget {
@override
_ChatListPageState createState() => _ChatListPageState();
}

class _ChatListPageState extends State<ChatListPage> {
List<Chat> _items = List<Chat>();
TextEditingController _textEditingController = TextEditingController();

@override
void initState() {
super.initState();

_items.add(Chat(
name: "Charli",
message: "Please have a look",
time: "3.30 AM",
count: "2"));
_items.add(Chat(
name: "Chandran",
message: "Call me after 5",
time: "3.30 AM",
count: "2"));
_items.add(Chat(
name: "Harray",
message: "No food left in the kitchen",
time: "3.30 AM",
count: ""));
_items.add(Chat(
name: "Leonard",
message: "Get groceries while coming",
time: "3.30 AM",
count: ""));
_items.add(Chat(
name: "Sheldon",
message: "Please have a look",
time: "3.30 AM",
count: ""));
_items.add(Chat(
name: "Chirag",
message: "Please have a look",
time: "3.30 AM",
count: "2"));
_items.add(Chat(
name: "Charli",
message: "Please have a look",
time: "3.30 AM",
count: "4"));
_items.add(Chat(
name: "Karthick",
message: "Can we have coffe?",
time: "3.30 AM",
count: "4"));
_items.add(Chat(
name: "Murali",
message: "Lets meet tommorrow",
time: "3.30 AM",
count: "5"));
_items.add(Chat(
name: "Charli",
message: "Please have a look",
time: "3.30 AM",
count: "2"));
_items.add(Chat(
name: "Charli",
message: "Please have a look",
time: "3.30 AM",
count: "2"));
_items.add(Chat(
name: "Charli",
message: "Please have a look",
time: "3.30 AM",
count: "2"));
_items.add(Chat(
name: "Charli",
message: "Please have a look",
time: "3.30 AM",
count: "2"));
}

@override
void dispose() {
_textEditingController.dispose();
super.dispose();
}

@override
Widget build(BuildContext context) {
return Scaffold(
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.all(24),
child: Column(
children: <Widget>[
SizedBox(
height: 56,
),
LoginText(
alignment: Alignment.centerLeft,
text: "Chat",
),
SizedBox(
height: 24,
),
CustomSearchText(
iconPath: "assets/icons/ic_search.svg",
text: "Search with love ...",
enable: false,
callback: () {
_launchSearchMessage();
},
controller: _textEditingController,
),
ListView.builder(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemCount: _items.length,
itemBuilder: (BuildContext context, int index) {
return ChatListItemWidget(
chat: _items[index],
callback: () {
_launchChatMessage(_items[index]);
},
);
})
],
),
),
),
);
}

_launchChatMessage(Chat item) {
Navigator.push(context, MaterialPageRoute(builder: (BuildContext context) {
return ChatMessagesPage(
chat: item,
);
}));
}

_launchSearchMessage() {
Navigator.push(context, MaterialPageRoute(builder: (BuildContext context) {
return ChatSearchPage();
}));
}
}
Loading