File tree 3 files changed +22
-3
lines changed
3 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -765,9 +765,12 @@ class DmRecipientHeader extends StatelessWidget {
765
765
child: Row (
766
766
crossAxisAlignment: CrossAxisAlignment .center,
767
767
children: [
768
- const Padding (
769
- padding: EdgeInsets .symmetric (horizontal: 6 ),
770
- child: Icon (size: 16 , ZulipIcons .user)),
768
+ Padding (
769
+ padding: const EdgeInsets .symmetric (horizontal: 6 ),
770
+ child: Icon (
771
+ color: _kRecipientHeaderTextColor,
772
+ size: 16 ,
773
+ ZulipIcons .user)),
771
774
Expanded (
772
775
child: Text (title,
773
776
style: recipientHeaderTextStyle (context),
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ extension TextFieldChecks on Subject<TextField> {
66
66
67
67
extension TextStyleChecks on Subject <TextStyle > {
68
68
Subject <bool > get inherit => has ((t) => t.inherit, 'inherit' );
69
+ Subject <Color ?> get color => has ((t) => t.color, 'color' );
69
70
Subject <double ?> get fontSize => has ((t) => t.fontSize, 'fontSize' );
70
71
Subject <FontWeight ?> get fontWeight => has ((t) => t.fontWeight, 'fontWeight' );
71
72
Subject <double ?> get letterSpacing => has ((t) => t.letterSpacing, 'letterSpacing' );
Original file line number Diff line number Diff line change 1
1
import 'dart:convert' ;
2
2
3
3
import 'package:checks/checks.dart' ;
4
+ import 'package:collection/collection.dart' ;
4
5
import 'package:flutter/material.dart' ;
6
+ import 'package:flutter/rendering.dart' ;
5
7
import 'package:flutter_gen/gen_l10n/zulip_localizations.dart' ;
6
8
import 'package:flutter_test/flutter_test.dart' ;
7
9
import 'package:http/http.dart' as http;
@@ -399,6 +401,19 @@ void main() {
399
401
tester.widget (find.text (zulipLocalizations.messageListGroupYouAndOthers (
400
402
"${zulipLocalizations .unknownUserName }, ${eg .thirdUser .fullName }" )));
401
403
});
404
+
405
+ testWidgets ('icon color matches text color' , (tester) async {
406
+ final zulipLocalizations = GlobalLocalizations .zulipLocalizations;
407
+ await setupMessageListPage (tester, messages: [
408
+ eg.dmMessage (from: eg.otherUser, to: [eg.selfUser]),
409
+ ]);
410
+ await tester.pump ();
411
+ final textSpan = tester.renderObject <RenderParagraph >(find.text (
412
+ zulipLocalizations.messageListGroupYouAndOthers (
413
+ zulipLocalizations.unknownUserName))).text;
414
+ final icon = tester.widget <Icon >(find.byIcon (ZulipIcons .user));
415
+ check (textSpan).style.isNotNull ().color.equals (icon.color);
416
+ });
402
417
});
403
418
404
419
testWidgets ('show dates' , (tester) async {
You can’t perform that action at this time.
0 commit comments