FlutterでWindowsアプリをビルドしてファイルサイズを調べた。

FlutterでWindowsアプリをビルドしてファイルサイズを調べた。

Flutterのプロジェクトを作成する。

> flutter create helloworld
Creating project helloworld...
Running "flutter pub get" in helloworld...                         14.8s
Wrote 127 files.

All done!
In order to run your application, type:

  $ cd helloworld
  $ flutter run

Your application code is in helloworld\lib\main.dart.

WindowsアプリをReleaseビルドする。

> cd .\helloworld\
> flutter build windows

 Building with sound null safety 

Building Windows application...

ファイルは以下の場所に作成された。

helloworld\build\windows\runner\Release

Releaseフォルダのサイズは「19.7 MB (20,720,429 バイト)」になった。

ファイルサイズの詳細を確認する。

> flutter build windows --analyze-size

 Building with sound null safety 

Building Windows application...

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Release                                                                  20 MB
  Release/
    data/
      app.so (Dart AOT)                                                     3 MB
      Dart AOT symbols accounted decompressed size                          3 MB
        package:flutter                                                     2 MB
        dart:core                                                         270 KB
        dart:typed_data                                                   199 KB
        dart:ui                                                           179 KB
        dart:collection                                                   106 KB
        dart:async                                                         67 KB
        dart:convert                                                       49 KB
        dart:io                                                            42 KB
        package:vector_math/
          vector_math_64.dart                                              26 KB
        dart:isolate                                                       25 KB
        dart:ffi                                                           14 KB
        dart:developer                                                      9 KB
        package:helloworld/
          main.dart                                                         2 KB
        dart:vmservice_io                                                  960 B
        package:collection/
          src/
            priority_queue.dart                                            911 B
        dart:mirrors                                                       628 B
        dart:math                                                          342 B
        dart:nativewrappers                                                277 B
        Never                                                               59 B
        void/
          <optimized out>                                                   41 B
      flutter_assets                                                        2 MB
      icudtl.dat                                                          796 KB
    flutter_windows.dll                                                    14 MB
    helloworld.exe                                                         74 KB

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください