atualização
This commit is contained in:
@@ -82,7 +82,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
Text(
|
||||
userEmail,
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.7),
|
||||
color: Colors.white.withValues(alpha: 0.7),
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
@@ -127,12 +127,12 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
title: 'Modo Noturno',
|
||||
trailing: Switch(
|
||||
value: _isNightMode,
|
||||
activeThumbColor: AppColors.buttonColor,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_isNightMode = value;
|
||||
});
|
||||
},
|
||||
activeColor: AppColors.buttonColor,
|
||||
),
|
||||
),
|
||||
_buildDivider(),
|
||||
@@ -142,7 +142,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
trailing: Text(
|
||||
_selectedLanguage,
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.7),
|
||||
color: Colors.white.withValues(alpha: 0.7),
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
@@ -174,7 +174,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
_notificationsEnabled = value;
|
||||
});
|
||||
},
|
||||
activeColor: AppColors.buttonColor,
|
||||
activeThumbColor: AppColors.buttonColor,
|
||||
),
|
||||
),
|
||||
_buildDivider(),
|
||||
@@ -218,7 +218,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// Logout Button
|
||||
Container(
|
||||
SizedBox(
|
||||
width: double.infinity,
|
||||
child: ElevatedButton(
|
||||
onPressed: () {
|
||||
@@ -270,7 +270,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
|
||||
Widget _buildDivider() {
|
||||
return Divider(
|
||||
color: Colors.white.withOpacity(0.1),
|
||||
color: AppColors.buttonColor.withValues(alpha: 0.2),
|
||||
height: 1,
|
||||
indent: 16,
|
||||
endIndent: 16,
|
||||
@@ -284,7 +284,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
firstDate: DateTime(2020),
|
||||
lastDate: DateTime(2025),
|
||||
).then((date) {
|
||||
if (date != null) {
|
||||
if (date != null && mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text('Data selecionada: ${date.toString().split(' ')[0]}'),
|
||||
@@ -326,17 +326,25 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
}
|
||||
|
||||
Widget _buildLanguageOption(String language) {
|
||||
return RadioListTile<String>(
|
||||
return ListTile(
|
||||
title: Text(language, style: const TextStyle(color: Colors.white)),
|
||||
value: language,
|
||||
groupValue: _selectedLanguage,
|
||||
onChanged: (value) {
|
||||
trailing: Radio<String>(
|
||||
value: language,
|
||||
groupValue: _selectedLanguage,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_selectedLanguage = value!;
|
||||
});
|
||||
Navigator.pop(context);
|
||||
},
|
||||
fillColor: WidgetStateProperty.all(AppColors.buttonColor),
|
||||
),
|
||||
onTap: () {
|
||||
setState(() {
|
||||
_selectedLanguage = value!;
|
||||
_selectedLanguage = language;
|
||||
});
|
||||
Navigator.pop(context);
|
||||
},
|
||||
activeColor: AppColors.buttonColor,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user