build method
Builds the modifier widget tree for the given content item.
This method is called by the content system to apply the modifier to the content item's widget tree.
Implementation
@override
Widget build(BuildContext context, Widget child, ContentItem content) {
final theme = Theme.of(context);
return Stack(
children: [
child,
Positioned(
top: 2,
right: 2,
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 2),
color: theme.colorScheme.inverseSurface.withValues(alpha: 0.5),
child: Text(
content.schemaType,
style: TextStyle(
color: theme.colorScheme.onInverseSurface,
fontSize: 9,
),
),
),
),
],
);
}