flutter/examples/hello_world
Chris Bracken 9f8fe3f04c
[Windows] Fix signed/unsigned int comparison (#142341)
Previously, we were comparing the signed int `target_length` (returned by WideCharToMultiByte) to a size_t string length, resulting in a signed/unsigned comparison warning as follows:

```
windows\runner\utils.cpp(54,43): warning C4018:  '>': signed/unsigned mismatch
```

WideCharToMultiByte returns:
* 0 on error
* the number of bytes written to the buffer pointed to by its fifth parameter, lpMultiByteStr, on success.

As a result it's safe to store the return value in an unsigned int, which eliminates the warning.

No changes to tests since this is dependent on end-user project settings/modifications and does not trigger a warning with default project settings.

Fixes: https://github.com/flutter/flutter/issues/134227
2024-02-07 00:09:57 +00:00
..
android Reverts "Update gradle lockfiles template" (#142889) 2024-02-04 14:28:18 +00:00
ios Migrate Xcode projects last version checks to Xcode 15.1 (#140256) 2024-01-03 23:05:46 +00:00
lib add missing trailing commas (#81406) 2021-04-28 22:54:49 +02:00
linux Deletes files that should be ignored (#127984) 2023-06-29 19:45:22 +00:00
macos Migrate Xcode projects last version checks to Xcode 15.1 (#140256) 2024-01-03 23:05:46 +00:00
test License update (#45373) 2019-11-27 15:04:02 -08:00
test_driver [web] - Clean up skipped tests (#124981) 2023-04-18 19:31:18 +00:00
web License update (#45373) 2019-11-27 15:04:02 -08:00
windows [Windows] Fix signed/unsigned int comparison (#142341) 2024-02-07 00:09:57 +00:00
pubspec.yaml Unpin test (#141427) 2024-02-01 18:53:23 +00:00
README.md Updated README.md file of the hello_world example (#64766) 2020-09-23 10:57:03 -07:00

To run the Hello World demo:

flutter run

To run the Hello World demo showing Arabic:

flutter run lib/arabic.dart