import 'package:flutter/material.dart'; class SettingsScreen2 extends StatefulWidget { const SettingsScreen2({Key? key}) : super(key: key); @override State createState() => _SettingsScreen2State(); } class _SettingsScreen2State extends State { bool request=true; bool message=true; @override Widget build(BuildContext context) { const myColor=Colors.purple; return Scaffold( appBar: AppBar( backgroundColor: myColor, title: const Text('Settings'), ), body: SingleChildScrollView( child: Padding( padding: const EdgeInsets.only(left: 20.0,top: 20,right: 15), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: EdgeInsets.only(left: 12.0,bottom: 15), child: Text('General',style: TextStyle(fontSize: 25,fontWeight: FontWeight.bold,color: Colors.grey.shade700),), ), Container( decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(15), boxShadow: [BoxShadow(color: Colors.grey.shade200,spreadRadius: 2,blurRadius: 2)] ), child: ListTile( leading: Icon(Icons.person_2_outlined,color: Colors.grey.shade700), title: Text('Edit Profile',style: TextStyle(fontSize: 16,fontWeight: FontWeight.bold,color: Colors.grey.shade700),), trailing: const Icon(Icons.arrow_forward_ios,color: Colors.black,), onTap: (){},), ), Container( margin: EdgeInsets.only(top: 15), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(15), boxShadow: [BoxShadow(color: Colors.grey.shade200,spreadRadius: 2,blurRadius: 2)] ), child: ListTile( leading: Icon(Icons.password,color: Colors.grey.shade700,), title: Text('Change Password',style: TextStyle(fontSize: 16,fontWeight: FontWeight.bold,color: Colors.grey.shade700),), trailing: const Icon(Icons.arrow_forward_ios,color: Colors.black), onTap: (){},), ), Container( margin: EdgeInsets.only(top: 15), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(15), boxShadow: [BoxShadow(color: Colors.grey.shade200,spreadRadius: 2,blurRadius: 2)] ), child: ListTile( leading: Icon(Icons.location_on_outlined,color: Colors.grey.shade700), title: Text('Change Address',style: TextStyle(fontSize: 16,fontWeight: FontWeight.bold,color: Colors.grey.shade700),), trailing: const Icon(Icons.arrow_forward_ios,color: Colors.black), onTap: (){},), ), Padding( padding: EdgeInsets.only(left: 12.0,top: 20), child: Text('Notification',style: TextStyle(fontSize: 25,fontWeight: FontWeight.bold,color: Colors.grey.shade700),), ), Container( margin: EdgeInsets.only(top: 15), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(15), boxShadow: [BoxShadow(color: Colors.grey.shade200,spreadRadius: 2,blurRadius: 2)] ), child: ListTile( title: Text('Friend Request',style: TextStyle(fontSize: 16,fontWeight: FontWeight.bold,color: Colors.grey.shade700),), trailing: Icon( request? Icons.toggle_on_rounded:Icons.toggle_off_rounded,color: request? myColor:Colors.grey,size: 40,), onTap: (){ setState(() { request=! request; });},), ), Container( margin: EdgeInsets.only(top: 15), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(15), boxShadow: [BoxShadow(color: Colors.grey.shade200,spreadRadius: 2,blurRadius: 2)] ), child: ListTile( title: Text('Receive Message',style: TextStyle(fontSize: 16,fontWeight: FontWeight.bold,color: Colors.grey.shade700),), trailing: Icon( message? Icons.toggle_on_rounded:Icons.toggle_off_rounded,color: message? myColor:Colors.grey,size: 40,), onTap: (){ setState(() { message=! message; });},), ), Padding( padding: EdgeInsets.only(left: 10.0,top: 10), child: Text('Others',style: TextStyle(fontSize: 25,fontWeight: FontWeight.bold,color: Colors.grey.shade700),), ), Container( margin: EdgeInsets.only(top: 15), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(15), boxShadow: [BoxShadow(color: Colors.grey.shade200,spreadRadius: 2,blurRadius: 2)] ), child: ListTile( title: Text('Privacy Policy',style: TextStyle(fontSize: 18,fontWeight: FontWeight.bold,color: Colors.grey.shade700),), trailing: const Icon(Icons.arrow_forward_ios,color: Colors.black,), onTap: (){},), ), Container( margin: EdgeInsets.only(top: 15), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(15), boxShadow: [BoxShadow(color: Colors.grey.shade200,spreadRadius: 2,blurRadius: 2)] ), child: ListTile( title: Text('Terms & Conditions',style: TextStyle(fontSize: 18,fontWeight: FontWeight.bold,color: Colors.grey.shade700),), trailing: const Icon(Icons.arrow_forward_ios,color: Colors.black,), onTap: (){},), ), ], ), ), ), ); } }