-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
d: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
Here's a comment of the CircularProgressIndicator.adaptive()
/// Creates an adaptive progress indicator that is a
/// [CupertinoActivityIndicator] in iOS and [CircularProgressIndicator] in
/// material theme/non-iOS.
///
/// The [value], [backgroundColor], [valueColor], [strokeWidth],
/// [semanticsLabel], and [semanticsValue] will be ignored in iOS.
///
/// {@macro flutter.material.ProgressIndicator.ProgressIndicator}
const CircularProgressIndicator.adaptive({
super.key,
super.value,
super.backgroundColor,
super.valueColor,
this.strokeWidth = 4.0,
super.semanticsLabel,
super.semanticsValue,
}) : _indicatorType = _ActivityIndicatorType.adaptive;
I noticed that comment says that
/// The [value], [backgroundColor], [valueColor], [strokeWidth],
/// [semanticsLabel], and [semanticsValue] will be ignored in iOS.
but it is actually not true. The backgroundColor changes the color of the CircularProgressIndicator in IOS.
This comment is misleading so it should be changed.
Steps to Reproduce
- Execute
flutter runon the code sample
Expected results:
CircularProgressIndicator with no backgroundColor
Actual results:
CircularProgressIndicator with a red backgroundColor
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',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({super.key});
@override
Widget build(BuildContext context) {
return const Scaffold(
body: Center(
child: CircularProgressIndicator.adaptive(
backgroundColor: Colors.red,
)),
);
}
}
Metadata
Metadata
Assignees
Labels
d: api docsIssues with https://api.flutter.dev/Issues with https://api.flutter.dev/f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
