express_app 0.0.3-b

Express App #

A plugin for Flutter to better separate the app into Routers, Controller, Models, and Views easily.

Status #

Please note version's number. This is still a beta, and only published to get feedback to include suggestions while working on it.

Examples #

void main() {
  runApp(
    Express(
      router: ExpressRouter(
        routes: {
          '/': ExpressRoute(
            build: (BuildContext context) => FirstPage(),
            actions: {
              'next': '/secondPage',
            },
          ),
          '/secondPage': ExpressRoute(
            build: (BuildContext context) => SecondPage(),
            actions: {
              'back': '/',
            }
          )
        },
      ),
      app: MaterialApp(
        home: FirstPage(),
      ),
    ).render()
  );
}

For more examples, especially for using ExpressHome, please refer to their folder.

TODO #

-[x] Find a way for the StatefulWidget to work

-[ ] Work on passing data

-[x] Modify the flow to call the router instead of simply calling the navigator.

-[x] Link pages using actions or events to allow a whole graph of connections easily.

-[ ] Use models

For more, pelase visit our bugs pages on GitHub.

Use this package as a library

1. Depend on it

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


dependencies:
  express_app: ^0.0.3-b

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:express_app/express.dart';
import 'package:express_app/route.dart';
import 'package:express_app/router.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
20
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
65
Overall:
Weighted score of the above. [more]
53
Learn more about scoring.

We analyzed this package on Oct 11, 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.

Health suggestions

Fix lib/router.dart. (-0.50 points)

Analysis of lib/router.dart reported 1 hint:

line 32 col 24: This function has a return type of 'Future

Format lib/express.dart.

Run flutter format to format lib/express.dart.

Format lib/route.dart.

Run flutter format to format lib/route.dart.

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Package is pre-release. (-5 points)

Pre-release versions should be used with caution; their API can change in breaking ways.

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 express_app.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.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test