Closed HePingLaoSan closed 1 year ago
hi @HePingLaoSan which distribution are you using? and if you use normal ubuntu, did you maybe change your theme to blue? yaru.dart detects the system theme on vanilla ubuntu and adapts
One way to change the color on any platform is to force a specific variant of the Yaru theme:
import 'package:flutter/material.dart';
import 'package:yaru/yaru.dart';
import 'package:yaru_widgets/yaru_widgets.dart';
void main() {
runApp(
YaruTheme(
data: const YaruThemeData(
variant: YaruVariant.purple, // <==
),
builder: (context, yaru, child) {
return MaterialApp(
theme: yaru.theme,
darkTheme: yaru.darkTheme,
home: Scaffold(
body: Center(
child: YaruRadio(
value: true,
groupValue: true,
onChanged: (value) {},
),
),
),
);
},
),
);
}
I also plan to add some override properties soon, so we can locally change the colour of a specific control.
Can somebody tell me how to change YaruRadio color? when launch in my computer, my color which is blue is different from demo which is orange.