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

num sumProducts(List<ProductDao> list) {
  num 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 += num.parse(val);
    }
  }
  return result;
}
