无法更改简单设置磁贴的背景颜色



我在移动应用程序的设置屏幕上使用flatter_settings_screensflatter插件,并且我无法更改每个设置的背景。例如,我想更改SimpleSettingsFile的背景。我该怎么做?

这是我的代码:

import 'package:flutter/material.dart';
import 'package:flutter_settings_screens/flutter_settings_screens.dart';
import 'package:torch/widget/icon_widget.dart';
class Settings extends StatefulWidget {
const Settings({Key? key}) : super(key: key);
@override
State<Settings> createState() => _SettingsState();
}
class _SettingsState extends State<Settings> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.indigo[900],
body: SafeArea(
child: ListView(
padding: EdgeInsets.all(24),
children: [
Ink(
color: Colors.indigo[900],
child: SettingsGroup(
title: 'General',
children: [
buildRemoveAds(),
buildRemoveAds(),
// buildSoundControl(),
// buildFlashOnStart(),
]),
)
],
),
),
);
}
Widget buildRemoveAds() => SimpleSettingsTile(
title: 'Remove ads',
subtitle: '',
leading: IconWidget(icon: Icons.login, color: Colors.indigo.shade900, ),
onTap: () =>  ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
margin: EdgeInsets.only(bottom:20),
behavior: SnackBarBehavior.floating,
content: Text("some message"),
)),
);
}

查看它正在使用的默认颜色的插件外观,如果是,是否可以修改它如果不是,则不可能通过特定的插件进行修改

最新更新