Skip to content

PlayX Core documentation

Detailed guides for every part of playx_core. For a quick overview, see the package README; for the API reference of every class and method, see the API documentation.

Start here

Guide What it covers
Getting started Requirements, installation, PlayxCore.bootCore, GetIt, disposing, project layout.
Migrating to 2.0 Every breaking change from 1.x, with before/after code.

Storage

Guide What it covers
Preferences PlayxPrefs, PlayxAsyncPrefs, PlayxPrefsWithCache: which to pick, typed getters, maps, lists and objects.
Secure preferences PlayxSecurePrefs: backends, auto fallback, hiding key names, web, migration, failure handling.

Configuration

Guide What it covers
Environment configuration PlayxEnv: .env files, environments and flavors, --dart-define, typed getters, required keys.
Secure env Encrypting sensitive values with the secure_env command, CI/CD setup, threat model.

Utilities

Guide What it covers
Extensions String, Iterable, DateTime, Duration, Color, bool, Locale, BuildContext, padding and border helpers.
Utilities Safe type conversion, JSON access, MapUtils, system UI helpers, platform checks, WebUtils.
Logging PlayxLogger and its settings.

Quality

Guide What it covers
Testing Mocking storage, env and platform channels in your own tests.
CI/CD samples Ready-made Codemagic, GitHub Actions and Vercel configurations.

Example app

The example app is a runnable project using PlayxPrefs and PlayxEnv with environments, build-time defines and secure env.

Conventions used in these guides

  • maybeGet* and get*. Every typed getter in the package comes in two forms: maybeGetX(key) returns null when there is no usable value, and getX(key, fallback: ...) returns a default instead.
  • Unscaled numbers. Layout helpers such as 16.p use the raw number. Apps using a scaling package (for example flutter_screenutil) scale the number first: 16.r.p.
  • Examples assume import 'package:playx_core/playx_core.dart';, which exports everything documented here.