Skip to content

Latest commit

 

History

History
32 lines (17 loc) · 968 Bytes

File metadata and controls

32 lines (17 loc) · 968 Bytes

Extension methods vs types (Dart 3.3)

Dart 3.3 introduces a new feature called Extension Types.

Extension types are quite similar to extension methods.

But the key difference is that extension types hide away the interface of the underlying type. 👇


Here's what the official docs say:

An extension type is a compile-time abstraction that "wraps" an existing type with a different, static-only interface.

This is particularly useful for interoperability with host platforms.

Read on to learn more:


Found this useful? Show some love and share the original tweet 🙏


Previous Next
Top tip for Flutter developers: write reusable widgets! How to bundle assets based on flavor