Flutter Analysis and Practice: Evolution and Innovation of Xianyu Technologies

1. Hybrid Projects

1.1 Flutter Project System

Figure 1–1
Figure 1–2
import 'package:flutter_tools/executable.dart' as executable;void main(List<String> args) {
print('[KWLM]:${args.join(' ')}');
# Invalidate cache if:
# * SNAPSHOT_PATH is not a file, or
# * STAMP_PATH is not a file with nonzero size, or
# * Contents of STAMP_PATH is not our local git HEAD revision, or
# * pubspec.yaml last modified after pubspec.lock
if [[ ! -f "$SNAPSHOT_PATH" || ! -s "$STAMP_PATH" || "$(cat "$STAMP_PATH")" != "$revision" || "$FLUTTER_TOOLS_DIR/pubspec.yaml" -nt "$FLUTTER_TOOLS_DIR/ pubspec.lock" ]]; then
rm -f "$FLUTTER_ROOT/version"
touch "$FLUTTER_ROOT/bin/cache/.dartignore"
echo Building flutter tool...
if [[ "$CI" == "true" || "$BOT" == "true" || "$CONTINUOUS_INTEGRATION" == "true" || "$CHROME_HEADLESS" == "1" ]]; then
export PUB_ENVIRONMENT="$PUB_ENVIRONMENT:flutter_install"
if [[ -d "$FLUTTER_ROOT/.pub-cache" ]]; then
export PUB_CACHE="${PUB_CACHE:-"$FLUTTER_ROOT/.pub-cache"}"
retry_upgrade "$DART" $FLUTTER_TOOL_ARGS --snapshot="$SNAPSHOT_PATH" --packages= "$FLUTTER_TOOLS_DIR/.packages" "$SCRIPT_PATH"
echo "$revision" > "$STAMP_PATH"
Building flutter tool...
[KWLM]:--no-color run --machine --track-widget-creation --device-id= GWY7N16A31002764 --start-paused lib/main.dart
Running "flutter packages get" in hello_world... 0.4s
Launching lib/main.dart on MHA AL00 in debug mode...
Initializing gradle...
Resolving dependencies...
Figure 1–3
Figure 1–4
Figure 1–5
kylewong@KyleWongdeMacBook-Pro ios % idevicesyslog | grep listening
Aug 26 14:07:18 KyleWongs-iPhone Runner(Flutter)[686] <Notice>: flutter: Observatory listening on
kylewong@KyleWongdeMacBook-Pro ios % iproxy 8101 56486 your-ios-device-uuid
Figure 1–6
Figure 1–7
Figure 1–8
Figure 1–9
Figure 1–10
kylewong@KyleWongdeMacBook-Pro fwn_idlefish % flutter/bin/flutter attach --debug-uri=
[KWLM]: [attach, --debug-uri=]
Syncing files to device KyleWong's iPhone...
🔥 To hot reload changes while running, press "r". To hot restart (and rebuild state), press "R".
An Observatory debugger and profiler on KyleWong's iPhone is available at:
For a more detailed help message, press "h", To detach, press "d"; to quit, press "q".
new Padding(
padding: new EdgeInsets.only(left: 22.0),
child: createButton(
'foreground': 'fundetail_superfavor_white',
'background': 'super_favor_unhighlight'
buttonSelectedStatus['superfavor'], () {
superLikeComponent.clickV2(widget.itemInfo.itemId, widget.itemInfo.userId, widget.itemInfo.fishPoolId,
widget.itemInfo.superFavorInfo.superFavored, widget.itemInfo.trackParams);
Figure 1–11

Original Source:

Follow me to keep abreast with the latest technology news, industry insights, and developer trends.