INNER CODE UNIT · Dart

DashbookContext

bluefireteam/dashbook · lib/src/story.dart:137

class DashbookContext {
  final Map<String, Property<Object?>> properties = {};
  final Map<String, void Function(BuildContext)> actions = {};

  void action(String name, void Function(BuildContext) callback) {
    actions[name] = callback;
  }

  /// Function to add a property to properties panel.
  ///
  /// To add a property could extend [Property] or create a property with an
  /// anonymous property widget builder with [Property.withBuilder]
  T addProperty<T>(Property<T> property) {
    return properties.putIfAbsent(property.name, () => property).getValue()
        as T;
  }

  String textProperty(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…