-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.13Found to occur in 3.13Found to occur in 3.13found in release: 3.14Found to occur in 3.14Found to occur in 3.14frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Steps to reproduce
- Set a color value with alpha less than
0xffforRefreshIndicator.color. - Try the animation.
- The alpha was manipulated by the tween with
[0, 1], rather than[0, color.alpha].
flutter/packages/flutter/lib/src/material/refresh_indicator.dart
Lines 298 to 301 in 82cb749
| ColorTween( | |
| begin: (widget.color ?? theme.colorScheme.primary).withOpacity(0.0), | |
| end: (widget.color ?? theme.colorScheme.primary).withOpacity(1.0), | |
| ).chain(CurveTween( |
Expected results
The alpha value should respect the given.
Actual results
The alpha value of the color was manipulated by the color tween, which was fixed to [0, 1].
Code sample
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true, // This doesn't matter.
),
home: Builder(
builder: (context) => Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: const Text('Flutter Demo Home Page'),
),
body: RefreshIndicator(
onRefresh: () => Future.delayed(const Duration(seconds: 3), () {}),
color: Colors.blue.withOpacity(0.5),
child: ListView(
physics: const AlwaysScrollableScrollPhysics(),
children: [
Text(
'Pull to display to indicator.',
style: Theme.of(context).textTheme.headlineMedium,
textAlign: TextAlign.center,
),
],
),
),
),
),
);
}
}Screenshots or Video
| Actual | Expected |
|---|---|
![]() |
![]() |
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
[!] Flutter (Channel [user-branch], 3.14.0-14.0.pre.42, on Microsoft Windows [Version 10.0.22621.2134], locale en-US)
! Flutter version 3.14.0-14.0.pre.42 on channel [user-branch] at X:\SDK\flutter-master
• Framework revision ec653ff9ac (27 minutes ago), 2023-09-12 09:48:13 +0800
• Engine revision 3b75e3de7e
• Dart version 3.2.0 (build 3.2.0-122.0.dev)
• DevTools version 2.26.2
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cnMetadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.13Found to occur in 3.13Found to occur in 3.13found in release: 3.14Found to occur in 3.14Found to occur in 3.14frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team

