fl_ui_config 0.0.4 copy "fl_ui_config: ^0.0.4" to clipboard
fl_ui_config: ^0.0.4 copied to clipboard

Handle UI configuration and changes of a Flutter app. This is a small, focused Flutter library to define an app-wide, consistent UI configuration and control it at runtime.

example/lib/main.dart

import 'package:fl_ui_config/fl_ui_config.dart'
    show UiConfig, ColorPalette, MaterialAppWithUiConfig, TesterUiConfigManager;
import 'package:flutter/material.dart';

// This is a minimalist code example how to use ui config

void main() {
  runApp(const MyApp());
}

const appName = 'UiConfig Demo';

final uiConfig = UiConfig(
  appName: appName,
  defaultColorPalette: ColorPalette.fromMaterialColor(primary: Colors.orange),
  alternativeColorPalettes: {
    'yellow': ColorPalette.fromMaterialColor(primary: Colors.yellow),
    'red': ColorPalette.fromMaterialColor(primary: Colors.red),
  },
);

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialAppWithUiConfig(
      uiConfig: uiConfig,
      uiConfigManager: TesterUiConfigManager(),
      title: appName,
      home: const MyHomePage(title: appName),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(title),
      ),
      body: Center(child: Text('Hello Ui Config!')),
    );
  }
}
1
likes
0
points
903
downloads

Publisher

verified publisherehwplus.com

Weekly Downloads

Handle UI configuration and changes of a Flutter app. This is a small, focused Flutter library to define an app-wide, consistent UI configuration and control it at runtime.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_svg, shared_preferences

More

Packages that depend on fl_ui_config