flutter_build_mode 1.1.1 icon indicating copy to clipboard operation
flutter_build_mode: ^1.1.1 copied to clipboard

A package that extends the use of the 3 build modes, release, profile, and debug, for Flutter apps!

Test and Lint

flutter_build_mode #

A package that extends the use of the 3 build modes, release, profile, and debug, for Flutter apps!

Usage #

import 'package:flutter_build_mode/flutter_build_mode.dart';

// return true if build mode is Release mode.
BuildMode.isRease;

// return true if build mode is Profile mode.
BuildMode.isProfile;

// return true if build mode is Debug mode.
BuildMode.isDebug;

// return the result of a callback that matches the runtime build mode.
BuildMode.when(
  release: () => 'release mode!',
  profile: () => 'profile mode!',
  debug: () => 'debug mode!',
);

Note #

If you simply want to get the build mode, we recommend using an API such as kReleaseMode in the foundation package.

2
likes
140
pub points
11%
popularity

Publisher

verified publisher iconokaryo.io

A package that extends the use of the 3 build modes, release, profile, and debug, for Flutter apps!

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_build_mode