Schema constructor

const Schema({
  1. Key? key,
  2. SchemaConfiguration config = const SchemaConfiguration(),
  3. required List<Block<Object>> blocks,
  4. BlockLayoutCallback? onBlocksLayout,
  5. GridCallback? onGridUpdate,
  6. BlockAreaVoidCallback? onBlockAreaTap,
})

Creates a Schema.

  • config: Configuration for the schema. Defaults to SchemaConfiguration.
  • blocks: The list of blocks to display in the schema.
  • onBlocksLayout: Callback for when the blocks are laid out.
  • onGridUpdate: Callback for when the grid is updated.
  • onBlockAreaTap: Callback for when a block is tapped. This callback returns the BlockArea that was tapped and the global position of the tap.

Implementation

const Schema({
  super.key,
  this.config = const SchemaConfiguration(),
  required this.blocks,
  this.onBlocksLayout,
  this.onGridUpdate,
  this.onBlockAreaTap,
});