Zam Core Library

Core library for all the packages built by zamstation.

Version Build Style Stars CodeFactor License

What's inside the package

Check out all the components in detail here

How to use

ParameterizedBuilder

final ParameterizedBuilder<Type, Car> carBuilder;
// ...
final car = carBuilder(HondaCivic);

ParameterizedCallback

final ParameterizedCallback<double, int> roundOffStrategy;
// ...
final price = roundOffStrategy(8.458);

NamedException

Wrapper around the built-in Exception class.

Provides more classified details of the exception like severity and solution.

Construct it with a simple problem statement.

final exception = NamedException('Provided value is -26 which is negative.');

or build it with more details.

final exception = NamedException(
  'Provided value is -26 which is negative.'
  solution: 'Please provide a positive value.'
  severity: ExceptionSeverity.critical,
);

Cloneable

class Triangle implements Cloneable<Triangle> {
  final double base;
  final double height;

  const Triangle(this.base, this.height);

  @override
  Triangle clone() {
    return Triangle(this.base, this.height);
  }
}

Contributors

Libraries

meta
zam_core