static Future<void> updateMetricPreferences(Metric metric) async { final pref = await SharedPreferences.getInstance(); await pref.setDouble(kMetricsKey, metric.value); }