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



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

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



20
21
22
# File 'lib/fastlane/plugin/flutter/actions/flutter_action.rb', line 20

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

.run(params) ⇒ Object



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

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