build_info_windows 1.0.2 copy "build_info_windows: ^1.0.2" to clipboard
build_info_windows: ^1.0.2 copied to clipboard

PlatformWindows

Windows implementation of Flutter plugin that retrieves build date and time and installation date and time.

build_info_windows #

The Linux implementation of build_info.

Usage #

This package is endorsed, which means you can simply use build_info normally. This package will be automatically included in your app when you do, so you do not need to add it to your pubspec.yaml.

However, if you import this package to use any of its APIs directly, you should add it to your pubspec.yaml as usual.

About implementation of Windows version #

The Windows version of build_info works as follows.

  1. Call the BuildInfo.fromPlatform method from Flutter.
  2. Get the IMAGE_NT_HEADERS64 structure and use the TimeDateStamp value of the IMAGE_FILE_HEADER structure as the build date and time.
  3. The earlier date and time of the creation date and time of the executable file or the creation date and time of the directory where the executable file exists is used as the installation date and time.

If each date and time cannot be obtained, it will be null.

TimeDateStamp of the IMAGE_FILE_HEADER structure used for build date and time is of DWORD type, so it will overflow after 2106/02/07 06:28:15 UTC, so if a timestamp before 2024/01/01 00:00:00 UTC is received, 0x100000000 will be added.(Date format yyyy/mm/dd)

int64_t _tmp = inh.FileHeader.TimeDateStamp;
if (_tmp < 1704067200/* 2024-01-01 00:00:00 UTC */) {
    _tmp += 0x100000000;
}
0
likes
140
pub points
5%
popularity

Publisher

verified publishercraftsoft.dev

Windows implementation of Flutter plugin that retrieves build date and time and installation date and time.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

build_info_platform_interface, flutter

More

Packages that depend on build_info_windows