Class: Fastlane::Actions::FlutterAction

Inherits:
Action
  • Object
show all
Extended by:
FlutterActionBase
Defined in:
lib/fastlane/plugin/flutter/actions/flutter_action.rb

Class Method Summary collapse

Methods included from FlutterActionBase

authors, is_supported?

Class Method Details

.available_optionsObject



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/fastlane/plugin/flutter/actions/flutter_action.rb', line 26

def self.available_options
  [
    FastlaneCore::ConfigItem.new(
      key: :args,
      env_name: 'FL_FLUTTER_ARGS',
      description: 'Arguments to Flutter command',
      type: Array
    ),
    FastlaneCore::ConfigItem.new(
      key: :capture_stdout,
      env_name: 'FL_FLUTTER_CAPTURE_STDOUT',
      description: 'Do not print stdout of the command, but return it',
      optional: true,
      type: Boolean,
      default_value: false
    )
  ]
end

.descriptionObject



22
23
24
# File 'lib/fastlane/plugin/flutter/actions/flutter_action.rb', line 22

def self.description
  'Run "flutter" binary with the specified arguments'
end

.run(params) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/fastlane/plugin/flutter/actions/flutter_action.rb', line 12

def self.run(params)
  if params[:capture_stdout]
    Helper::FlutterHelper.flutter(*params[:args]) do |_status, output|
      output
    end
  else
    Helper::FlutterHelper.flutter(*params[:args])
  end
end