yao_core 0.0.2+26 copy "yao_core: ^0.0.2+26" to clipboard
yao_core: ^0.0.2+26 copied to clipboard

a MVCS (Model-View-Controller-Service) core package used by yao framework.

Yao Core #

MVCS (Model-View-Controller-Service) core package used by yao framework yao.

this package using:

  1. Get as an dependency injection
  2. Express syntax

Note #

Still in development. Not stable yet.

Usage #

Initialize #

import 'package:yao_core/yao_core.dart';

final app = Yao();

Route - View - Controller #

app.get("/", (req, res) {
    res.render(HomepageView(), c: HomeController());
});

Service #

//inject
app.inject(MyService());

//get back
final service = app.find<MyService>();

Event #

app.on(EitherType(YaoEvent.ready),()async{
    app.log('ready');
});

Run #

app.run()

Automated Test #

final app = Yao();
await app.runWithTester();

More details, checkout test\src

1
likes
100
pub points
0%
popularity

Publisher

verified publisheraikosia.com

a MVCS (Model-View-Controller-Service) core package used by yao framework.

Homepage

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, get

More

Packages that depend on yao_core