feat: added themes
This commit is contained in:
@@ -25,6 +25,7 @@ class _ChannelBottomSheetState extends State<ChannelBottomSheet> {
|
|||||||
var isOwner = userAsMember.role == 'owner';
|
var isOwner = userAsMember.role == 'owner';
|
||||||
|
|
||||||
return Material(
|
return Material(
|
||||||
|
color: StreamChatTheme.of(context).colorTheme.white,
|
||||||
clipBehavior: Clip.antiAlias,
|
clipBehavior: Clip.antiAlias,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
@@ -41,11 +42,7 @@ class _ChannelBottomSheetState extends State<ChannelBottomSheet> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
child: ChannelName(
|
child: ChannelName(
|
||||||
textStyle: TextStyle(
|
textStyle: StreamChatTheme.of(context).textTheme.headlineBold,
|
||||||
fontSize: 16.0,
|
|
||||||
color: Color(0xff000000),
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@@ -80,10 +77,7 @@ class _ChannelBottomSheetState extends State<ChannelBottomSheet> {
|
|||||||
.firstWhere((e) => e.user.id != userAsMember.user.id)
|
.firstWhere((e) => e.user.id != userAsMember.user.id)
|
||||||
.user
|
.user
|
||||||
.name,
|
.name,
|
||||||
style: TextStyle(
|
style: StreamChatTheme.of(context).textTheme.footnoteBold,
|
||||||
fontSize: 12.0,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
@@ -115,10 +109,9 @@ class _ChannelBottomSheetState extends State<ChannelBottomSheet> {
|
|||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
members[index].user.name,
|
members[index].user.name,
|
||||||
style: TextStyle(
|
style: StreamChatTheme.of(context)
|
||||||
fontSize: 12.0,
|
.textTheme
|
||||||
fontWeight: FontWeight.w600,
|
.footnoteBold,
|
||||||
),
|
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
@@ -133,7 +126,7 @@ class _ChannelBottomSheetState extends State<ChannelBottomSheet> {
|
|||||||
),
|
),
|
||||||
OptionListTile(
|
OptionListTile(
|
||||||
leading: StreamSvgIcon.user(
|
leading: StreamSvgIcon.user(
|
||||||
color: Color(0xff7a7a7a),
|
color: StreamChatTheme.of(context).colorTheme.grey,
|
||||||
),
|
),
|
||||||
title: 'View Info',
|
title: 'View Info',
|
||||||
onTap: widget.onViewInfoTap,
|
onTap: widget.onViewInfoTap,
|
||||||
@@ -141,7 +134,7 @@ class _ChannelBottomSheetState extends State<ChannelBottomSheet> {
|
|||||||
if (!channel.isDistinct)
|
if (!channel.isDistinct)
|
||||||
OptionListTile(
|
OptionListTile(
|
||||||
leading: StreamSvgIcon.userRemove(
|
leading: StreamSvgIcon.userRemove(
|
||||||
color: Color(0xff7a7a7a),
|
color: StreamChatTheme.of(context).colorTheme.grey,
|
||||||
),
|
),
|
||||||
title: 'Leave Group',
|
title: 'Leave Group',
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
@@ -151,17 +144,17 @@ class _ChannelBottomSheetState extends State<ChannelBottomSheet> {
|
|||||||
if (isOwner)
|
if (isOwner)
|
||||||
OptionListTile(
|
OptionListTile(
|
||||||
leading: StreamSvgIcon.delete(
|
leading: StreamSvgIcon.delete(
|
||||||
color: Colors.red,
|
color: StreamChatTheme.of(context).colorTheme.accentRed,
|
||||||
),
|
),
|
||||||
title: 'Delete Conversation',
|
title: 'Delete Conversation',
|
||||||
titleColor: Colors.red,
|
titleColor: StreamChatTheme.of(context).colorTheme.accentRed,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
_showDeleteDialog();
|
_showDeleteDialog();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
OptionListTile(
|
OptionListTile(
|
||||||
leading: StreamSvgIcon.close_small(
|
leading: StreamSvgIcon.close_small(
|
||||||
color: Color(0xff7a7a7a),
|
color: StreamChatTheme.of(context).colorTheme.grey,
|
||||||
),
|
),
|
||||||
title: 'Cancel',
|
title: 'Cancel',
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -181,7 +174,7 @@ class _ChannelBottomSheetState extends State<ChannelBottomSheet> {
|
|||||||
question: 'Are you sure you want to delete this conversation?',
|
question: 'Are you sure you want to delete this conversation?',
|
||||||
cancelText: 'CANCEL',
|
cancelText: 'CANCEL',
|
||||||
icon: StreamSvgIcon.delete(
|
icon: StreamSvgIcon.delete(
|
||||||
color: Colors.red,
|
color: StreamChatTheme.of(context).colorTheme.accentRed,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
var channel = StreamChannel.of(context).channel;
|
var channel = StreamChannel.of(context).channel;
|
||||||
@@ -199,7 +192,7 @@ class _ChannelBottomSheetState extends State<ChannelBottomSheet> {
|
|||||||
question: 'Are you sure you want to leave this conversation?',
|
question: 'Are you sure you want to leave this conversation?',
|
||||||
cancelText: 'CANCEL',
|
cancelText: 'CANCEL',
|
||||||
icon: StreamSvgIcon.userRemove(
|
icon: StreamSvgIcon.userRemove(
|
||||||
color: Colors.red,
|
color: StreamChatTheme.of(context).colorTheme.accentRed,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
var channel = StreamChannel.of(context).channel;
|
var channel = StreamChannel.of(context).channel;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:stream_chat_flutter/src/stream_chat_theme.dart';
|
||||||
import 'package:stream_chat_flutter/src/stream_svg_icon.dart';
|
import 'package:stream_chat_flutter/src/stream_svg_icon.dart';
|
||||||
|
|
||||||
class OptionListTile extends StatelessWidget {
|
class OptionListTile extends StatelessWidget {
|
||||||
@@ -21,13 +22,13 @@ class OptionListTile extends StatelessWidget {
|
|||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
color: Color(0xffe6e6e6),
|
color: StreamChatTheme.of(context).colorTheme.greyGainsboro,
|
||||||
height: 2.0,
|
height: 1.0,
|
||||||
),
|
),
|
||||||
Material(
|
Material(
|
||||||
color: Colors.white,
|
color: StreamChatTheme.of(context).colorTheme.white,
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 56.0,
|
height: 63.0,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
child: Row(
|
child: Row(
|
||||||
@@ -44,10 +45,14 @@ class OptionListTile extends StatelessWidget {
|
|||||||
flex: 4,
|
flex: 4,
|
||||||
child: Text(
|
child: Text(
|
||||||
title,
|
title,
|
||||||
style: TextStyle(
|
style: titleColor == null
|
||||||
fontWeight: FontWeight.bold,
|
? StreamChatTheme.of(context).textTheme.bodyBold
|
||||||
color: titleColor,
|
: StreamChatTheme.of(context)
|
||||||
),
|
.textTheme
|
||||||
|
.bodyBold
|
||||||
|
.copyWith(
|
||||||
|
color: titleColor,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|||||||
Reference in New Issue
Block a user