mint_flutter_extensions 0.0.1 copy "mint_flutter_extensions: ^0.0.1" to clipboard
mint_flutter_extensions: ^0.0.1 copied to clipboard

A set of Flutter extensions to code happier.

Mint Flutter Extensions #

Dart CI License

A set of Flutter extensions to code happier.

Installation #

Install using the Terminal:

flutter pub add mint_flutter_extensions

Or adding the dependency in the pubspec.yaml:

dependencies:
  mint_flutter_extensions: ^0.0.1 # Use the latest version from pub.dev

Get Started #

In your Dart code, you can import the extensions:

import 'package:mint_flutter_extensions/mint_flutter_extensions.dart';

Usage #

Colors #

To get the colorScheme from the BuildContext use:

context.colorScheme

To get the primary color, use:

context.primaryColor

The available colors are:

  • primaryColor
  • onPrimaryColor
  • primaryContainerColor
  • onPrimaryContainerColor
  • secondaryColor
  • onSecondaryColor
  • secondaryContainerColor
  • onSecondaryContainerColor
  • tertiaryColor
  • onTertiaryColor
  • tertiaryContainerColor
  • onTertiaryContainerColor
  • errorColor
  • onErrorColor
  • errorContainerColor
  • onErrorContainerColor
  • surfaceColor
  • onSurfaceColor