chore: fix deprecated APIs and unused imports

This commit is contained in:
fiatcode 2026-04-30 16:26:56 +07:00
parent 6cbb7a2070
commit 93d5534755
No known key found for this signature in database
5 changed files with 23 additions and 22 deletions

View file

@ -240,7 +240,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
border: Border.all(color: const Color(0xFF2a2a2a), width: 1),
),
child: DropdownButtonFormField<int>(
value: _accuracy,
initialValue: _accuracy,
dropdownColor: const Color(0xFF1a1a1a),
style: const TextStyle(
fontFamily: 'monospace',
@ -359,8 +359,8 @@ class _SettingsScreenState extends State<SettingsScreen> {
Switch(
value: value,
onChanged: onChanged,
activeColor: const Color(0xFF00e676),
activeTrackColor: const Color(0xFF00e676).withOpacity(0.3),
activeThumbColor: const Color(0xFF00e676),
activeTrackColor: const Color(0xFF00e676).withValues(alpha: 0.3),
),
],
),
@ -369,7 +369,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
Widget _buildSaveButton() {
return Material(
color: const Color(0xFF00bcd4).withOpacity(0.1),
color: const Color(0xFF00bcd4).withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(4),
child: InkWell(
onTap: _saveSettings,
@ -380,7 +380,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
border: Border.all(
color: const Color(0xFF00bcd4).withOpacity(0.4),
color: const Color(0xFF00bcd4).withValues(alpha: 0.4),
width: 1,
),
),