FMTUI

A modern and customizable Flutter UI component library for building consistent and scalable applications.

pub package pub points license

๐Ÿ“ฆ View on pub.dev ยท ๐Ÿš€ Live Demo


โœจ Overview

FMTUI is a reusable Flutter UI component library designed to help developers build applications with a consistent and scalable design system.

It provides reusable widgets, design tokens, theming, responsive dimensions, typography, colors, and common UI utilities.

The goal of FMTUI is simple:

Build once, customize easily, and keep your Flutter applications visually consistent.


๐Ÿš€ Live Demo

Explore the complete FMTUI component showcase:

https://fmtui.vercel.app

The showcase demonstrates the available components, design tokens, themes, customization options, playgrounds, and API usage.


๐Ÿ“ฆ Installation

Add FMTUI to your pubspec.yaml:

dependencies:
  fmtui: ^0.1.0

Then run:

flutter pub get

Or install it directly from:

https://pub.dev/packages/fmtui


๐Ÿ Quick Start

Import FMTUI:

import 'package:fmtui/fmtui.dart';

Configure the FMTUI theme:

import 'package:flutter/material.dart';
import 'package:fmtui/fmtui.dart';

void main() {
  runApp(
    MaterialApp(
      theme: AppTheme.light(),
      darkTheme: AppTheme.dark(),
      themeMode: ThemeMode.system,
      home: const ExamplePage(),
    ),
  );
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: AppButton(
          label: 'Continue',
          onPressed: () {},
        ),
      ),
    );
  }
}

๐ŸŽจ Features

  • ๐ŸŽจ Customizable light and dark themes
  • ๐Ÿงฉ Reusable Flutter UI components
  • ๐Ÿ“ Design tokens for spacing, sizing, radius, and typography
  • ๐Ÿ”ค Customizable typography
  • ๐ŸŒˆ Theme-aware color system
  • ๐Ÿ“ฑ Responsive layout helpers
  • ๐Ÿ”„ Runtime design-scale support
  • ๐Ÿงฑ Ready-to-use common UI components
  • ๐Ÿ› ๏ธ Component playgrounds and API examples
  • โ™ป๏ธ Reusable design-system utilities
  • ๐ŸŒ Flutter Web support

๐Ÿงฉ Components

FMTUI currently includes:

Component Description
AppButton Customizable application buttons
AppCard Flexible card component
AppCheckbox Custom checkbox with sizing and labeling
AppIcon Centralized icon component
AppIconButton Icon-based action button
AppLoader Loading indicators with multiple variants
AppPopover Popover and contextual content
AppProgress Linear and circular progress indicators
AppRadio Radio buttons and radio groups
AppSwitch Customizable switch component
SegmentedButton Segmented selection control

More components will be added as the library evolves.


๐ŸŽจ Theming

FMTUI provides built-in light and dark themes:

MaterialApp(
  theme: AppTheme.light(),
  darkTheme: AppTheme.dark(),
  themeMode: ThemeMode.system,
);

You can customize the color system without modifying individual widgets:

MaterialApp(
  theme: AppTheme.light(
    colors: ColorVariables.light().copyWith(
      textBrandPrimary: Colors.blue,
      fgBrandPrimary: Colors.blue,
      btnBrandPrimary: Colors.white,
      btnBrandPrimaryBg: Colors.blue,
    ),
  ),
);

Components automatically consume the active theme through the FMTUI theme system.


๐ŸŒ— Dark Mode

FMTUI uses Flutter's standard theme system, so components automatically respond to the active theme.

MaterialApp(
  theme: AppTheme.light(),
  darkTheme: AppTheme.dark(),
  themeMode: ThemeMode.system,
);

You can also check the currently active theme:

if (context.isDarkMode) {
  // Dark theme
}

Or:

if (context.isLightMode) {
  // Light theme
}

๐Ÿ“ Design Tokens

FMTUI includes reusable design tokens to help maintain consistent spacing and sizing throughout your application.

Spacing

AppSpacing.xl
AppSpacing.twoxl
AppSpacing.threexl

Or access scaled values through BuildContext:

Padding(
  padding: EdgeInsets.all(context.spacingXL),
)

Radius

context.radiusMD
context.radiusLG

Or:

BorderRadius.circular(context.radiusMD)

Icon Size

context.iconSizeMD
context.iconSizeLG

Or:

Icon(
  Icons.home,
  size: context.iconSizeLG,
)

Component Size

AppSize.sm
AppSize.md
AppSize.lg

Or:

SizedBox(
  width: context.sizeMD,
  height: context.sizeMD,
)

Typography

AppFontSize.sm
AppFontSize.md
AppFontSize.lg

๐Ÿ“ฑ Responsive Design

FMTUI provides simple responsive helpers:

if (context.isMobile) {
  // Mobile layout
}

if (context.isTablet) {
  // Tablet layout
}

if (context.isDesktop) {
  // Desktop layout
}

You can also use responsive dimensions:

Container(
  width: context.dp(280),
  padding: EdgeInsets.all(context.spacingXL),
)

๐Ÿ”ข Design Scale

FMTUI supports a configurable design scale.

For example:

AppTheme.light(
  scale: const AppScale(
    factor: 1.0,
  ),
);

You can increase the scale:

AppTheme.light(
  scale: const AppScale(
    factor: 1.25,
  ),
);

This allows design-system dimensions such as spacing, radius, icon sizes, and component sizes to scale consistently.


๐Ÿ› ๏ธ Component Example

For example, creating a button is simple:

AppButton(
  label: 'Continue',
  onPressed: () {
    // Handle action
  },
)

FMTUI components are designed to consume the active theme and design tokens rather than requiring each application to implement its own styling system.


๐Ÿ“š Documentation & Showcase

The interactive showcase provides examples and playgrounds for FMTUI components.

๐Ÿš€ Live Showcase

https://fmtui.vercel.app

๐Ÿ“ฆ Package

https://pub.dev/packages/fmtui

The showcase includes:

  • Component examples
  • Interactive playgrounds
  • API usage
  • Light and dark themes
  • Design tokens
  • Responsive layouts
  • Customization examples

๐Ÿ—๏ธ Design System

FMTUI is designed around a layered design-system architecture:

FMTUI
โ”‚
โ”œโ”€โ”€ Theme
โ”‚   โ”œโ”€โ”€ Colors
โ”‚   โ”œโ”€โ”€ Typography
โ”‚   โ”œโ”€โ”€ Scale
โ”‚   โ””โ”€โ”€ Branding
โ”‚
โ”œโ”€โ”€ Design Tokens
โ”‚   โ”œโ”€โ”€ Spacing
โ”‚   โ”œโ”€โ”€ Sizing
โ”‚   โ”œโ”€โ”€ Radius
โ”‚   โ”œโ”€โ”€ Font Size
โ”‚   โ””โ”€โ”€ Icon Size
โ”‚
โ”œโ”€โ”€ Components
โ”‚   โ”œโ”€โ”€ AppButton
โ”‚   โ”œโ”€โ”€ AppCard
โ”‚   โ”œโ”€โ”€ AppCheckbox
โ”‚   โ”œโ”€โ”€ AppIcon
โ”‚   โ”œโ”€โ”€ AppIconButton
โ”‚   โ”œโ”€โ”€ AppLoader
โ”‚   โ”œโ”€โ”€ AppPopover
โ”‚   โ”œโ”€โ”€ AppProgress
โ”‚   โ”œโ”€โ”€ AppRadio
โ”‚   โ”œโ”€โ”€ AppSwitch
โ”‚   โ””โ”€โ”€ SegmentedButton
โ”‚
โ””โ”€โ”€ Utilities
    โ”œโ”€โ”€ Responsive Helpers
    โ”œโ”€โ”€ Theme Helpers
    โ””โ”€โ”€ Formatting Utilities

This structure allows applications to share a common visual language while still allowing individual projects to customize the theme.


๐ŸŒ Platform Support

FMTUI is built for Flutter and supports the platforms supported by the Flutter framework.

The package currently supports:

  • Android
  • iOS
  • Web
  • Linux
  • macOS
  • Windows

๐Ÿงช Example Project

A complete example application is included with the package.

The example acts as an interactive component showcase and demonstrates how the components, themes, design tokens, and responsive utilities can be used together.


๐Ÿค Contributing

Contributions, bug reports, feature requests, and improvements are welcome.

If you find a bug or have an idea for a new component, please open an issue or submit a pull request.

Before submitting a pull request, please make sure the project passes:

flutter analyze
flutter test

๐Ÿ“‹ Roadmap

FMTUI is actively evolving.

Planned improvements include:

  • Additional UI components
  • More customization options
  • Expanded design tokens
  • Improved accessibility
  • More documentation
  • Additional examples
  • Improved animation support
  • Expanded form components

๐Ÿ“„ License

FMTUI is released under the MIT License.

See LICENSE for more information.


Resource Link
๐Ÿ“ฆ Pub.dev fmtui
๐Ÿš€ Live Demo fmtui.vercel.app
๐Ÿ“š API Documentation pub.dev API Reference
๐Ÿ“‹ Changelog CHANGELOG.md
๐Ÿ“„ License MIT License

โค๏ธ Built with Flutter

FMTUI is built with Flutter and is intended to make building consistent Flutter applications faster, cleaner, and more enjoyable.

FMTUI โ€” Build consistent Flutter interfaces, faster.

Libraries

fmtui