apply theme to rest of the sdk

This commit is contained in:
Salvatore Giordano
2020-12-31 10:24:25 +01:00
parent a8171f7314
commit f011bf32fc
17 changed files with 51 additions and 24 deletions
+3 -1
View File
@@ -121,7 +121,9 @@ class _GroupChatDetailsScreenState extends State<GroupChatDetailsScreen> {
padding: const EdgeInsets.all(0), padding: const EdgeInsets.all(0),
icon: StreamSvgIcon.check( icon: StreamSvgIcon.check(
size: 24, size: 24,
color: _isGroupNameEmpty ? Colors.grey : Color(0xFF006CFF), color: _isGroupNameEmpty
? Colors.grey
: StreamChatTheme.of(context).colorTheme.accentBlue,
), ),
onPressed: _isGroupNameEmpty onPressed: _isGroupNameEmpty
? null ? null
+5 -2
View File
@@ -25,7 +25,7 @@ void main() async {
logLevel: Level.INFO, logLevel: Level.INFO,
showLocalNotification: showLocalNotification:
(!kIsWeb && Platform.isAndroid) ? showLocalNotification : null, (!kIsWeb && Platform.isAndroid) ? showLocalNotification : null,
persistenceEnabled: true, persistenceEnabled: false,
); );
if (userId != null) { if (userId != null) {
@@ -456,7 +456,10 @@ class ChannelPage extends StatelessWidget {
right: 0, right: 0,
child: Container( child: Container(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
color: Color(0xffFCFCFC).withOpacity(.9), color: StreamChatTheme.of(context)
.colorTheme
.whiteSnow
.withOpacity(.9),
child: TypingIndicator( child: TypingIndicator(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
+2 -1
View File
@@ -76,7 +76,8 @@ class _NewGroupChatScreenState extends State<NewGroupChatScreen> {
if (_selectedUsers.isNotEmpty) if (_selectedUsers.isNotEmpty)
IconButton( IconButton(
icon: StreamSvgIcon.arrow_right( icon: StreamSvgIcon.arrow_right(
color: Color(0xFF006CFF), color:
StreamChatTheme.of(context).colorTheme.accentBlue,
), ),
onPressed: () async { onPressed: () async {
final updatedList = await Navigator.pushNamed( final updatedList = await Navigator.pushNamed(
+1 -1
View File
@@ -1,6 +1,6 @@
name: example name: example
description: A new Flutter project. description: A new Flutter project.
version: 1.0.101+104 version: 1.0.102+105
environment: environment:
sdk: ">=2.2.2 <3.0.0" sdk: ">=2.2.2 <3.0.0"
+7 -4
View File
@@ -53,7 +53,7 @@ class ChannelImage extends StatelessWidget {
this.showOnlineStatus = true, this.showOnlineStatus = true,
this.borderRadius, this.borderRadius,
this.selected = false, this.selected = false,
this.selectionColor = const Color(0xFF006CFF), this.selectionColor,
this.selectionThickness = 4, this.selectionThickness = 4,
}) : super(key: key); }) : super(key: key);
@@ -105,7 +105,8 @@ class ChannelImage extends StatelessWidget {
.constraints, .constraints,
onTap: onTap != null ? (_) => onTap() : null, onTap: onTap != null ? (_) => onTap() : null,
selected: selected, selected: selected,
selectionColor: selectionColor, selectionColor: selectionColor ??
StreamChatTheme.of(context).colorTheme.accentBlue,
selectionThickness: selectionThickness, selectionThickness: selectionThickness,
); );
}); });
@@ -127,7 +128,8 @@ class ChannelImage extends StatelessWidget {
.constraints, .constraints,
onTap: onTap, onTap: onTap,
selected: selected, selected: selected,
selectionColor: selectionColor, selectionColor: selectionColor ??
StreamChatTheme.of(context).colorTheme.accentBlue,
selectionThickness: selectionThickness, selectionThickness: selectionThickness,
); );
} }
@@ -197,7 +199,8 @@ class ChannelImage extends StatelessWidget {
.ownMessageTheme .ownMessageTheme
.avatarTheme .avatarTheme
.constraints, .constraints,
color: selectionColor, color: selectionColor ??
StreamChatTheme.of(context).colorTheme.accentBlue,
child: Padding( child: Padding(
padding: EdgeInsets.all(selectionThickness), padding: EdgeInsets.all(selectionThickness),
child: child, child: child,
+1 -1
View File
@@ -134,7 +134,7 @@ class ChannelInfo extends StatelessWidget {
child: Text( child: Text(
'Try Again', 'Try Again',
style: textStyle.copyWith( style: textStyle.copyWith(
color: Color(0xFF006CFF), color: StreamChatTheme.of(context).colorTheme.accentBlue,
), ),
), ),
), ),
+2 -2
View File
@@ -99,7 +99,7 @@ class ChannelListHeader extends StatelessWidget implements PreferredSizeWidget {
var color; var color;
switch (status) { switch (status) {
case ConnectionStatus.connected: case ConnectionStatus.connected:
color = Color(0xFF006CFF); color = StreamChatTheme.of(context).colorTheme.accentBlue;
break; break;
case ConnectionStatus.connecting: case ConnectionStatus.connecting:
color = Colors.grey; color = Colors.grey;
@@ -205,7 +205,7 @@ class ChannelListHeader extends StatelessWidget implements PreferredSizeWidget {
.copyWith( .copyWith(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Color(0xFF006CFF), color: StreamChatTheme.of(context).colorTheme.accentBlue,
), ),
), ),
), ),
+4 -1
View File
@@ -684,7 +684,10 @@ class _ChannelListViewState extends State<ChannelListView>
builder: (context, snapshot) { builder: (context, snapshot) {
if (snapshot.hasError) { if (snapshot.hasError) {
return Container( return Container(
color: Color(0xffd0021B).withAlpha(26), color: StreamChatTheme.of(context)
.colorTheme
.accentRed
.withOpacity(.2),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(vertical: 16.0), padding: const EdgeInsets.symmetric(vertical: 16.0),
child: Center( child: Center(
+2 -1
View File
@@ -67,7 +67,8 @@ class _FileAttachmentState extends State<FileAttachment> {
borderRadius: borderRadius:
widget.trailing != null ? BorderRadius.circular(16.0) : null, widget.trailing != null ? BorderRadius.circular(16.0) : null,
border: widget.trailing != null border: widget.trailing != null
? Border.fromBorderSide(BorderSide(color: Color(0xFFE6E6E6))) ? Border.fromBorderSide(BorderSide(
color: StreamChatTheme.of(context).colorTheme.greyWhisper))
: null, : null,
), ),
child: Row( child: Row(
+3 -2
View File
@@ -11,7 +11,7 @@ class GroupImage extends StatelessWidget {
this.onTap, this.onTap,
this.borderRadius, this.borderRadius,
this.selected = false, this.selected = false,
this.selectionColor = const Color(0xFF006CFF), this.selectionColor,
this.selectionThickness = 4, this.selectionThickness = 4,
}) : super(key: key); }) : super(key: key);
@@ -110,7 +110,8 @@ class GroupImage extends StatelessWidget {
streamChatTheme.ownMessageTheme.avatarTheme.borderRadius) + streamChatTheme.ownMessageTheme.avatarTheme.borderRadius) +
BorderRadius.circular(selectionThickness), BorderRadius.circular(selectionThickness),
child: Container( child: Container(
color: selectionColor, color: selectionColor ??
StreamChatTheme.of(context).colorTheme.accentBlue,
height: 64.0, height: 64.0,
width: 64.0, width: 64.0,
child: Padding( child: Padding(
+4 -1
View File
@@ -592,7 +592,10 @@ class _MessageListViewState extends State<MessageListView> {
builder: (context, snapshot) { builder: (context, snapshot) {
if (snapshot.hasError) { if (snapshot.hasError) {
return Container( return Container(
color: Color(0xffd0021B).withAlpha(26), color: StreamChatTheme.of(context)
.colorTheme
.accentRed
.withOpacity(.2),
child: Center( child: Center(
child: Text('Error loading messages'), child: Text('Error loading messages'),
), ),
+4 -1
View File
@@ -152,7 +152,10 @@ class _MessageSearchListViewState extends State<MessageSearchListView> {
builder: (context, snapshot) { builder: (context, snapshot) {
if (snapshot.hasError) { if (snapshot.hasError) {
return Container( return Container(
color: Color(0xffd0021B).withAlpha(26), color: StreamChatTheme.of(context)
.colorTheme
.accentRed
.withOpacity(.2),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(vertical: 16.0), padding: const EdgeInsets.symmetric(vertical: 16.0),
child: Center( child: Center(
+1 -1
View File
@@ -919,7 +919,7 @@ class _MessageWidgetState extends State<MessageWidget> {
if ((widget.message.status == MessageSendingStatus.FAILED || if ((widget.message.status == MessageSendingStatus.FAILED ||
widget.message.status == MessageSendingStatus.FAILED_UPDATE || widget.message.status == MessageSendingStatus.FAILED_UPDATE ||
widget.message.status == MessageSendingStatus.FAILED_DELETE)) { widget.message.status == MessageSendingStatus.FAILED_DELETE)) {
return Color(0xffd0021B).withOpacity(.1); return StreamChatTheme.of(context).colorTheme.accentRed.withOpacity(.1);
} }
if (widget.message.attachments if (widget.message.attachments
+3 -1
View File
@@ -55,7 +55,9 @@ class UrlAttachment extends StatelessWidget {
.textTheme .textTheme
.bodyBold .bodyBold
.copyWith( .copyWith(
color: Color(0xFF006CFF), color: StreamChatTheme.of(context)
.colorTheme
.accentBlue,
), ),
), ),
), ),
+3 -2
View File
@@ -16,7 +16,7 @@ class UserAvatar extends StatelessWidget {
this.borderRadius, this.borderRadius,
this.onlineIndicatorAlignment = Alignment.topRight, this.onlineIndicatorAlignment = Alignment.topRight,
this.selected = false, this.selected = false,
this.selectionColor = const Color(0xFF006CFF), this.selectionColor,
this.selectionThickness = 4, this.selectionThickness = 4,
}) : super(key: key); }) : super(key: key);
@@ -70,7 +70,8 @@ class UserAvatar extends StatelessWidget {
child: Container( child: Container(
constraints: constraints ?? constraints: constraints ??
streamChatTheme.ownMessageTheme.avatarTheme.constraints, streamChatTheme.ownMessageTheme.avatarTheme.constraints,
color: selectionColor, color: selectionColor ??
StreamChatTheme.of(context).colorTheme.accentBlue,
child: Padding( child: Padding(
padding: EdgeInsets.all(selectionThickness), padding: EdgeInsets.all(selectionThickness),
child: avatar, child: avatar,
+4 -1
View File
@@ -453,7 +453,10 @@ class _UserListViewState extends State<UserListView>
builder: (context, snapshot) { builder: (context, snapshot) {
if (snapshot.hasError) { if (snapshot.hasError) {
return Container( return Container(
color: Color(0xffd0021B).withAlpha(26), color: StreamChatTheme.of(context)
.colorTheme
.accentRed
.withOpacity(.2),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(vertical: 16.0), padding: const EdgeInsets.symmetric(vertical: 16.0),
child: Center( child: Center(
+2 -1
View File
@@ -55,7 +55,8 @@ Future<bool> showConfirmationDialog(
height: 36.0, height: 36.0,
), ),
Container( Container(
color: Color(0xffe6e6e6), color:
StreamChatTheme.of(context).colorTheme.black.withOpacity(.08),
height: 1.0, height: 1.0,
), ),
Row( Row(