title: Mixins in Dart: How To Use Them
body: <p>So I'm trying to create a simple little program where I utilize mixins. I want to represent a bookstore and have two products (books, bags)..but I want the abstract class up top (Com) to define methods that can be applied to all products (objects) without changing the individual classes. However, I have no idea how to implement this. The method can be as simple as tracking if a certain book is in the bookstore.</p>
  
  <p>Here is my current code:</p>
  
  <pre><code>abstract class Com {
  not sure not sure
  }
  
  
  class Product extends Object with Com {
  String name;
  double price;
  Product(this.name, this.price);
  }
  
  class Bag extends Product {
  String typeofb;
  Bag(name, price, this.typeofb) :super(name, price);
  }
  
  class Book extends Product {
  
  String author;
  String title;
  Book(name, price, this.author, this.title):super(name, price);
  }
  
  void main() {
  var b = new Book('Best Book Ever', 29.99,'Ed Baller &amp; Eleanor Bigwig','Best 
  Book Ever');
  
   }
  </code></pre>