flutter_build_mode 1.1.1 copy "flutter_build_mode: ^1.1.1" to clipboard
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
39%
popularity

Publisher

verified publisherokaryo.io

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_build_mode