'How to make CupertinoActivityIndicator fully white

I want to change the barBackgroundColor and primary Color fully white of CupertinoActivityIndicator but it show grey here is two colors one is white and the second one is grey i want to make both fully white.
Container(
height: 80,
width: 80,
decoration: BoxDecoration(
color: Colors.black,
borderRadius: BorderRadius.circular(8)
),
child: Theme(
data: ThemeData(
cupertinoOverrideTheme:
CupertinoThemeData( brightness: Brightness.dark,
primaryColor: CupertinoColors.extraLightBackgroundGray,
barBackgroundColor: CupertinoColors.extraLightBackgroundGray,
scaffoldBackgroundColor: CupertinoColors.black,)),
child: CupertinoActivityIndicator(animating: true, radius: 20,)),
),
i also change the color but it Still Not Wroking Please tell me how can i get fully white indicator
Container(
height: 80,
width: 80,
decoration: BoxDecoration(
color: Colors.black,
borderRadius: BorderRadius.circular(8)
),
child: Theme(
data: ThemeData(
cupertinoOverrideTheme:
CupertinoThemeData(
brightness: Brightness.dark,
primaryColor: CupertinoDynamicColor.withBrightness(
color: CupertinoColors.white,
darkColor: CupertinoColors.white,
),
barBackgroundColor: CupertinoDynamicColor.withBrightness(
color: CupertinoColors.white,
darkColor: CupertinoColors.white,
),
scaffoldBackgroundColor: CupertinoDynamicColor.withBrightness(
color: CupertinoColors.white,
darkColor: CupertinoColors.white,
),
)),
child: CupertinoActivityIndicator(animating: true, radius: 20,)),
),
Solution 1:[1]
I found alot of folks onlile asking the same question, while the native platform allow modification it got me wondering why did the remove they parameter ?
Anyhow, a quick work around this would be using color filters like:
Widget withColor(Color color) => ColorFiltered(
colorFilter: ColorFilter.mode(
color,
BlendMode.srcATop,
),
child: const CupertinoActivityIndicator(),
);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Yousuf M.Hammad |
