Did you know?
If you try to access a web-specific API on native platforms, your app will crash. 💥
To prevent this, hide your API behind an "umbrella" file using conditional imports. ✅
Here's an example showing how to check if the app is using the CanvasKit renderer. 👇
Previous | Next |
---|---|
Use defaultTargetPlatform and kIsWeb | Find Unused Dart Files (VSCode Extension) |