feat: Fixed issues with alignment in group info screen and dark theme

This commit is contained in:
Deven Joshi
2021-01-01 18:35:25 +05:30
parent b11543ea7f
commit e837b9b0e5
5 changed files with 198 additions and 123 deletions
+13 -13
View File
@@ -4,12 +4,13 @@ import 'package:stream_chat_flutter/src/stream_svg_icon.dart';
class OptionListTile extends StatelessWidget {
final String title;
final StreamSvgIcon leading;
final Widget leading;
final Widget trailing;
final VoidCallback onTap;
final Color titleColor;
final Color tileColor;
final Color separatorColor;
final TextStyle titleTextStyle;
OptionListTile({
this.title,
@@ -19,6 +20,7 @@ class OptionListTile extends StatelessWidget {
this.titleColor,
this.tileColor,
this.separatorColor,
this.titleTextStyle,
});
@override
@@ -38,10 +40,7 @@ class OptionListTile extends StatelessWidget {
onTap: onTap,
child: Row(
children: [
if (leading != null)
Expanded(
child: Center(child: leading),
),
if (leading != null) Center(child: leading),
if (leading == null)
SizedBox(
width: 16.0,
@@ -50,14 +49,15 @@ class OptionListTile extends StatelessWidget {
flex: 4,
child: Text(
title,
style: titleColor == null
? StreamChatTheme.of(context).textTheme.bodyBold
: StreamChatTheme.of(context)
.textTheme
.bodyBold
.copyWith(
color: titleColor,
),
style: titleTextStyle ??
(titleColor == null
? StreamChatTheme.of(context).textTheme.bodyBold
: StreamChatTheme.of(context)
.textTheme
.bodyBold
.copyWith(
color: titleColor,
)),
),
),
Expanded(