title: How do I use the different shades of a color swatch in Flutter?
body: <p>In the default Flutter application code, I tried to change the following code</p>
  <p>from:</p>
  <pre><code>primarySwatch: Colors.blueGrey
  </code></pre>
  <p>to:</p>
  <pre><code>primarySwatch: Colors.blueGrey[500]
  </code></pre>
  <p>but this throws an error:</p>
  <pre><code> ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
  I/flutter ( 4512): The following assertion was thrown building MyApp(dirty):
  I/flutter ( 4512): type 'Color' is not a subtype of type 'MaterialColor' of 'primarySwatch' where
  I/flutter ( 4512):   Color is from dart:ui
  I/flutter ( 4512):   MaterialColor is from package:flutter/src/material/colors.dart
  I/flutter ( 4512):   int is from dart:core
  I/flutter ( 4512): 
  I/flutter ( 4512): Either the assertion indicates an error in the framework itself, or we should provide substantially
  I/flutter ( 4512): more information in this error message to help you determine and fix the underlying cause.
  I/flutter ( 4512): In either case, please report this assertion by filing a bug on GitHub:
  I/flutter ( 4512):   https://github.com/flutter/flutter/issues/new
  I/flutter ( 4512): 
  I/flutter ( 4512): When the exception was thrown, this was the stack:
  I/flutter ( 4512): #0      new ThemeData (package:flutter/src/material/theme_data.dart:78:19)
  I/flutter ( 4512): #1      MyApp.build (/data/user/0/com.hackathon.gunbanana/cache/gun_bananaEMVSSI/gun_banana/lib/main.dart:11:18)
  I/flutter ( 4512): #2      StatelessElement.build (package:flutter/src/widgets/framework.dart:3678:28)
  I/flutter ( 4512): #3      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3625:15)
  I/flutter ( 4512): #4      Element.rebuild (package:flutter/src/widgets/framework.dart:3478:5)
  I/flutter ( 4512): #5      ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3605:5)
  I/flutter ( 4512): #6      ComponentElement.mount (package:flutter/src/widgets/framework.dart:3600:5)
  I/flutter ( 4512): #7      Element.inflateWidget (package:flutter/src/widgets/framework.dart:2890:14)
  I/flutter ( 4512): #8      Element.updateChild (package:flutter/src/widgets/framework.dart:2693:12)
  I/flutter ( 4512): #9      RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:852:16)
  I/flutter ( 4512): #10     RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:823:5)
  I/flutter ( 4512): #11     RenderObjectToWidgetAdapter.attachToRenderTree.&lt;anonymous closure&gt; (package:flutter/src/widgets/binding.dart:769:17)
  I/flutter ( 4512): #12     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2205:19)
  I/flutter ( 4512): #13     RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:768:13)
  I/flutter ( 4512): #14     BindingBase&amp;GestureBinding&amp;ServicesBinding&amp;SchedulerBinding&amp;PaintingBinding&amp;RendererBinding&amp;WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:657:7)
  I/flutter ( 4512): #15     runApp (package:flutter/src/widgets/binding.dart:699:7)
  I/flutter ( 4512): #16     main (/data/user/0/com.hackathon.gunbanana/cache/gun_bananaEMVSSI/gun_banana/lib/main.dart:3:16)
  I/flutter ( 4512): #17     _startIsolate.&lt;anonymous closure&gt; (dart:isolate-patch/dart:isolate/isolate_patch.dart:279)
  I/flutter ( 4512): #18     _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)
  I/flutter ( 4512): ════════════════════════════════════════════════════════════════════════════════════════════════════
  </code></pre>
  <p><img src="https://i.stack.imgur.com/P3Oyb.png" alt="Message on the mobile" /></p>
  <p>How do I use shades?</p>