I use flutter_settings_screens flutter plugin for settings screen of my mobile application and I can't change background of each setting. For example, I want to change background of SimpleSettingsTile. How can I do that ?
Here is my code:
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"),
)),
);
}