import 'package:cofounderella/themes/theme_provider.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class SettingsPage extends StatelessWidget { const SettingsPage({super.key}); @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Theme.of(context).colorScheme.background, appBar: AppBar( title: const Text("Settings"), ), body: Container( decoration: BoxDecoration( color: Theme.of(context).colorScheme.secondary, borderRadius: BorderRadius.circular(12), ), margin: const EdgeInsets.all(25), padding: const EdgeInsets.all(16), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ // dark mode switch const Text("Dark Mode"), CupertinoSwitch( value: Provider.of(context, listen: false).isDarkMode, onChanged: (value) => Provider.of(context, listen: false) .toggleTheme(), ), ], ), ), ); } }