import 'package:satu/core/models/flow/dao/product_dao.dart';

double sumProducts(List<ProductDao> list) {
  double result = 0.0;
  if (list.isNotEmpty) {
    for( final ProductDao product in list) {
      final String val = (product.price! * product.count!).toStringAsFixed(5);
      //  result += product.price! * product.count!;
      result += double.parse(val);
    }
  }
  return result;
}
