at_theme_flutter 1.0.8 copy "at_theme_flutter: ^1.0.8" to clipboard
at_theme_flutter: ^1.0.8 copied to clipboard

A Flutter plugin project to provide theme selection in atPlatform apps with ease.

The Atsign FoundationThe Atsign Foundation

pub package gitHub license

Overview #

The at_theme_flutter package is for Flutter developers who want to add ability to switch theme in their atPlatform apps.

This open source package is written in Dart, supports Flutter and follows the atPlatform's decentralized, edge computing model with the following features:

  • Cryptographic control of data access through personal data stores
  • No application backend needed
  • End to end encryption where only the data owner has the keys
  • Private and surveillance free connectivity
  • Ability to select and switch themes

We call giving people control of access to their data “flipping the internet” and you can learn more about how it works by reading this overview.

Get Started: #

There are three options to get started using this package.

1. Quick start - generate a skeleton app with at_app #

This package includes a working sample application in the Example directory that you can use to create a personalized copy using at_app create in four commands.

$ flutter pub global activate at_app 
$ at_app create --sample=<package ID> <app name> 
$ cd <app name>
$ flutter run

Notes:

  1. You only need to run flutter pub global activate once
  2. Use at_app.bat for Windows

2. Clone it from GitHub #

Feel free to fork a copy the source from the GitHub repo. The example code contained there is the same as the template that is used by at_app above.

$ git clone https://github.com/atsign-foundation/at_widgets.git

3. Manually add the package to a project #

Instructions on how to manually add this package to you project can be found on pub.dev here.

How it works #

This package provide a UI screen to present the theme selection, preview and apply. It also supports custom theme data.

Setup #

The theme service needs to be initialised. The root domain has to be specified.

initializeThemeService(rootDomain: AtEnv.rootDomain);

Usage #

To get saved theme #

AppTheme? appTheme = await getThemeData();

To use custom theme #

var appTheme = AppTheme.from();
var result = await setAppTheme(appTheme);

Open source usage and contributions #

This is open source code, so feel free to use it as is, suggest changes or enhancements or create your own version. See CONTRIBUTING.md for detailed guidance on how to setup tools, tests and make a pull request.