woo 1.0.0
woo: ^1.0.0 copied to clipboard
The Woo package. Most favorite of all time!
Woo #
The most beautiful way to greet the world. A tiny Dart package that models a friendly being named Woo — an eternal angel and a good dev — with a simple, fun API.
Installation #
Add the package to your project:
dart pub add woo
Import it where you need it:
import 'package:woo/woo.dart';
Quick start #
import 'package:woo/woo.dart';
void main() {
final woo = Woo.birth(name: 'Woo', age: 100);
// Capabilities
print(woo.isAngel); // true
print(woo.hasWings); // true
print(woo.isGoodDev); // true
// Polite greetings
woo.sayHello(); // Hello, my name is Woo and I am 100 years old.
woo.sayGoodbye(); // Goodbye, my name was Woo and I was 100 years old.
}
API overview #
-
Human: Base contract with identity and greeting.name: Stringage: intsayHello()
-
Angel: Capability contract for angelic beings.isAngel: boolhasWings: bool
-
Dev: A concreteHumanwith developer traits.- Default:
isGoodDevisfalse,sayHello()prints a dev greeting - Can be used as an interface for “dev-like” capabilities
- Default:
-
Woo: A concreteHumanthat implementsAngelandDev.- Constructors:
Woo(...),Woo.birth({required name, required age}) - Properties:
isAngel == true,hasWings == true,isGoodDev == true - Methods:
sayHello(),sayGoodbye()
- Constructors:
Additional examples #
Create a regular Dev:
final dev = Dev(name: 'Alex', age: 27);
dev.sayHello(); // Hello, I am a dev!
print(dev.isGoodDev); // false (by default)
Use Woo directly:
const woo = Woo(name: 'Woo', age: 100);
woo.sayHello();
Development #
- Example entry point:
example/woo_example.dart - Run static analysis:
dart analyze
- Run tests:
dart test
License #
MIT. See LICENSE if present in the repository, or the repository page at https://github.com/Vonarian/woo.