How to obfuscate Flutter apps?

前端 未结 5 1684
独厮守ぢ
独厮守ぢ 2020-12-29 06:12

Flutter\'s wiki mentions obfuscation is an opt-in in release mode.
And yet, the flutter build command has no relevant option - see:
flutter he

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-29 06:54

    At the moment obfuscation is not directly exposed via the flutter CLI.

    You can try to explicitly pass arguements to the gen_snapshot like this:

    flutter build --extra-gen-snapshot-options=--obfuscate,--save-obfuscation-map=build/symbols.json --release
    

    Note: that obfuscation support is not very well tested and might not work at the moment.

提交回复
热议问题