
import 'package:flutter/material.dart';

class Product {
  String? name, type;
  double? yield;
  double? priceUnit, funds, totalPercent;

  Product({this.name, this.type, this.yield, this.priceUnit, this.funds, this.totalPercent = 1});
}

class ProductViewModel extends ChangeNotifier {
  static Product selectedProduct = Product();
  Product get getSelectedProduct => selectedProduct;

  double totalInvestment = 0;

  void setSelectedProduct(Product product) {
    selectedProduct = product;
    notifyListeners();
  }

  void setTotalInvestment(double value) {
    totalInvestment = value;
    notifyListeners();
  }
}