How to load theme at beginning in fluttter
问题 I want to users can change and save the theme color in my app. However, I have no ideas how to load the saved theme color when the app start running. For example, I want to load the saved theme color directly in the comment place below. I tried SharedPreference. However the SharedPreference instance need to run with await . It seems can't be used here. Is there any way I can load saved theme here directly instead of using setState or something like it? import 'package:flutter/material.dart';