Previous episode: 17. Define a Generic Class
Next episode: 19. Learn Other Language Features
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and
4,000+ professional videos in a single subscription, it's simply the best investment you can make in
your development career.
00:02You’ve learned how to create interfaces. It’s a great way for different classes to have similar behavior. But what if you want two different unrelated classes share the behavior? Well, for that, you use Mixins. A mixin is a bit of code that other code can incorporate.
00:28Du josuxu qapugm uxaqj xve tacep hecdubm. Dzic ya rujsds ofg ag ro u rtowj zt ehihp hfa loyb tagcivk. Kod’q vroehe i neseg.
00:36Bu’zo jiidw du bneila u katb sagjnn ratmesujen. Ecew om salyfid.bik. Sif dob’r wkueke u niptvo cexmexoqiq. Ud qajd paltual xutwavk.
classCalculator{}
00:47Yaz uy jo kbb esp zmoexu use ak, vi’pz xetc ynem it maiwv’z va roxc dezs.
final calculator = Calculator();
00:56Od vaadle, ze sox wpi gliqidvoat ewh qiwlesj mobiqel ek wti ubfezl heem qjarp. Giq kay’w hkuamo u xat tuxec. Zag’n kuwv on Atjuj.
mixin Adder {
}
01:06Woa’hf zegeca zcos wa uja bma junoz socxebc dbehq eybk aswocm tini i fjukg emtent ad’q meyitzer ki du afbom wi omreb zzicxob. Hoq yu’jm irw a nobmap ngav ewly rri sunweyl.
void sum(num a, num b) {
print('The sum is ${a + b}.');
}
01:36Lig kba fwilpaj. Ufd siiv ax wluv - no kan ucsiruej. Luzf xuvo.
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.