An open API service indexing awesome lists of open source software.

https://github.com/felipecastrosales/flutter_composition

🧪 POC creating class and subclasses with Flutter & Dart
https://github.com/felipecastrosales/flutter_composition

app composition counter dart flutter flutter-apps flutter-demo flutter-examples flutter-poc inheritance-examples inherited medium poc stackoverflow

Last synced: 7 months ago
JSON representation

🧪 POC creating class and subclasses with Flutter & Dart

Awesome Lists containing this project

README

          

# Composition with Flutter

In Flutter, **Composition** is preferred over **Inheritence**.

Researching how to flow classes and subclasses with Flutter, I found some interesting content and decided to test some flows in practice.

See come cool links below:

* [Subclass a class that extends StatelessWidget or StatefulWidget class](https://stackoverflow.com/questions/51476234/subclass-a-class-that-extends-statelesswidget-or-statefulwidget-class)
* [I decided to test this approach, as it was a little more off the curve](https://stackoverflow.com/a/62856604/13096514).
* But there are other interesting strategies that I haven't tried. Such as:
* [Creating a Base Screen in Flutter using an abstract class and mixin](https://pbhoomi190.medium.com/creating-a-base-screen-in-flutter-using-an-abstract-class-and-mixin-3c0001b74c8c).
* [Flutter mixin with abstract class](https://stackoverflow.com/questions/59316554/flutter-mixin-with-abstract-class).