Improve repo structure (#22)

* app updated

* readme updated

* rename base folder

* update chatty's readme

* move apps to packages dir

* update repo overview

Co-authored-by: diegoveloper <[email protected]>
This commit is contained in:
Neevash Ramdial (Nash)
2021-03-10 15:18:00 -04:00
committed by GitHub
co-authored by diegoveloper
parent bd6bb66279
commit 030c3eb428
290 changed files with 3804 additions and 4 deletions
@@ -0,0 +1,54 @@
import 'package:flutter/cupertino.dart';
import 'package:imessage/channel_preview.dart';
import 'package:imessage/message_page.dart';
import 'package:animations/animations.dart';
import 'package:stream_chat_flutter/stream_chat_flutter.dart'
show Channel, StreamChannel;
class ChannelListView extends StatelessWidget {
const ChannelListView({Key key, @required this.channels}) : super(key: key);
final List<Channel> channels;
@override
Widget build(BuildContext context) {
channels.removeWhere((channel) => channel.lastMessageAt == null);
return SliverList(
delegate: SliverChildBuilderDelegate(
(
BuildContext context,
int index,
) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 4.0),
child: ChannelPreview(
channel: channels[index],
onTap: () {
Navigator.push(
context,
PageRouteBuilder(
pageBuilder: (_, __, ___) => StreamChannel(
channel: channels[index],
child: MessagePage(),
),
transitionsBuilder: (
_,
animation,
secondaryAnimation,
child,
) =>
SharedAxisTransition(
child: child,
animation: animation,
secondaryAnimation: secondaryAnimation,
transitionType: SharedAxisTransitionType.horizontal,
),
),
);
},
),
);
},
childCount: channels.length,
),
);
}
}