flutter/examples
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
..
api [Windows] Fix signed/unsigned int comparison (#142341) 2024-02-07 00:09:57 +00:00
flutter_view [Windows] Fix signed/unsigned int comparison (#142341) 2024-02-07 00:09:57 +00:00
hello_world [Windows] Fix signed/unsigned int comparison (#142341) 2024-02-07 00:09:57 +00:00
image_list Reverts "Update gradle lockfiles template" (#142889) 2024-02-04 14:28:18 +00:00
layers [Windows] Fix signed/unsigned int comparison (#142341) 2024-02-07 00:09:57 +00:00
platform_channel [Windows] Fix signed/unsigned int comparison (#142341) 2024-02-07 00:09:57 +00:00
platform_channel_swift Unpin test (#141427) 2024-02-01 18:53:23 +00:00
platform_view [Windows] Fix signed/unsigned int comparison (#142341) 2024-02-07 00:09:57 +00:00
splash Unpin test (#141427) 2024-02-01 18:53:23 +00:00
texture Unpin test (#141427) 2024-02-01 18:53:23 +00:00
.clang-format Implement Linux part of examples (#108068) 2022-12-08 08:44:11 +13:00
flutter_gallery.readme Move flutter_gallery to the testing folder (#52532) 2020-03-16 10:31:42 +01:00
README.md Fix typo in README.md (#126053) 2023-05-04 14:58:17 +02:00

Flutter Examples

This directory contains several examples of using Flutter. To run an example, use flutter run inside that example's directory. See the getting started guide to install the flutter tool.

For additional samples, see the flutter/samples repo.

Available examples include:

Notes

Note on Gradle wrapper files in .gitignore:

Gradle wrapper files should normally be checked into source control. The example projects don't do that to avoid having several copies of the wrapper binary in the Flutter repo. Instead, the Gradle wrapper is injected by Flutter tooling, and the wrapper files are .gitignore'd to avoid making the Flutter repository dirty as a side effect of running the examples.