Extension Types

Wrapped at compile time with zero additional runtime objects (zero-cost abstraction); used to assign a new set of static interfaces to existing types and restrict accessible methods. Difference from regular …

Metode ekstensi (Extension methods)

Metode ekstensi memungkinkan Anda menambahkan fungsi baru ke tipe yang sudah ada dan tipe dari pustaka pihak ketiga tanpa mengubah kode sumber kelas asli. Pelengkapan otomatis IDE akan menampilkan metode …

Методы расширения (Extension methods)

Методы расширения позволяют добавлять новую функциональность к существующим типам и типам сторонних библиотек, не изменяя исходный код исходного класса. Автодополнение IDE показывает методы расширения вместе с собственными методами типа. Вы …

Extension methods

Extension methods let you add new functionality to existing types and third-party library types without modifying the source code of the original class. Your IDE’s autocompletion will list extension methods …

Dot shorthands (singkatan titik)

Sintaks singkat titik .foo dapat menghilangkan nama tipe. Selama kompiler bisa menyimpulkan tipe target dari konteks, kamu dapat menulis kode Dart yang lebih ringkas. Saat mengakses nilai enum, anggota statis, …

Dot shorthands (сокращения с точкой)

Сокращенная синтаксическая конструкция с точкой .foo позволяет опускать имя типа. Если компилятор может определить целевой тип по контексту, вы сможете писать более лаконичный код Dart. При обращении к значениям перечислений, …

Dot shorthands

The .foo dot shorthand syntax lets you omit the type name. As long as the compiler can infer the target type from context, you can write cleaner Dart code. When …

Enum

Tipe enum adalah jenis kelas khusus yang digunakan untuk merepresentasikan kumpulan nilai konstan dengan jumlah tetap. Semua enum akan mewarisi kelas Enum secara otomatis. Selain itu, enum termasuk tipe sealed: …

Перечисления

Тип перечисления — это особый класс, предназначенный для представления фиксированного набора константных значений. Все перечисления автоматически наследуют класс Enum. При этом перечисления относятся к запечатанным типам (sealed): их нельзя наследовать, …

Enums

An enumeration type is a special class used to represent a fixed set of constant values. All enums automatically inherit the Enum class. Enums are sealed types: they cannot be …