Skip to content

Commit

Permalink
DAY - 05 - make status list of users
Browse files Browse the repository at this point in the history
  • Loading branch information
Huzaifaahmed20 committed Apr 27, 2020
1 parent 0f4221e commit ee5f8e2
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
Binary file added assets/images/placeholder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 38 additions & 4 deletions lib/screens/TabScreens/ChatsListScreen.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,46 @@
import 'package:flutter/material.dart';
import 'package:flutter_whatsapp_redesign/utils/Users.dart';

class ChatsListScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
child: Center(
child: Text('Chats List'),
),
return Column(
children: <Widget>[
SizedBox(
height: MediaQuery.of(context).size.height * 0.20,
child: ListView.builder(
scrollDirection: Axis.horizontal,
itemCount: DUMMY_CHATS_DATA.length,
itemBuilder: (ctx, idx) {
final imageUrl = DUMMY_CHATS_DATA[idx].profileImage;
final userNAme = DUMMY_CHATS_DATA[idx].name;
final placeholderImage = 'assets/images/placeholder.png';
return Column(
children: <Widget>[
Padding(
padding: const EdgeInsets.all(20),
child: ClipRRect(
borderRadius: BorderRadius.circular(100),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
border: Border.all(color: Colors.grey)),
height: 70,
width: 70,
child: FadeInImage.assetNetwork(
placeholder: placeholderImage,
image: imageUrl,
),
),
),
),
Text(userNAme.split(' ')[0])
],
);
},
),
),
],
);
}
}
2 changes: 1 addition & 1 deletion lib/utils/UserProfile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ class UserProfile {
avatar:
'https://s3.amazonaws.com/uifaces/faces/twitter/_pedropinho/128.jpg',
placeholderAvatar:
'https://www.pngkey.com/png/full/950-9501315_katie-notopoulos-katienotopoulos-i-write-about-tech-user.png');
'assets/images/placeholder.png');
}
}

0 comments on commit ee5f8e2

Please sign in to comment.