flutter/examples/platform_view
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
assets Add example showing full-screen iOS/Android view from Flutter (#10386) 2017-05-30 13:28:30 +02:00
ios Migrate Xcode projects last version checks to Xcode 15.1 (#140256) 2024-01-03 23:05:46 +00:00
lib Implement switch expressions in examples/ and animation/ (#139882) 2023-12-11 22:56:04 +00:00
linux Add Linux implementation of the platform view example (#123731) 2023-07-11 15:45:46 +12:00
macos Migrate Xcode projects last version checks to Xcode 15.1 (#140256) 2024-01-03 23:05:46 +00:00
windows [Windows] Fix signed/unsigned int comparison (#142341) 2024-02-07 00:09:57 +00:00
pubspec.yaml Move package:web dependency to dev dependency (#139696) 2023-12-15 08:53:27 -08:00
README.md ✒ Spell Check All .md Files Related to Flutter 💙 (#61564) 2020-07-22 18:23:47 -07:00

Example of switching between full-screen Flutter and Platform View

This project demonstrates how to bring up a full-screen iOS/Android view from a full-screen Flutter view along with passing data back and forth between the two.

On iOS, we use a CocoaPods dependency to add a Material Design button, and so pod install needs to be invoked in the ios/ folder before flutter run:

pushd ios/ ; pod install ; popd
flutter run