日本語 | English
A Flutter SDK for safe UI variants.
flutter_variants lets you change approved UI values such as text, labels, and
design copy without shipping a new app release. Layout, navigation, callbacks,
API calls, payments, authentication, and business logic stay in the Flutter
app.
This is not a server-driven UI renderer. It is a small variant slot system.
VariantScope(
values: {
'home.title': {
'type': 'text',
'value': 'Try the new onboarding',
},
},
child: const VariantText(
id: 'home.title',
fallback: 'Welcome',
),
)For server-delivered values, wrap the app with VariantHost:
VariantHost(
url: Uri.parse(
'https://your-domain.com/apps/my_app/production/variants.json',
),
child: const App(),
)See DOCUMENT.md for the full developer guide:
- Philosophy and the slot-based approach
- API reference (
VariantScope,VariantText,VariantImage,VariantColor,VariantSpacing,VariantEdgeInsets,VariantBorderRadius,VariantString,VariantBool,VariantNumber,VariantTextStyle,VariantVisibility) VariantHostconfiguration (timeout, retry, refresh, cache, callbacks)- Self-hosting and the
variants.jsonformat
Contributions are welcome — see CONTRIBUTING.md for the dev setup, code conventions, and hard rules to respect.
cd example
flutter runflutter test
cd example
flutter testIf you use FVM, prefix the commands with fvm:
fvm flutter test
cd example
fvm flutter test