Skip to content

Instantly share code, notes, and snippets.

import 'dart:math';
Map<String, dynamic> adjustAmount(double amount, double tariff) {
if (tariff <= 0) {
throw ArgumentError('wrong tariff value');
}
int kwh;
if (amount < tariff) {
kwh = 1;