arch_foundations 0.3.1

arch_foundations #

Flutter architecture foundations I use in my apps. Work in progress.


  • Added isSuccess to Resource.


  • Changed stack trace type to StackTrace in ErrorBundle.


  • Replaced message with error in Resource. It's now an ErrorBundle type which also includes exception and stack trace information.


  • Renamed ApiResponse.withException to withError and changed param type to Object from Exception


  • Made ApiResponse independent of response types


  • Some patching


  • Real initial release


  • Initial release


void main() {
  // TODO

Use this package as a library

1. Depend on it

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

  arch_foundations: ^0.3.1

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:arch_foundations/error_bundle.dart';
import 'package:arch_foundations/api_response.dart';
import 'package:arch_foundations/arch/bloc.dart';
import 'package:arch_foundations/arch/bloc_provider.dart';
import 'package:arch_foundations/arch/bloc_user_state.dart';
import 'package:arch_foundations/arch/dependant_stream.dart';
import 'package:arch_foundations/arch/network_bound_resource.dart';
import 'package:arch_foundations/arch/network_bound_resource_client.dart';
import 'package:arch_foundations/mixin/snackbarer.dart';
import 'package:arch_foundations/mixin/snackbarer_mixin.dart';
import 'package:arch_foundations/resource.dart';
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]
Learn more about scoring.

We analyzed this package on Feb 21, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health suggestions

Fix lib/arch/bloc_provider.dart. (-0.50 points)

Analysis of lib/arch/bloc_provider.dart reported 1 hint:

line 19 col 37: 'ancestorWidgetOfExactType' is deprecated and shouldn't be used. Use findAncestorWidgetOfExactType instead. This feature was deprecated after v1.12.1..

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (rxdart).


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
bloc_event_gen ^0.1.3 0.1.3
flutter 0.0.0
http ^0.12.0 0.12.0+4
rxdart ^0.22.0 0.22.6 0.23.1
Transitive dependencies
async 2.4.0
charcode 1.1.3
collection 1.14.11 1.14.12
http_parser 3.1.3
meta 1.1.8
path 1.6.4
pedantic 1.9.0
sky_engine 0.0.99
source_span 1.6.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
bloc_event_generator ^0.1.3
mockito ^4.1.0
test any