Skip to content

Commit

Permalink
Linted code
Browse files Browse the repository at this point in the history
  • Loading branch information
andreped committed Jan 6, 2025
1 parent ec3e26d commit ef51b23
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 18 deletions.
4 changes: 2 additions & 2 deletions lib/core/database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ class DatabaseHelper {
file_path = '${directory.path}/backup_database.db';
} else if (Platform.isAndroid) {
file_path = '/storage/emulated/0/Download/backup_database.db';

// Use file picker to select the backup file
FilePickerResult? result = await FilePicker.platform.pickFiles(
type: FileType.any,
Expand All @@ -620,7 +620,7 @@ class DatabaseHelper {
} else {
throw Exception('Unsupported platform');
}

// Check if the backup file exists
File selectedFile = File(file_path);
if (!await selectedFile.exists()) {
Expand Down
4 changes: 1 addition & 3 deletions lib/tabs/visualization_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,7 @@ class VisualizationTabState extends State<VisualizationTab> {
if (_selectedTable == 'Fitness') {
switch (_dataType) {
case 'Weight':
return widget.isKg
? value
: value * 2.20462;
return widget.isKg ? value : value * 2.20462;
case 'Height':
return value; // Assuming height is already in the desired unit
case 'Age':
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/charts/chart_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -266,4 +266,4 @@ class ChartWidget extends StatelessWidget {
final formattedDate = DateFormat('dd/MM').format(date);
return 'x=$formattedDate\ny=${y.toStringAsFixed(2)}';
}
}
}
16 changes: 4 additions & 12 deletions lib/widgets/settings/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,7 @@ class SettingsModalState extends State<SettingsModal> {
value: _appTheme,
style: TextStyle(
fontSize: 14,
color: isDarkMode
? Colors.purple
: Colors.black,
color: isDarkMode ? Colors.purple : Colors.black,
),
items: const [
DropdownMenuItem(
Expand Down Expand Up @@ -287,9 +285,7 @@ class SettingsModalState extends State<SettingsModal> {
child: Text(
_isKg ? 'kg' : 'lbs',
style: TextStyle(
color: Theme.of(context)
.colorScheme
.primary,
color: Theme.of(context).colorScheme.primary,
fontSize: 16,
),
),
Expand Down Expand Up @@ -324,9 +320,7 @@ class SettingsModalState extends State<SettingsModal> {
value: _aggregationMethod,
style: TextStyle(
fontSize: 14,
color: isDarkMode
? Colors.purple
: Colors.black,
color: isDarkMode ? Colors.purple : Colors.black,
),
items: const [
DropdownMenuItem(
Expand Down Expand Up @@ -366,9 +360,7 @@ class SettingsModalState extends State<SettingsModal> {
value: _plotType,
style: TextStyle(
fontSize: 14,
color: isDarkMode
? Colors.purple
: Colors.black,
color: isDarkMode ? Colors.purple : Colors.black,
),
items: const [
DropdownMenuItem(
Expand Down

0 comments on commit ef51b23

Please sign in to comment.