BiographyBlock class
A responsive biography and entity marker card for the Alter Design System.
Figma Specifications (Node 761:7097 - BiographyBlock):
- Variants:
type:Tall|Widedevice:Web(Desktop) |Mobile
- Left:
logoContainer:- Web: 84x84px, 24px border radius, 1px
#F3F4F6border (AlterSemanticTokens.stroke100),#FFFFFFfill. - Mobile: 48x48px, 12px border radius, 1px
#F3F4F6border (AlterSemanticTokens.stroke100),#FFFFFFfill.
- Web: 84x84px, 24px border radius, 1px
- Right / Body:
- Header Section:
- Title & Subtitle:
- Web: Title
Headings/h2(AlterTypography.h2Bold), SubtitleBody/body-lg(AlterTypography.bodyLg). - Mobile: Title
Headings/h4(AlterTypography.h4Bold), SubtitleBody/caption(AlterTypography.caption).
- Web: Title
- Badges:
- Reuses Badge with BadgeColor.slate (#F1F5F9 fill, #1D293D text).
- Layout:
Tall: Badges placed underneath title & subtitle with 8px vertical gap.Wide: Badges placed beside title & subtitle with 24px horizontal gap.
- Title & Subtitle:
- Bio / Description Section:
- Separated by 1px Divider (AlterSemanticTokens.stroke200).
- Web Description:
Body/body-lg(AlterTypography.bodyLg,#4A5565). - Mobile Description:
Body/body(AlterTypography.body,#4A5565).
- Header Section:
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- BiographyBlock
Constructors
-
BiographyBlock({Key? key, BiographyBlockType type = BiographyBlockType.tall, BiographyBlockDevice device = BiographyBlockDevice.auto, String title = 'Title', Widget? titleWidget, bool hasSubtitle = true, String subtitle = 'Subtitle', Widget? subtitleWidget, bool hasDescription = true, String description = 'Description', Widget? descriptionWidget, bool hasLogo = true, ImageProvider<
Object> ? logo, Widget? logoWidget, String? logoAssetPath, VoidCallback? onLogoTap, bool hasBadgeBar = true, bool hasBadgeOne = false, String badge1Label = 'Label', bool hasBadgeTwo = true, String badge2Label = 'Label', bool hasBadgeThree = true, String badge3Label = 'Label', List<Widget> ? badges}) -
Creates a BiographyBlock instance.
const
-
BiographyBlock.wide({Key? key, BiographyBlockDevice device = BiographyBlockDevice.auto, String title = 'Title', Widget? titleWidget, bool hasSubtitle = true, String subtitle = 'Subtitle', Widget? subtitleWidget, bool hasDescription = true, String description = 'Description', Widget? descriptionWidget, bool hasLogo = true, ImageProvider<
Object> ? logo, Widget? logoWidget, String? logoAssetPath, VoidCallback? onLogoTap, bool hasBadgeBar = true, bool hasBadgeOne = false, String badge1Label = 'Label', bool hasBadgeTwo = true, String badge2Label = 'Label', bool hasBadgeThree = true, String badge3Label = 'Label', List<Widget> ? badges}) -
Convenience constructor for a wide-layout BiographyBlock.
const
Properties
- badge1Label → String
-
Label string for badge 1.
final
- badge2Label → String
-
Label string for badge 2.
final
- badge3Label → String
-
Label string for badge 3.
final
-
badges
→ List<
Widget> ? -
Custom list of badge widgets (overrides default badges if provided).
final
- description → String
-
Bio / description body text.
final
- descriptionWidget → Widget?
-
Custom widget override for description.
final
- device → BiographyBlockDevice
-
Viewport mode (
autoresponsive,web, ormobile).final - hasBadgeBar → bool
-
Whether the badge bar is displayed.
final
- hasBadgeOne → bool
-
Whether badge 1 is displayed.
final
- hasBadgeThree → bool
-
Whether badge 3 is displayed.
final
- hasBadgeTwo → bool
-
Whether badge 2 is displayed.
final
- hasDescription → bool
-
Whether the bio / description section is displayed.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasLogo → bool
-
Whether the entity logo container is displayed.
final
- hasSubtitle → bool
-
Whether subtitle is displayed.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
logo
→ ImageProvider<
Object> ? -
Image provider for the entity logo.
final
- logoAssetPath → String?
-
Custom asset path for the logo (defaults to 'assets/alter_logo.png').
final
- logoWidget → Widget?
-
Custom widget override for the logo.
final
- onLogoTap → VoidCallback?
-
Callback executed when the logo is tapped.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- subtitle → String
-
Subtitle descriptive text.
final
- subtitleWidget → Widget?
-
Custom widget override for subtitle.
final
- title → String
-
Main entity title text.
final
- titleWidget → Widget?
-
Custom widget override for title.
final
- type → BiographyBlockType
-
Variant layout type (
tallorwide).final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- version → const String
- Component version for reference. v1.1.0: Renamed from BioMarker to BiographyBlock matching Figma node 761:7097, moved to lib/web/. v1.0.1: Added ambient AlterDeviceScope inheritance so BioMarker derives device mode directly from parent marker/grid rather than judging its own narrow cell width. v1.0.0: Initial release matching Figma Node 761:7097 (BiographyBlock: Tall/Wide, Web/Mobile responsive).