-
-
Save Vanethos/863bd0d9ca9d13c3d79315de1cce7583 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// main_common.dart | |
// This will hold all the common logic to be used in each application | |
void mainCommon(Config config) async { | |
// Ensure that the Flutter Framework is available to access | |
await WidgetsFlutterBinding.ensureInitialized(); | |
SharedPreferences prefs = await SharedPreferences.getInstance(); | |
final r = prefs.getInt('r'); | |
final g = prefs.getInt('g'); | |
final b = prefs.getInt('b'); | |
final color = Color.fromRGBO(r, g, b, 1.0); | |
runApp( | |
MyApp(config, color) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment