
DART Cookbook
By :

The Dart mirror-based reflection API (contained in the dart:mirrors
library) provides a powerful set of tools to reflect on code. This means that it is possible to introspect the complete structure of a program and discover all the properties of all the objects. In this way, methods can be invoked reflectively. It will even become possible to dynamically evaluate code that was not yet specified literally in the source code. An example of this would be calling a method whose name was provided as an argument because it is looked up in the database table.
The part of your code that uses reflection should have the following import code:
import 'dart:mirrors';
To perform reflection we perform the following actions:
In the reflection
project, we use a class Embrace
to reflect upon:
void main() { var embr = new Embrace(5); print(embr); // Embraceometer reads 5 embr.strength += 5; print(embr.toJson()); // {strength: 10} var embr2 = new...
Change the font size
Change margin width
Change background colour