mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
We use and recommend type safe enums. But when it comes to masks of those enums (`TextureUsageMask`, `ColorWriteMask`, etc.), these are all untyped and you can create one either from a scalar of the enums underlying type, or using ugly and error prone static casts. At the callee, there is no type checking and another error prone static cast. This patch adds a type-safe mask type. This should allow for the migration of something like: ```c++ using TextureUsageMask = uint64_t; ``` with ```c++ using TextureUsageMask = Mask<TextureUsage>; ``` Subsequently, all static casts can be removed with full type checking throughout. This doesn't migrate existing uses yet. That will come in a separate patch.
Description
Flutter makes it easy and fast to build beautiful apps for mobile and beyond
androidapp-frameworkcross-platformdartdart-platformdesktopflutterflutter-packagefuchsiaioslinux-desktopmacosmaterial-designmobilemobile-developmentskiawebweb-frameworkwindows
2.5 GiB
Languages
Dart
75%
C++
16.5%
Objective-C++
2.9%
Java
2.8%
Objective-C
0.7%
Other
1.9%