cage 1.0.0

  • Readme
  • Changelog
  • Installing
  • 61

Put your flutter in a cage

Cage ยท GitHub license Build Status codecov

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

Overview #

cage consists of three fundamental foundations:

  • Modules
  • Services
  • Widgets

Modules #

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.

Looking for examples?

Services #

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.

Looking for examples?

Widgets #

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.

Looking for examples?

Don't quite like what you see? #

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.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

[1.0.0] - 2019-07-07

First production release of Cage.

Added #

  • Module system for creating application modules
  • Dependency injection for managing dependencies to be used by widgets and other framework structures
  • Widget-system to use a MVP-pattern for a better separation of concern
  • State management system for strict data flow and testability
  • Flutter runtime for running your Cage application with flutter
  • Flutter test runtime for accessing your Cage structures, such as widgets or services in unit tests

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  cage: ^1.0.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:cage/cage.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
25
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
92
Overall:
Weighted score of the above. [more]
61
Learn more about scoring.

We analyzed this package on Oct 22, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance suggestions

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 main.dart, example.dart, and cage.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.0 <3.0.0
flutter 0.0.0
logging ^0.11.3+2 0.11.3+2
meta ^1.1.6 1.1.7
Transitive dependencies
collection 1.14.11 1.14.12
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test