fast_extensions 0.3.2 copy "fast_extensions: ^0.3.2" to clipboard
fast_extensions: ^0.3.2 copied to clipboard

discontinued

Convenience extensions to make common Flutter tasks less annoying

Convenience extensions to make common Flutter tasks less annoying

pub package codecov checks popularity likes pub points

Features #

Extension Use-case
FastLocale Localizations.localeOf(context)
FastMaterialColor FastMaterialColor.fromColor(color)
FastMaterialLocalizations MaterialLocalizations.of(context)
FastWidgetStateProperty Create WidgetStateProperty using a map
FastMediaQuery MediaQuery.of(context)
FastTheme Theme.of(context)

Usage #

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

void example(BuildContext context) {
  // FastLocale
  context.countryCode;
  context.languageCode;

  // FastMaterialColor
  final primarySwatch = FastMaterialColor.fromColor(const Color(0xFFBC52CC));
  ThemeData(primarySwatch: primarySwatch);

  // FastMaterialLocalizations
  context.backButtonTooltip;

  // FastWidgetStateProperty
  final wsp = FastWidgetStateProperty(
    {WidgetState.selected: Colors.white},
    defaultValue: Colors.black,
  );
  ThemeData(
    segmentedButtonTheme:
        SegmentedButtonThemeData(style: ButtonStyle(foregroundColor: wsp)),
  );

  // FastMediaQuery
  context.screenWidth;
  context.screenHeight;
  context.windowViewInsets;

  // FastTheme
  context.theme;
  context.textTheme;
  context.isDarkMode;
  // ...
}

Additional information #

See fast_ui for more information

0
likes
90
points
63
downloads

Publisher

verified publisherrexios.dev

Weekly Downloads

Convenience extensions to make common Flutter tasks less annoying

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on fast_extensions