GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Dart
  • Docs
  • Overview
  • Blog
  • Community
  • Learn
  • Get Dart
  • search
  • DartAPI
  • DartPad
  • pub.dev
  • Language
  • Class modifiers reference
  • docsView source

This view

  • Original page
  • New address

GeezerVison is showing dart.dev — Class modifiers reference

vertical_align_top Class modifiers reference

Dart 3.14 brings your workflow full circle with automated SDK migrations (dart migrate), a re-engineered DartPad, and faster WebAssembly. Learn more

This page contains reference information for class modifiers.

Valid combinations

#

The valid combinations of class modifiers and their resulting capabilities are:

Declaration Construct? Extend? Implement? Mix in? Exhaustive?
class Yes Yes Yes No No
base class Yes Yes No No No
interface class Yes No Yes No No
final class Yes No No No No
sealed class No No No No Yes
abstract class No Yes Yes No No
abstract base class No Yes No No No
abstract interface class No No Yes No No
abstract final classNoNoNoNoNo
mixin class Yes Yes Yes Yes No
base mixin class Yes Yes No Yes No
abstract mixin class No Yes Yes Yes No
abstract base mixin class No Yes No Yes No
mixin No No Yes Yes No
base mixin No No No Yes No

Invalid combinations

#

Certain combinations of modifiers aren't allowed:

CombinationReasoning
base, interface, and final All control the same two capabilities ( extend and implement ), so are mutually exclusive.
sealed and abstract Neither can be constructed, so are redundant together.
sealed with base, interface, or final sealed types already cannot be mixed in, extended or implemented from another library, so are redundant to combine with the listed modifiers.
mixin and abstract Neither can be constructed, so are redundant together.
mixin and interface, final, or sealed A mixin or mixin class declaration is intended to be mixed in, which the listed modifiers prevent.
enum and any modifiers enum declarations can't be extended, implemented, mixed in, and can always be instantiated, so no modifiers apply to enum declarations.
extension type and any modifiers extension type declarations can't be extended or mixed in, and can only be implemented by other extension type declarations.
Was this page's content helpful?

Unless stated otherwise, the documentation on this site reflects Dart 3.14.0. Page last updated on 2025-05-05. View source or report an issue.

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.