Passing flutter-embedded-linux flags
Overview
flutter-embedded-linux has several flags to control certain aspects of the behaviour.
They can't be used with flutter-elinux and at least some are overlapping (example with -d used for targeting the device and enabling decorations in flutter-elinux and flutter-embedded-linux respectively).
Question
Is it within the scope of this project to enable the use of the additional flags from flutter-embedded-linux?
Yes, currently some command-line options are not supported yet in flutter-elinux. I welcome your contribution to flutter-elinux.
Great!
I will try to familiarize myself with the code to see how this can be achieved in the next week or so. Probably I will also check with the Flutter Study Group for ideas on how to do it?
@HidenoriMatsubayashi , if you have the time, I have a small question for the generation of the tool:
- Which flutter tools are we looking for on this line? https://github.com/sony/flutter-elinux/blob/490317ad3eee0745027d1675986e1d5f6e727e22/pubspec.yaml#L12
- Should those be the ones provided from
depot_tools? - Could I use the installed flutter version in
/opt/flutter
- Should those be the ones provided from
Which flutter tools are we looking for on this line?
https://github.com/flutter/flutter/tree/master/packages/flutter_tools
Should those be the ones provided from depot_tools ?
What does it mean?
Could I use the installed flutter version in /opt/flutter
No. flutter-elinux automatically downloads the corresponding flutter_tools version. See: https://github.com/sony/flutter-elinux/blob/main/bin/internal/shared.sh
Thank you, @HidenoriMatsubayashi !
That was silly of me, I was trying to do dart pub get instead of letting the tool do it's job...
We can add new arguments for building:
- https://github.com/sony/flutter-elinux/blob/2b8096b0983c4312673b96aa921bb42d1badb9e1/lib/commands/build.dart#L38
Example build flags
argParser.addFlag(
'onscreen-keyboard',
help: 'Enables onscreen-keyboard support.',
);
argParser.addFlag(
'fullscreen',
help: 'Sets the app to fullscreen.',
);
and running:
- https://github.com/sony/flutter-elinux/blob/2b8096b0983c4312673b96aa921bb42d1badb9e1/lib/commands/run.dart#L14
Example run flags
ELinuxRunCommand({super.verboseHelp}) {
argParser.addFlag(
'onscreen-keyboard',
help: 'Enables onscreen-keyboard support.',
);
argParser.addFlag(
'fullscreen',
help: 'Sets the app to fullscreen.',
);
}
Now to find how to pass them further down the stack.
Closing.