shouldBuildFromSource function

bool shouldBuildFromSource(
  1. HookInput input
)

Reads the build_from_source user-defined flag from input.

Returns true if the user has set hooks.user_defines.<package>.build_from_source to true, or false otherwise.

Implementation

bool shouldBuildFromSource(HookInput input) {
  final buildFromSource = input.userDefines['build_from_source'];
  if (buildFromSource is bool) {
    return buildFromSource;
  }
  return false;
}