Creating a UI of Chat Application in flutter
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(title: "Chat app", home: HomePage());
}
}
class HomePage extends StatelessWidget {
const HomePage({Key? key}) : super(key: key);
final String _name1 = "Sahnawaza";
final String _name2 = "Altaf";
final String _name3 = "Abhinav";
final String _name4 = "Vivek";
final String _name5 = "Mojahid";
final String _name6 = "Shivam";
final String _name7 = "Minshu";
final String _name8 = "Ankush";
final String _name9 = "Aryan";
final String _name10 = "Ankit";
final String _name11 = "Aditya";
final String _name12 = "Raju";
@override
Widget build(BuildContext context) {
return Scaffold(
// appBar: AppBar(
// title: Text("Profile Screen"),
// ),
body: Container(
width: double.infinity,
height: double.infinity,
color: Color(0xFFe2ebf0),
child: SingleChildScrollView(
child: Column(
children: [
SizedBox(
height: 50,
),
Container(
margin: EdgeInsets.all(10.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Text(
"MinhajApp",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 25),
),
SizedBox(
width: 30,
),
Icon(Icons.camera_alt_outlined),
Icon(Icons.search),
Icon(Icons.edit_note_rounded),
],
),
),
SizedBox(
height: 20,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Text(
"Chats",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Colors.green),
),
Text(
"Status",
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
),
Text(
"Calls",
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
),
],
),
SizedBox(
height: 20,
),
ListTile(
leading: CircleAvatar(
radius: 30,
child: Text(_name1[0]),
),
title: Text(_name1),
subtitle: Text('hai'),
),
ListTile(
leading: CircleAvatar(
radius: 30,
child: Text(_name2[0]),
),
title: Text(_name2),
subtitle: Text('Thick hai'),
),
ListTile(
leading: CircleAvatar(
radius: 30,
child: Text(_name3[0]),
),
title: Text(_name3),
subtitle: Text('Aao'),
),
ListTile(
leading: CircleAvatar(
radius: 30,
child: Text(_name4[0]),
),
title: Text(_name4),
subtitle: Text('Dekh le bhai'),
),
ListTile(
leading: CircleAvatar(
radius: 30,
child: Text(_name5[0]),
),
title: Text(_name5),
subtitle: Text('okk'),
),
ListTile(
leading: CircleAvatar(
radius: 30,
child: Text(_name6[0]),
),
title: Text(_name6),
subtitle: Text('Nhi hai'),
),
ListTile(
leading: CircleAvatar(
radius: 30,
child: Text(_name7[0]),
),
title: Text(_name8),
subtitle: Text('hmm'),
),
ListTile(
leading: CircleAvatar(
radius: 30,
child: Text(_name9[0]),
),
title: Text(_name9),
subtitle: Text('Dekh lenge'),
),
ListTile(
leading: CircleAvatar(
radius: 30,
child: Text(_name10[0]),
),
title: Text(_name10),
subtitle: Text('hogya kya'),
),
ListTile(
leading: CircleAvatar(
radius: 30,
child: Text(_name11[0]),
),
title: Text(_name11),
subtitle: Text('jao tum'),
),ListTile(
leading: CircleAvatar(
radius: 30,
child: Text(_name1[0]),
),
title: Text(_name1),
subtitle: Text('hai'),
),
ListTile(
leading: CircleAvatar(
radius: 30,
child: Text(_name2[0]),
),
title: Text(_name2),
subtitle: Text('Thick hai'),
),
ListTile(
leading: CircleAvatar(
radius: 30,
child: Text(_name3[0]),
),
title: Text(_name3),
subtitle: Text('Aao'),
),
ListTile(
leading: CircleAvatar(
radius: 30,
child: Text(_name4[0]),
),
title: Text(_name4),
subtitle: Text('Dekh le bhai'),
),
ListTile(
leading: CircleAvatar(
radius: 30,
child: Text(_name5[0]),
),
title: Text(_name5),
subtitle: Text('okk'),
),
ListTile(
leading: CircleAvatar(
radius: 30,
child: Text(_name6[0]),
),
title: Text(_name6),
subtitle: Text('Nhi hai'),
),
ListTile(
leading: CircleAvatar(
radius: 30,
child: Text(_name7[0]),
),
title: Text(_name8),
subtitle: Text('hmm'),
),
ListTile(
leading: CircleAvatar(
radius: 30,
child: Text(_name9[0]),
),
title: Text(_name9),
subtitle: Text('Dekh lenge'),
),
ListTile(
leading: CircleAvatar(
radius: 30,
child: Text(_name10[0]),
),
title: Text(_name10),
subtitle: Text('hogya kya'),
),
ListTile(
leading: CircleAvatar(
radius: 30,
child: Text(_name11[0]),
),
title: Text(_name11),
subtitle: Text('jao tum'),
)
],
),
),
),
);
}
}
Comments
Post a Comment