Put your flutter in a cage
Cage is an opinionated framework for developing Flutter applications. Cage aims to provide structure and guidance in a new world of cross platform mobile app development.
Cage builds onto the concepts of dependency-injection (DI), model-view-presenter (MVP) and flux-style pattern for interactions.
The command line interface (CLI) is hosted in this repository
cage consists of three fundamental foundations:
A module represents a modular package to be used upon other modules or bootstrapping the application. A module declares services and widgets. Modules can import other modules, so that module parts can be reused and shared.
A service can be any object you like. A service can be a number, a string or a complex class instance. Services can be provided to the complete application or be isolated in your current module.
Since Flutter is build on widgets, cage of course cannot avoid widgets. Cage wraps cages and provides separation of concern for widgets. While Flutter does not give any rules for structuring your widgets, Cage has an opinion for you. Business logic and view logic are separated, your models shall exist separately.
Flutter currently does not provide any access to metadata. Thus fancy metadata/annotations used by libraries like angular currently do not work out of the box. For further development build_tools will be evaluated and may can be used productive someday. This will hopefully decrease the usage of currently needed boiletplate code.
All notable changes to this project will be documented in this file.
First production release of Cage.
Add this to your package's pubspec.yaml file:
dependencies: cage: ^1.0.0
You can install packages from the command line:
$ flutter pub get
Alternatively, your editor might support
flutter pub get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Aug 16, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
Support latest dependencies. (-10 points)
The version constraint in
pubspec.yaml does not support the latest published versions for 1 dependency (
The package description is too short. (-8 points)
Add more detail to the
description field of
pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.
Maintain an example.
None of the files in the package's
example/ directory matches known example patterns.
Common filename patterns include
cage.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.