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
- Host: GitHub
- URL: https://github.com/felipecastrosales/flutter_composition
- Owner: felipecastrosales
- Created: 2022-12-01T23:45:40.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-04T13:43:20.000Z (almost 3 years ago)
- Last Synced: 2025-01-23T19:38:33.650Z (9 months ago)
- Topics: app, composition, counter, dart, flutter, flutter-apps, flutter-demo, flutter-examples, flutter-poc, inheritance-examples, inherited, medium, poc, stackoverflow
- Language: C++
- Homepage:
- Size: 285 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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).