I couldn't find a good example online of how to use a Switch widget, and store the result in local storage (Shared Preferences) using a Provider.
An example Flutter project to show the use and comination of the following:
- Provider (https://pub.dev/packages/provider)
- Shared Preferences (https://pub.dev/packages/shared_preferences)
- Switch widget (https://api.flutter.dev/flutter/material/Switch-class.html)