title: What is the difference between Flutter packages widgets.dart, material.dart and cupertino.dart and which one to use?
body: <p>When using flutter, I often come around a type being exposed by different packages in the standard library.</p>
  
  <p>For example the <code>FlutterError</code> but the same applies to other widgets. When writing it and using IntelliSense in VS Code to resolve the package to import so that <code>FlutterError</code> is available, IntelliSense offers me FlutterError in multiple different packages:</p>
  
  <p>In this case, it's available from</p>
  
  <ul>
  <li><code>package:flutter/widgets.dart</code></li>
  <li><code>package:flutter/foundation.dart</code></li>
  <li><code>package:flutter/material.dart</code></li>
  <li><code>package:flutter/cupertino.dart</code></li>
  <li><code>package:flutter/rendering.dart</code></li>
  </ul>
  
  <p>My understanding is that <code>material.dart</code> and <code>cupertino.dart</code> offer widgets in the particular style - but what is the rest and which package should I import in a <code>MaterialApp(..)</code> that should be platform independent and also run on iOS?</p>
  
  <p>And - if it makes a difference - which one should be used so that platform-specific widgets are automatically used on Android &amp; iOS for native functionality like Date/Timepickers so that a Datepicker is automatically the platform specific variant on Android and the platform specific variant on iOS?</p>