diff --git a/lib/core/widgets/app_pull_to_refresh.dart b/lib/core/widgets/app_pull_to_refresh.dart index ba5ac26..b71c335 100644 --- a/lib/core/widgets/app_pull_to_refresh.dart +++ b/lib/core/widgets/app_pull_to_refresh.dart @@ -173,15 +173,14 @@ class _AppPullToRefreshState extends State { child: Icon( Icons.arrow_downward_rounded, size: 18, - color: armed ? AppColors.blue : AppColors.muted, + color: AppColors.blue, ), ), armed ? l10n.releaseToRefresh : l10n.pullToRefresh, - emphasized: armed, ); } - Widget _label(Widget icon, String text, {bool emphasized = false}) { + Widget _label(Widget icon, String text) { return Row( mainAxisAlignment: MainAxisAlignment.center, children: [ @@ -189,10 +188,10 @@ class _AppPullToRefreshState extends State { const SizedBox(width: 6), Text( text, - style: TextStyle( - color: emphasized ? AppColors.blue : AppColors.muted, - fontSize: 12, - fontWeight: emphasized ? FontWeight.w700 : FontWeight.w500, + style: const TextStyle( + color: AppColors.blue, + fontSize: 13, + fontWeight: FontWeight.w600, ), ), ], diff --git a/test/core/app_pull_to_refresh_test.dart b/test/core/app_pull_to_refresh_test.dart index 7a55e00..deb4df4 100644 --- a/test/core/app_pull_to_refresh_test.dart +++ b/test/core/app_pull_to_refresh_test.dart @@ -4,6 +4,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; +import 'package:fruitshorts/core/theme/app_colors.dart'; import 'package:fruitshorts/core/widgets/app_pull_to_refresh.dart'; import 'package:fruitshorts/l10n/app_localizations.dart'; @@ -43,14 +44,26 @@ void main() { ); expect(scrollable.position.pixels, lessThan(0)); expect(find.text('Pull to refresh'), findsOneWidget); + expect( + tester.widget(find.text('Pull to refresh')).style?.color, + AppColors.blue, + ); await gesture.moveBy(const Offset(0, 120)); await tester.pump(); expect(find.text('Release to refresh'), findsOneWidget); + expect( + tester.widget(find.text('Release to refresh')).style?.color, + AppColors.blue, + ); await gesture.up(); await tester.pump(); expect(find.text('Refreshing…'), findsOneWidget); + expect( + tester.widget(find.text('Refreshing…')).style?.color, + AppColors.blue, + ); expect(calls, 1); final duplicate = await tester.startGesture(