1
1
import 'package:auto_direction/auto_direction.dart' ;
2
2
import 'package:dart_twitter_api/twitter_api.dart' ;
3
+ import 'package:dynamic_color/dynamic_color.dart' ;
3
4
import 'package:flutter/material.dart' ;
4
5
import 'package:flutter/widgets.dart' ;
5
6
import 'package:quacker/client/client.dart' ;
@@ -435,7 +436,8 @@ class TweetTileState extends State<TweetTile> with SingleTickerProviderStateMixi
435
436
Widget translateButton;
436
437
switch (_translationStatus) {
437
438
case TranslationStatus .original:
438
- translateButton = _createFooterIconButton (Icons .translate, Colors .blue, null , () async => onClickTranslate ());
439
+ translateButton = _createFooterIconButton (Icons .translate,
440
+ Colors .blue.harmonizeWith (Theme .of (context).colorScheme.primary), null , () async => onClickTranslate ());
439
441
break ;
440
442
case TranslationStatus .translating:
441
443
translateButton = const Padding (
@@ -444,11 +446,12 @@ class TweetTileState extends State<TweetTile> with SingleTickerProviderStateMixi
444
446
);
445
447
break ;
446
448
case TranslationStatus .translationFailed:
447
- translateButton = _createFooterIconButton (Icons .translate, Colors .red, null , () async => onClickTranslate ());
449
+ translateButton = _createFooterIconButton (Icons .translate,
450
+ Colors .red.harmonizeWith (Theme .of (context).colorScheme.primary), null , () async => onClickTranslate ());
448
451
break ;
449
452
case TranslationStatus .translated:
450
- translateButton =
451
- _createFooterIconButton ( Icons .translate, Colors .green, null , () async => onClickShowOriginal ());
453
+ translateButton = _createFooterIconButton ( Icons .translate,
454
+ Colors .green. harmonizeWith ( Theme . of (context).colorScheme.primary) , null , () async => onClickShowOriginal ());
452
455
break ;
453
456
}
454
457
@@ -506,7 +509,8 @@ class TweetTileState extends State<TweetTile> with SingleTickerProviderStateMixi
506
509
overflow: TextOverflow .ellipsis,
507
510
style: const TextStyle (fontWeight: FontWeight .w500))),
508
511
if (tweet.user! .verified ?? false ) const SizedBox (width: 4 ),
509
- if (tweet.user! .verified ?? false ) Icon (Icons .verified, size: 18 , color: Colors .blue)
512
+ if (tweet.user! .verified ?? false )
513
+ Icon (Icons .verified, size: 18 , color: Theme .of (context).colorScheme.primary)
510
514
],
511
515
),
512
516
),
0 commit comments