ArcaneInlineCode#
An inline code component for displaying code snippets within text content.
Basic Usage#
ArcaneInlineCode(code: 'npm install')
Properties#
| Property | Type | Default | Description |
|---|---|---|---|
code | String | required | Code text |
styles |
ArcaneStyleData? |
null |
Custom styling |
Examples#
In Paragraph#
ArcaneParagraph(
children: [
ArcaneText('Use the '),
ArcaneInlineCode(code: 'ArcaneButton'),
ArcaneText(' component for clickable actions.'),
],
)
Variable Names#
ArcaneDiv(
children: [
ArcaneText('Set '),
ArcaneInlineCode(code: 'isDarkMode'),
ArcaneText(' to '),
ArcaneInlineCode(code: 'true'),
ArcaneText(' to enable dark theme.'),
],
)
Command Reference#
ArcaneDiv(
children: [
ArcaneText('Run '),
ArcaneInlineCode(code: 'dart pub get'),
ArcaneText(' to install dependencies.'),
],
)
Function Names#
ArcaneDiv(
children: [
ArcaneText('Call '),
ArcaneInlineCode(code: 'setState()'),
ArcaneText(' to trigger a rebuild.'),
],
)
File Paths#
ArcaneDiv(
children: [
ArcaneText('Edit the '),
ArcaneInlineCode(code: 'lib/main.dart'),
ArcaneText(' file to change the entry point.'),
],
)
Property List#
ArcaneColumn(
gap: Gap.sm,
children: [
ArcaneRow(
gap: Gap.sm,
children: [
ArcaneInlineCode(code: 'label'),
ArcaneText('- The button text'),
],
),
ArcaneRow(
gap: Gap.sm,
children: [
ArcaneInlineCode(code: 'onPressed'),
ArcaneText('- Callback when clicked'),
],
),
ArcaneRow(
gap: Gap.sm,
children: [
ArcaneInlineCode(code: 'isDisabled'),
ArcaneText('- Disable the button'),
],
),
],
)
Keyboard Shortcuts#
ArcaneDiv(
children: [
ArcaneText('Press '),
ArcaneInlineCode(code: 'Ctrl+S'),
ArcaneText(' to save, or '),
ArcaneInlineCode(code: 'Ctrl+Shift+S'),
ArcaneText(' to save as.'),
],
)
Type Annotations#
ArcaneDiv(
children: [
ArcaneText('The '),
ArcaneInlineCode(code: 'value'),
ArcaneText(' property accepts '),
ArcaneInlineCode(code: 'String?'),
ArcaneText(' (nullable string).'),
],
)
Error Messages#
ArcaneDiv(
styles: const ArcaneStyleData(
padding: PaddingPreset.md,
background: Background.destructive,
borderRadius: Radius.md,
),
children: [
ArcaneText('Error: '),
ArcaneInlineCode(code: 'undefined is not a function'),
],
)
Documentation Note#
ArcaneBox(
background: Background.info,
children: [
ArcaneRow(
gap: Gap.sm,
crossAxisAlignment: AlignItems.start,
children: [
span([text('💡')]),
ArcaneDiv(
children: [
ArcaneText('Tip: Use '),
ArcaneInlineCode(code: 'const'),
ArcaneText(' with '),
ArcaneInlineCode(code: 'ArcaneStyleData'),
ArcaneText(' for better performance.'),
],
),
],
),
],
)
Related Components#
- ArcaneCodeSnippet - Block code with highlighting
- ArcanePre - Preformatted text
- ArcaneSpan - Inline text spans