Victor Sanni 303cbb7cde
Improve CupertinoCheckbox fidelity (#151441)
**NOTE: Previous [PR](https://github.com/flutter/flutter/pull/148804)
was closed because of a bad merge leading to pollution with unrelated
commits.**

This PR improves on the look and feel of `CupertinoCheckbox` to more
closely match native iOS/macOS checkboxes.

Adds the following updates from a native macOS checkbox:
* Fill color of an unchecked checkbox is a linear gradient that goes
from darker at the top to lighter at the bottom in dark mode
* Size of box reduced from 18.0 to 14.0
* Stroke width of check reduced from 2.5 to 2.0
* Border color changed from solid black to gray black in light mode and
a transparent gray in dark mode
* In light mode, checkbox darkens when pressed
* In dark mode, checkbox lightens when pressed
* Default blue color of a checked checkbox is darker in dark mode

### Light Mode

| Native macOS | Flutter Before | Flutter After |
| ----------- | ----------- | ----------- |
| <img width="63" alt="native checkbox"
src="https://github.com/flutter/flutter/assets/77553258/d57d4c78-2e67-49fb-9491-a5acee3782a7">
| <img width="66" alt="Screenshot 2024-06-27 at 10 23 18 AM"
src="https://github.com/flutter/flutter/assets/77553258/31c913ff-d36f-4eb5-b737-3a9117bd7eff">
| <img width="66" alt="Screenshot 2024-06-27 at 10 39 22 AM"
src="https://github.com/flutter/flutter/assets/77553258/ace8ef29-efae-4049-8f78-13fd39851947">
|

### Dark Mode - Checked

| Native macOS | Flutter Before | Flutter After |
| ----------- | ----------- | ----------- |
| <img width="22" alt="native light"
src="https://github.com/user-attachments/assets/fc52d5e1-7ab0-4a5d-b0fa-5b5bee3ed39d">
| <img width="22" alt="flutter before light"
src="https://github.com/user-attachments/assets/16e033a1-d2dd-4fb2-a5a5-f730c5f7cdc7">
| <img width="22" alt="flutter after light"
src="https://github.com/user-attachments/assets/8c0cff99-930e-4f5e-8540-e64294c1b4fa">
|

### Dark Mode - Unchecked
| Native macOS | Flutter Before | Flutter After |
| ----------- | ----------- | ----------- |
| <img width="22" alt="native dark mode"
src="https://github.com/user-attachments/assets/333280a0-85db-4464-9663-03ef7eafc270">
| <img width="22" alt="flutter before dark mode"
src="https://github.com/user-attachments/assets/a46e01ec-0d0b-4bb7-8d08-4b2723424a12">
| <img width="22" alt="flutter dark mode"
src="https://github.com/user-attachments/assets/a70ae4ad-f1ad-4441-a416-350cbdc32679">
|

### Light Mode - Disabled

| Native macOS | Flutter Before | Flutter After |
| --- | --- | --- |
| <img width="121" alt="native disabled checkbox"
src="https://github.com/user-attachments/assets/ed050d14-efec-49dd-82b6-1e7ed7fa99f9">
| <img width="136" alt="flutter b4 disabled checkbox"
src="https://github.com/user-attachments/assets/564918cf-f936-448d-b975-7bf9248bbf35">
| <img width="156" alt="flutter disabled checkbox"
src="https://github.com/user-attachments/assets/82f672a7-12e8-469c-99af-9f94c959df8f">
|

### Dark Mode - Disabled

| Native macOS | Flutter Before | Flutter After |
| --- | --- | --- |
| <img width="110" alt="disabled dark checkbox native"
src="https://github.com/user-attachments/assets/02a43b3f-5619-4b05-9066-2fd43a58c956">
| <img width="136" alt="disabled dark checkbox flutter b4"
src="https://github.com/user-attachments/assets/3a3db322-2002-4808-adc0-b10a7ab42381">
| <img width="140" alt="disabled dark checkbox flutter"
src="https://github.com/user-attachments/assets/cb91955a-8302-4dc7-8050-221fa2a7045f">

Fixes #148719.

Related PR exploring these changes: #147892

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes

---------

Co-authored-by: Kate Lovett <katelovett@google.com>
2024-07-31 14:43:20 -07:00
2024-06-17 17:26:08 +00:00

Flutter

Flutter CI Status Discord badge Twitter handle codecov CII Best Practices OpenSSF Scorecard SLSA 1

Flutter is Google's SDK for crafting beautiful, fast user experiences for mobile, web, and desktop from a single codebase. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.

Documentation

For announcements about new releases, follow the flutter-announce@googlegroups.com mailing list. Our documentation also tracks breaking changes across releases.

Terms of service

The Flutter tool may occasionally download resources from Google servers. By downloading or using the Flutter SDK, you agree to the Google Terms of Service: https://policies.google.com/terms

For example, when installed from GitHub (as opposed to from a prepackaged archive), the Flutter tool will download the Dart SDK from Google servers immediately when first run, as it is used to execute the flutter tool itself. This will also occur when Flutter is upgraded (e.g. by running the flutter upgrade command).

About Flutter

We think Flutter will help you create beautiful, fast apps, with a productive, extensible and open development model, whether you're targeting iOS or Android, web, Windows, macOS, Linux or embedding it as the UI toolkit for a platform of your choice.

Beautiful user experiences

We want to enable designers to deliver their full creative vision without being forced to water it down due to limitations of the underlying framework. Flutter's layered architecture gives you control over every pixel on the screen and its powerful compositing capabilities let you overlay and animate graphics, video, text, and controls without limitation. Flutter includes a full set of widgets that deliver pixel-perfect experiences whether you're building for iOS (Cupertino) or other platforms (Material), along with support for customizing or creating entirely new visual components.

Reflectly hero image

Fast results

Flutter is fast. It's powered by hardware-accelerated 2D graphics libraries like Skia (that underpins Chrome and Android) and Impeller. We architected Flutter to support glitch-free, jank-free graphics at the native speed of your device.

Flutter code is powered by the world-class Dart platform, which enables compilation to 32-bit and 64-bit ARM machine code for iOS and Android, JavaScript and WebAssembly for the web, as well as Intel x64 and ARM for desktop devices.

Dart diagram

Productive development

Flutter offers stateful hot reload, allowing you to make changes to your code and see the results instantly without restarting your app or losing its state.

Hot reload animation

Extensible and open model

Flutter works with any development tool (or none at all), and also includes editor plug-ins for both Visual Studio Code and IntelliJ / Android Studio. Flutter provides tens of thousands of packages to speed your development, regardless of your target platform. And accessing other native code is easy, with support for both FFI (on Android, on iOS, on macOS, and on Windows) as well as platform-specific APIs.

Flutter is a fully open-source project, and we welcome contributions. Information on how to get started can be found in our contributor guide.

Description
A vendored version of the flutter engine for firka :3
Readme 323 MiB
Languages
Dart 75.4%
C++ 16.4%
Objective-C++ 2.7%
Java 2.7%
Objective-C 0.6%
Other 1.8%