text
stringlengths 1
474
|
|---|
given to people who are more verbose (more willing to chat or write) or those
|
who are closer to the development team, who have a larger bandwidth and lower
|
cost for chatting or face-to-face meetings.By having the same metrics to detect problems no matter how far away or how
|
silent the users are, we can treat all issues fairly. That, in turn,
|
allows us to focus on the right issues that have greater impact.<topic_end>
|
<topic_start>
|
How to make performance useful
|
The following summarizes the 4 points discussed here, from a slightly different
|
perspective:Make performance metrics easy to consume. Do not overwhelm the readers with a
|
lot of numbers (or words). If there are many numbers, then try to summarize
|
them into a smaller set of numbers (for example, summarize many numbers into
|
a single average number). Only notify readers when the numbers change
|
significantly (for example, automatic alerts on spikes or regressions).Make performance metrics as unambiguous as possible. Define the unit that the
|
number is using. Precisely describe how the number is measured. Make the
|
number easily reproducible. When there’s a lot of noise, try to show the full
|
distribution, or eliminate the noise as much as possible by aggregating many
|
noisy measurements.Make it easy to compare performance. For example, provide a timeline to
|
compare the current version with the old version. Provide ways and tools to
|
convert one metric to another. For example, if we can convert both memory
|
increase and fps drops into the number of users dropped or revenue lost in
|
dollars, then we can compare them and make an informed trade-off.Make performance metrics monitor a population that is as wide as possible,
|
so no one is left behind.
|
<topic_end>
|
<topic_start>Obfuscate Dart code
|
<topic_end>
|
<topic_start>
|
What is code obfuscation?
|
Code obfuscation is the process of modifying an
|
app’s binary to make it harder for humans to understand.
|
Obfuscation hides function and class names in your
|
compiled Dart code, replacing each symbol with
|
another symbol, making it difficult for an attacker
|
to reverse engineer your proprietary app.Flutter’s code obfuscation works
|
only on a release build.<topic_end>
|
<topic_start>
|
Limitations
|
Note that obfuscating your code does not
|
encrypt resources nor does it protect against
|
reverse engineering.
|
It only renames symbols with more obscure names.info
|
It is a poor security practice to
|
store secrets in an app.<topic_end>
|
<topic_start>
|
Supported targets
|
The following build targets
|
support the obfuscation process
|
described on this page:info
|
Web apps don’t support obfuscation.
|
A web app can be minified, which provides a similar result.
|
When you build a release version of a Flutter web app,
|
the web compiler minifies the app. To learn more,
|
see Build and release a web app.<topic_end>
|
<topic_start>
|
Obfuscate your app
|
To obfuscate your app, use the flutter build command
|
in release mode
|
with the --obfuscate and --split-debug-info options.
|
The --split-debug-info option specifies the directory
|
where Flutter outputs debug files.
|
In the case of obfuscation, it outputs a symbol map.
|
For example:Once you’ve obfuscated your binary, save
|
the symbols file. You need this if you later
|
want to de-obfuscate a stack trace.lightbulb Tip
|
The --split-debug-info option can also be used without --obfuscate
|
to extract Dart program symbols, reducing code size.
|
To learn more about app size, see Measuring your app’s size.For detailed information on these flags, run
|
the help command for your specific target, for example:If these flags are not listed in the output,
|
run flutter --version to check your version of Flutter.<topic_end>
|
<topic_start>
|
Read an obfuscated stack trace
|
To debug a stack trace created by an obfuscated app,
|
use the following steps to make it human readable:Find the matching symbols file.
|
For example, a crash from an Android arm64
|
device would need app.android-arm64.symbols.Provide both the stack trace (stored in a file)
|
and the symbols file to the flutter symbolize command.
|
For example:For more information on the symbolize command,
|
run flutter symbolize -h.<topic_end>
|
<topic_start>
|
Read an obfuscated name
|
To make the name that an app obfuscated human readable,
|
use the following steps:To save the name obfuscation map at app build time,
|
use --extra-gen-snapshot-options=--save-obfuscation-map=/<your-path>.
|
For example:To recover the name, use the generated obfuscation map.
|
The obfuscation map is a flat JSON array with pairs of
|
original names and obfuscated names. For example,
|
["MaterialApp", "ex", "Scaffold", "ey"], where ex
|
is the obfuscated name of MaterialApp.<topic_end>
|
<topic_start>
|
Caveat
|
Be aware of the following when coding an app that will
|
eventually be an obfuscated binary.
|
<code_start>expect(foo.runtimeType.toString(), equals('Foo'));<code_end>
|
<topic_end>
|
<topic_start>Create flavors of a Flutter app
|
<topic_end>
|
<topic_start>
|
What are flavors
|
Have you ever wondered how to set up different environments in your Flutter app?
|
Flavors (known as build configurations in iOS and macOS), allow you (the developer) to
|
create separate environments for your app using the same code base.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.