feat: Added info tile and wrapped channel list and channel header

This commit is contained in:
Deven Joshi
2021-01-12 18:04:39 +05:30
parent 81589778fa
commit f04452cbc9
4 changed files with 218 additions and 120 deletions
+35
View File
@@ -0,0 +1,35 @@
import 'package:flutter/material.dart';
import 'package:flutter_portal/flutter_portal.dart';
import 'package:stream_chat_flutter/src/stream_chat_theme.dart';
class InfoTile extends StatelessWidget {
final String message;
final Widget child;
final bool showMessage;
InfoTile({this.message, this.child, this.showMessage});
@override
Widget build(BuildContext context) {
return PortalEntry(
visible: showMessage,
portalAnchor: Alignment.topCenter,
childAnchor: Alignment.bottomCenter,
portal: Container(
height: 25.0,
color: StreamChatTheme.of(context).colorTheme.grey,
child: Center(
child: Text(
message,
style: StreamChatTheme.of(context).textTheme.body.copyWith(
color: Colors.white,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
),
child: child,
);
}
}