at_theme_flutter 1.0.9 at_theme_flutter: ^1.0.9 copied to clipboard
A Flutter plugin project to provide theme selection in atPlatform apps with ease.
at_theme_flutter example #
The at_theme_flutter package is designed to make it easy to add theme selection in Flutter apps on atPlatform.
Give it a try #
This package includes a working sample application in the example directory that demonstrates the key features of the package. To create a personalized copy, use at_app create
as shown below or check it out on GitHub.
$ flutter pub global activate at_app
$ at_app create --sample=<package ID> <app name>
$ cd <app name>
$ flutter run
Notes:
- You only need to run
flutter pub global activate
once - Use
at_app.bat
for Windows
How it works #
Like most applications built for the atPlatform, we start with the at_onboarding_flutter widget which handles secure management of secret keys for an atsign as cryptographically secure replacement for usernames and passwords.
After onboarding, the app can give the option to select and switch theme either as a menu item or configuration setting.
The package includes the following UI component:
- Theme settings page
The package also manages all the data it needs for you.
Sample Usage #
You can utilise a streamController and StreamBuilder to switch to the selected theme. The usage can be found in the example app.
To get saved theme
AppTheme? appTheme = await getThemeData();
To use custom theme
var appTheme = AppTheme.from();
var result = await setAppTheme(appTheme);
Like everything else we do, this package and even the sample application are open source software which means we love it when you gift us with your feedback, contributions and even any bugs that you help us to discover. See CONTRIBUTING.md for detailed guidance on how to setup tools, tests and make a pull request.