fmt method

Future<int> fmt(
  1. List<String> args,
  2. {int nameWidth}
)

Implementation

Future<int> fmt(
  List<String> args, {
  int nameWidth,
}) {
  final executable = isFlutter ? "flutter" : "dartfmt";
  final arguments = isFlutter ? ["format", ...args] : args;

  return run(
    executable,
    arguments,
    nameWidth: nameWidth,
  );
}