stream_core_flutter 0.5.0
stream_core_flutter: ^0.5.0 copied to clipboard
Stream Design System for Flutter and cross-SDK utilities that depend on Flutter.
0.5.0 #
✨ Features #
- Added
StreamReactions.onReactionPressed, which reports the pressedStreamReactionsItem— ornullfor the cluster/overflow chip, which represents no single reaction. Added an optionalStreamReactionsItem.keyso callers can identify the pressed item. - Added optional
semanticsLabeltoStreamAvatar,StreamAvatarGroup, andStreamAvatarStack. OnStreamAvatar,null(default) drops the placeholder's initials from the semantics tree viaExcludeSemantics; a non-null value exposes it as a labeled image node. OnStreamAvatarGroup/StreamAvatarStack,nullcomposes through — each child's ownsemanticsLabelapplies — while a non-null value collapses the group into a single labeled image node and hides children and the "+N" overflow badge. - Added
StreamColorScheme.fromSeed— builds a complete light or dark color scheme from a single brand color, optionally with a custom chrome color. When chrome is omitted it is derived from the brand hue atStreamColorScheme.neutralChroma. StreamColorSwatch.fromColornow generates shades in the HCT color space instead of HSL. Each shade takes its tone from a fixed ladder measured from the Stream design tokens, so a shade's contrast is predictable regardless of the seed's hue — seeding a light color such as yellow now yields an accent that can carry white text. Two consequences: the seed is no longer reproduced verbatim at shade 500 (it is normalized onto the ladder), and dark scales now mirror the ladder so the seed's tone lands on shade 300, matching the default dark palette.- Added
StreamScaffold— a full-page scaffold for regular or floating bars; a floating bar enlarges the body'sMediaQuery.paddingso scrollables inset themselves. - Added
StreamBottomNavBarandStreamBottomNavBarItem— a bottom navigation bar rendering as a docked bar or a floating pill, themeable viaStreamBottomNavBarTheme. Its height iskStreamBottomNavBarHeight. - Added
StreamSafeArea— aSafeAreathat insets bymax(systemInset, minimum) + margin, so a pinned surface keeps a gap from the system bars.StreamSafeArea.drivenanimates the inset;resolveInsetsreturns it as a value. - Added floating-bar support to
StreamAppBarandStreamBottomAppBarviaStreamAppBarStyle.surfaceStyle/StreamBottomAppBarStyle.surfaceStyle, plusStreamBottomAppBarStyle.floatingBackgroundColorfor the upward fade. - Each bar publishes its resolved surface style to a
StreamToolbarScopefor its slots, and reports it through aresolveSurfaceStylestatic so a container can match its layout. - Added
StreamToolbarButton— a toolbar action, labelled or icon-only, that takes its look from the enclosingStreamToolbarScope; passtypeto override the resolved shape. StreamMediaViewerchrome now follows the ambientStreamSurfaceStyle— floating over full-bleed media, or docked with the media inset between the bars.- Added
isFloatingtoStreamAvatar,StreamAvatarGroup, andStreamAvatarStack, rendering a Material elevation (StreamAvatarThemeData.floatingElevation) instead of a hand-painted shadow. - Added
streamFloatingFadehelper — a sharedLinearGradientfactory (alpha stops0xE8/0xA8/0x40/0x00with solid-fraction support for safe-area zones) used internally byStreamAppBar,StreamBottomNavBar, andStreamMessageComposerfloating fade effects. - Added
isFloatingto the defaultStreamButtonconstructor — the floating (elevated) appearance was previously reachable only throughStreamButton.icon. Labelled buttons now get the same treatment: elevation for every type, plus abackgroundElevation1fill foroutlineandghost. - Added
StreamElevation— the four elevation levels of the design system as logical pixels, for passing toMaterial.elevationor a component theme'selevationfield. LikeStreamRadiusandStreamSpacingit is a theme primitive: reachable asStreamTheme.elevationorcontext.streamElevation, overridable per theme through theStreamThemeconstructor, and lerped on theme transitions.StreamElevation.noneis a fixed0rather than a themeable level, so "flat" cannot be redefined as elevated.StreamAvatarandStreamButtonnow resolve their elevations from it instead of hard-coded numbers; the rendered values are unchanged. - Added
chipStyletoStreamReactionsThemeDatafor overriding the per-reaction chip appearance (background, size, etc.); it is merged over the default reaction chip style. - Added
StreamMessagePresentationandStreamMessageLayoutData.presentation, describing whether a message is drawn inline in the list (standard) or as a preview above a scrim (preview, e.g. the long-press message-actions modal). Read it withStreamMessageLayout.presentationOf(context), or resolve per-presentation styling throughStreamMessageLayoutProperty.resolveWith. Forpreview, the default metadata (username, timestamp, edited, status), annotation (text, icon, trailing) and replies-label colors now resolve toStreamColorScheme.textOnAccentso they stay legible againstStreamColorScheme.backgroundScrim. Also addedStreamMessageLayoutData.copyWith. StreamNetworkImagenow caches through a shared cache manager which, on IO platforms, is stored in its own app-scoped directory (isolated from the host app's image cache) with LRU eviction, while other platforms fall back to the library defaults.
🐛 Bug Fixes #
- Floating buttons (
isFloating: true) now retain their pill surface (backgroundElevation1) when disabled, across all style/type combinations. Previously, outline and ghost variants fell back to transparent when disabled, losing the floating visual.
⚠️ Deprecations #
- Deprecated
StreamReactions.onPressedin favor ofonReactionPressed. - Deprecated
StreamTheme.brightness. ReadcolorScheme.brightnessinstead. The property, and thebrightnessparameter oncopyWithandStreamTheme.raw, all keep working — for a theme built through theStreamThemefactory the value still mirrorscolorScheme.brightness.
0.4.1 #
✨ Features #
- Added
StreamAccessibilityAutofocus— behavior-only wrapper that requests screen-reader focus on its child shortly after mount; useful for redirecting focus on route entry. - Added
StreamSemanticsAnnouncer— imperative one-shot screen-reader announcement helper. - Added
StreamSemanticsTransitionAnnouncer— observes aListenableand dispatches transition announcements to the screen reader. - Added
labelTextandhelperAffinitytoStreamTextInputfor a floating label above the field and helper text positioned inside or outside the bordered chassis. - Added
focusNodeandautofocuspass-through onStreamListTile. - Added optional
semanticLabeltoStreamBadgeNotification,StreamFileTypeIcon,StreamStepper,StreamMessageComposerAttachment, andStreamMessageComposerMediaAttachment. - Added
excludeHeaderSemanticstoStreamAppBarandStreamSheetHeaderfor opting out of the default heading role and route naming on the title. - Added
onVisiblecallback toStreamSnackbar— fires after the entrance animation completes (or synchronously when a screen reader is active).
🐞 Fixed #
- Fixed
StreamButtonicons picking up the host app'sElevatedButtonThemeData.iconColorinstead of the button's ownforegroundColor.
0.4.0 #
✨ Features #
- Split the public API into
package:stream_core_flutter/core.dart(shared primitives for any Stream SDK) andpackage:stream_core_flutter/chat.dart(chat-only widgets; re-exportscore.dart); the convenience barrelpackage:stream_core_flutter/stream_core_flutter.dartis now deprecated. - Added
StreamSnackbarandStreamSnackbarTheme— Stream-styled transient feedback snackbars with a messenger-driven queue. - Added
StreamIcons.megaphoneandStreamIcons.shield(20px) to the icon set. - Added
StreamMentionTypeidentifier for supported mention types and options for mention text customisation per type.
0.3.0 #
🛑 Breaking / Removals #
- Removed
StreamCoreMessageComposer,StreamMessageComposerInput,StreamMessageComposerInputField,StreamCoreMessageComposerInputTrailing,StreamVoiceRecordingButton,VoiceRecordingCallback,StreamMessageComposerInputTrailingState, andInputThemeDefaults. These composer-flow widgets now live entirely instream_chat_flutter. The attachment widgets (StreamMessageComposerAttachmentand variants) remain in this package.
✨ Features #
- Added
StreamOnlineIndicatorSize.xxl(20px) to pair withStreamAvatarSize.xxl. - Added
StreamJumpToUnreadButtoncomponent andStreamJumpToUnreadButtonTheme. - Added
StreamVideoPlayIndicatorcomponent withStreamVideoPlayIndicatorSizevariants. - Added
StreamFileTypeIconSize.mdandStreamFileTypeIconSize.smvariants. - Added
trailingslot toStreamMessageAnnotation, with matchingtrailingTextStyle/trailingTextColoronStreamMessageAnnotationStyle. - Added
StreamIntrinsicFlex,StreamIntrinsicRow, andStreamIntrinsicColumnlayout primitives, extendingStreamFlexwith full main-axis flex behavior (Expanded,Flexible,MainAxisAlignment,MainAxisSize) andCrossAxisAlignment.baselinesupport while retaining cross-axis shrink-wrapping. - Added
StreamTapTargetPadding, a reusable primitive that grows a child's layout and hit-test area to a configurableminSizewithout changing its visual size, with a directionalalignmentthat controls which direction the extra tap area extends into. - Added
StreamSheetHeadercomponent andStreamSheetHeaderThemefor bottom-sheet and modal headers, with platform-aware auto-implied dismissal based on the enclosing route. - Added
StreamToolbar, a three-slot layout primitive shared byStreamAppBar,StreamBottomAppBar, andStreamSheetHeaderthat keeps the title geometrically centred even when leading and trailing widths differ. - Added
StreamBottomAppBarandStreamBottomAppBarTheme, the bottom counterpart toStreamAppBarwith the same three-slot (leading/heading/trailing) layout, optional title + subtitle, top hairline border,SafeArea(top: false)when primary, and per-slot button style propagation. - Added
StreamMediaViewerandStreamMediaViewerTheme, a full-screen media chrome controller that composes optional header/footer chrome over an edge-to-edge child, animates the chrome in/out viashowChrome, and fades to an immersive background when hidden. The theme exposes scopedappBarStyle/bottomAppBarStyleso descendant chrome bars can be tinted (e.g. light-on-dark over dark media) without touching app-wide themes. - Added
StreamSheet,StreamSheetDragHandle,StreamSheetRoute,StreamSheetTransitionand theshowStreamSheethelper — Stream-styled modal bottom sheets with scroll-aware drag-to-dismiss and stacking support.StreamSheetcan also be used standalone outside the modal route. - Added
StreamSheetThemeandStreamSheetThemeData(StreamTheme.sheetTheme) for themingStreamSheetand modal sheets opened withshowStreamSheet. StreamEmojiPickerSheet.shownow resolves its background color and border radius from the ambientStreamSheetThemeso the picker visually matches other Stream-styled sheets by default.StreamLoadingSpinnernow supports determinate progress via avalueparameter (0.0–1.0), and renders a completion checkmark whenvaluereaches1.0. Omitvaluefor the existing indeterminate spinning state.StreamCommandChipis now tappable across its whole surface, not just the × icon.StreamRemoveControlnow meets the 48 dp minimum tap target by default while keeping its 20 dp visible badge anchored to the top-end corner. ExposestapTargetSize,visualDensity, andsemanticLabel, announces itself as a button to screen readers, and shows a click cursor on web/desktop when hovered.- Added
textAlignVerticaltoStreamTextInput(andStreamTextInputProps) for controlling the vertical alignment of the text within the input. - Added
cursorColor,cursorErrorColor,cursorWidth,cursorHeight, andcursorRadiustoStreamTextInputStylefor customizing the text input cursor.cursorErrorColoris applied automatically whenhelperStateisStreamHelperState.error.StreamMessageComposerInputFieldalso honors these cursor properties from the theme. - Exported
DefaultStreamEmojiso consumers can compose with or wrap the default emoji rendering when overriding viaStreamComponentFactory. - Added
StreamMessageComposerEditMessageAttachment, a preview shown above the composer input while editing a message. - Added
StreamMessageComposerUnsupportedAttachment, a placeholder shown for attachments the client cannot render. - Added a themed
thumbnailslot toStreamMessageComposerReplyAttachmentandStreamMessageComposerEditMessageAttachment, with matchingthumbnailSize/thumbnailShape/thumbnailSidetheme fields. - Added per-widget themes for the message composer attachments:
StreamMessageComposerAttachmentTheme,StreamMessageComposerEditMessageAttachmentTheme,StreamMessageComposerFileAttachmentTheme,StreamMessageComposerLinkPreviewAttachmentTheme,StreamMessageComposerMediaAttachmentTheme,StreamMessageComposerReplyAttachmentTheme, andStreamMessageComposerUnsupportedAttachmentTheme. All seven are wired intoStreamThemewith matchingBuildContextextensions. - The composer attachment widgets (
StreamMessageComposerAttachment,StreamMessageComposerEditMessageAttachment,StreamMessageComposerFileAttachment,StreamMessageComposerLinkPreviewAttachment,StreamMessageComposerMediaAttachment,StreamMessageComposerReplyAttachment,StreamMessageComposerUnsupportedAttachment) can now be customized viaStreamComponentFactory— each exposes a matching builder slot taking its*Propsconfiguration object.
🐞 Fixed #
- Fixed RTL layout for composer input field.
- Fixed RTL layout for audio waveform and waveform slider.
- Fixed
StreamTextInputstretching vertically when placed inside a parent with boundedmaxHeight(e.g.AlertDialog.content,Flexible). The input now always hugs its intrinsic height. - Fixed
StreamTextInputcontent alignment so text and prefix/suffix slots are centered vertically. - Changed
StreamTextInputdefaulttextCapitalizationtoTextCapitalization.sentences. - Updated
StreamReactionPickerspacing to match the Figma specification. - Updated
StreamStepperbutton style to match the Figma specification. StreamEmojinow pins its primaryfontFamilyto the platform's native emoji font (Apple Color Emoji on iOS/macOS, Segoe UI Emoji on Windows, Noto Color Emoji elsewhere) so the existing per-platformfontSizecorrection lines up with the font that actually renders the glyph.fontFamilyFallbackis unchanged.StreamFileTypeIconnow centers its SVG inside the icon's render box, so it stays centered when given larger constraints.
💥 Breaking Changes #
- Unified
StreamRadiusacross platforms; removed platform factory,.raw(),.ios, and.android. - Renamed Stream Icons by removing the size suffix from the icon names.
- Renamed
StreamFileTypeIconSizevariants:s48→xl,s40→lg. StreamFlex,StreamRow, andStreamColumnnow defaultmainAxisSizetoMainAxisSize.min(wasMainAxisSize.max). Callers that relied on the widget expanding to fill available space must now passmainAxisSize: MainAxisSize.maxexplicitly.- Removed
StreamMessageAnnotation.richandspanTextStyle/spanTextColor; use the newtrailingslot instead. - Aligned
StreamButtonAPI with Flutter's built-in buttons: renamedlabel(String?) to requiredchild(Widget), changedicon/iconLeft/iconRightfromIconDatatoWidget, and renamedonTaptoonPressed.StreamButtonPropsmirrors the same renames. - Redesigned
StreamAppBarwith a slots-based API (leading/title/subtitle/trailing) and platform-aware auto-implied leading; replaces the previous MaterialAppBarwrapper. AddsStreamAppBarStyle,StreamAppBarTheme, andStreamAppBarThemeData. placeholderonStreamCoreMessageComposer,StreamMessageComposerInput, andStreamMessageComposerInputFieldis now an optionalString?(wasStringdefaulting to'', andrequiredonStreamMessageComposerInputField).- Removed
StreamMessageTheme,StreamMessageThemeData, andStreamMessageStyle;MessageComposerReplyAttachmentandMessageComposerLinkPreviewAttachmentnow read colors directly fromStreamColorScheme. - Renamed
StreamMessageComposerAttachmentContainertoStreamMessageComposerAttachmentto mirror the existingStreamMessageAttachmentnaming. StreamMessageComposerAttachmentnow usesshape: OutlinedBorder?andside: BorderSide?(matchingStreamMessageAttachmentStyle) in place of the previousborderColor/borderRadiusfields and constructor params. Added astyle:constructor param takingStreamMessageComposerAttachmentThemeData?for per-instance overrides; the oldbackgroundColorandborderColorwidget params are gone.- Added
style:per-instance override params toMessageComposerFileAttachment,MessageComposerMediaFileAttachment,MessageComposerLinkPreviewAttachment, andMessageComposerReplyAttachment. RenamedMessageComposerReplyAttachment.style(theReplyStyleenum slot) todirection:sostyle:is free for the theme-data override. - Renamed the four composer attachment widgets to add the
Streamprefix:MessageComposerFileAttachment→StreamMessageComposerFileAttachment,MessageComposerMediaFileAttachment→StreamMessageComposerMediaAttachment(also dropped the redundant "File" segment),MessageComposerLinkPreviewAttachment→StreamMessageComposerLinkPreviewAttachment,MessageComposerReplyAttachment→StreamMessageComposerReplyAttachment. - Replaced
ReplyStylewithStreamReplyDirection(sameincoming/outgoingvalues) used byStreamMessageComposerReplyAttachment.direction. - Renamed
StreamMessageComposerLinkPreviewAttachment.mediatothumbnail, andStreamMessageComposerReplyAttachment.trailingtothumbnail. - Renamed
StreamMessageComposerLinkPreviewAttachmentThemeDatafields:mediaSize→thumbnailSize,mediaShape→thumbnailShape,mediaSide→thumbnailSide.
0.2.0 #
💥 Breaking Changes #
- Renamed
StreamInputTheme/StreamInputThemeDatatoStreamTextInputTheme/StreamTextInputThemeDatawith a redesigned API - Renamed
StreamTheme.inputThemetoStreamTheme.textInputTheme - Removed
alignmentandoffsetfromStreamOnlineIndicatorThemeData(these are layout concerns, not theme)
✨ Features #
- Added
child,alignment, andoffsetparameters toStreamBadgeNotificationfor badge-over-child positioning - Added
child,alignment, andoffsetparameters toStreamBadgeCountfor badge-over-child positioning - Added
StreamSwitchcomponent with platform-aware styling andstyleprop - Added
StreamTextInputcomponent with configurable helper text, icons, and validation states - Added
StreamSteppercomponent for numeric value adjustment with customizable bounds andstyleprop - Extended
StreamButtonThemeStylewith sizing, alignment, padding, and shape options - Expanded
StreamListTilewithcontentPaddingand text style customization
0.1.0 #
- First release of the Stream Core Flutter package.
- Main content of this package is the Stream Design System for Flutter, but also contains other cross-SDK utilities that depend on Flutter.