Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,7 @@ class _Card extends StatelessWidget {

enum _ContentType {
unicode('Unicode'),
image('Image (Twemoji)')
;
image('Image (Twemoji)');

const _ContentType(this.label);
final String label;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ Widget buildStreamImageSourceBadgePlayground(BuildContext context) {
enum _BadgeVariant {
giphy('Giphy'),
imgur('Imgur'),
custom('Custom')
;
custom('Custom');

const _BadgeVariant(this.label);
final String label;
Expand All @@ -128,8 +127,7 @@ enum _LeadingOption {
imgur('Imgur (SVG)'),
file('File Icon'),
playFill('Play Icon'),
video('Video Icon')
;
video('Video Icon');

const _LeadingOption(this.label);
final String label;
Expand All @@ -141,8 +139,7 @@ enum _ColorOption {
blue('Blue', Colors.blue),
green('Green', Colors.green),
white('White', Colors.white),
black('Black', Colors.black)
;
black('Black', Colors.black);

const _ColorOption(this.label, this.color);
final String label;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ class _SizeDemo extends StatelessWidget {
StreamOnlineIndicatorSize.md => '12px',
StreamOnlineIndicatorSize.lg => '14px',
StreamOnlineIndicatorSize.xl => '16px',
StreamOnlineIndicatorSize.xxl => '20px',
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1144,8 +1144,7 @@ enum _ChipType {
single,
cluster,
overflow,
addEmoji
;
addEmoji;

String get label => switch (this) {
_ChipType.single => 'Single',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,7 @@ enum _IconOption {
pin('Pin'),
bellNotification('Bell'),
arrowUp('Arrow Up'),
translate('Translate')
;
translate('Translate');

const _IconOption(this.label);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,7 @@ enum _StatusOption {
sending('Sending', StreamIconData.clock),
sent('Sent', StreamIconData.checkmark),
delivered('Delivered', StreamIconData.checks),
read('Read', StreamIconData.checks)
;
read('Read', StreamIconData.checks);

const _StatusOption(this.label, this.iconData);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,7 @@ enum _ClipOption {
none(Clip.none, 'none'),
hardEdge(Clip.hardEdge, 'hardEdge'),
antiAlias(Clip.antiAlias, 'antiAlias'),
antiAliasWithSaveLayer(Clip.antiAliasWithSaveLayer, 'antiAliasWithSaveLayer')
;
antiAliasWithSaveLayer(Clip.antiAliasWithSaveLayer, 'antiAliasWithSaveLayer');

const _ClipOption(this.clip, this.label);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ enum _ColorOption {
red('Red', Colors.red),
green('Green', Colors.green),
orange('Orange', Colors.orange),
teal('Teal', Colors.teal)
;
teal('Teal', Colors.teal);

const _ColorOption(this.label, this.color);
final String label;
Expand Down
3 changes: 1 addition & 2 deletions packages/stream_core/lib/src/logger/stream_logger.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ enum Priority implements Comparable<Priority> {
info(level: 4),
warning(level: 5),
error(level: 6),
none(level: 7)
;
none(level: 7);

const Priority({required this.level});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ enum PlatformType {
linux('linux'),

/// Fuchsia: <https://fuchsia.dev/fuchsia-src/concepts>
fuchsia('fuchsia')
;
fuchsia('fuchsia');

/// Creates a [PlatformType] with the specified [operatingSystem] identifier.
const PlatformType(this.operatingSystem);
Expand Down
3 changes: 1 addition & 2 deletions packages/stream_core/lib/src/query/sort.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ enum SortDirection {

/// Sort in descending order (Z to A, 9 to 1, etc.).
@JsonValue(-1)
desc(-1)
;
desc(-1);

/// Creates a new [SortDirection] instance with the specified direction.
const SortDirection(this.value);
Expand Down
3 changes: 1 addition & 2 deletions packages/stream_core/lib/src/user/user_token.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ enum AuthType {
///
/// Allows unauthenticated access with limited permissions.
/// Used for public content access or guest user scenarios.
anonymous('anonymous')
;
anonymous('anonymous');

/// Constructs an [AuthType] with the associated header value.
const AuthType(this.headerValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class ConnectionRecoveryHandler extends Disposable {
_reconnectStrategy = retryStrategy ?? RetryStrategy(),
_keepConnectionAliveInBackground = keepConnectionAliveInBackground,
_policies = <AutomaticReconnectionPolicy>[
if (policies != null) ...policies,
...?policies,
WebSocketAutomaticReconnectionPolicy(
connectionState: client.connectionState,
),
Expand Down
1 change: 1 addition & 0 deletions packages/stream_core_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

### ✨ Features

- Added `StreamOnlineIndicatorSize.xxl` (20px) to pair with `StreamAvatarSize.xxl`.
- Added `StreamJumpToUnreadButton` component and `StreamJumpToUnreadButtonTheme`.
- Added `StreamVideoPlayIndicator` component with `StreamVideoPlayIndicatorSize` variants.
- Added `StreamFileTypeIconSize.md` and `StreamFileTypeIconSize.sm` variants.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ enum StreamEmojiSize {
xl(48),

/// Extra extra large emoji (64px).
xxl(64)
;
xxl(64);

/// Constructs a [StreamEmojiSize] with the given dimension.
const StreamEmojiSize(this.value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ enum StreamFileTypeIconSize {
md(width: 26, height: 32),

/// Small icon (19×24 pixels).
sm(width: 19, height: 24)
;
sm(width: 19, height: 24);

/// Constructs a [StreamFileTypeIconSize] with the given dimensions.
const StreamFileTypeIconSize({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ enum StreamAvatarGroupSize {
xl(48),

/// Extra-extra large avatar group (80px diameter).
xxl(80)
;
xxl(80);

/// Constructs a [StreamAvatarGroupSize] with the given diameter.
const StreamAvatarGroupSize(this.value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ enum StreamAvatarStackSize {
xs(20),

/// Small avatar stack (24px diameter).
sm(24)
;
sm(24);

/// Constructs a [StreamAvatarStackSize] with the given diameter.
const StreamAvatarStackSize(this.value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ enum StreamErrorBadgeSize {
sm(20, 16),

/// Extra-small badge (16px diameter, 12px icon).
xs(16, 12)
;
xs(16, 12);

const StreamErrorBadgeSize(this.value, this.iconSize);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class DefaultStreamOnlineIndicator extends StatelessWidget {
StreamOnlineIndicatorSize size,
) => switch (size) {
.sm => 1,
.md || .lg || .xl => 2,
.md || .lg || .xl || .xxl => 2,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ enum StreamRetryBadgeSize {
lg(32, 16),

/// Medium badge (24px diameter, 12px icon).
md(24, 12)
;
md(24, 12);

const StreamRetryBadgeSize(this.value, this.iconSize);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,7 @@ enum StreamButtonSize {
medium(40),

/// Large button (48px).
large(48)
;
large(48);

/// Constructs a [StreamButtonSize] with the given dimension.
const StreamButtonSize(this.value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ enum StreamLoadingSpinnerSize {
sm(20, 15, 2),

/// Extra small spinner (16px container, 12px indicator, 2px stroke).
xs(16, 12, 2)
;
xs(16, 12, 2);

const StreamLoadingSpinnerSize(
this.value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ enum StreamVisibility {
hidden,

/// The widget is removed from the layout entirely — it takes no space.
gone
;
gone;

/// Applies this visibility to the given [child] widget.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ enum StreamVideoPlayIndicatorSize {
md(dimension: 40, iconSize: 20),

/// Small indicator (20px diameter, 12px icon).
sm(dimension: 20, iconSize: 12)
;
sm(dimension: 20, iconSize: 12);

const StreamVideoPlayIndicatorSize({
required this.dimension,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ enum StreamAvatarSize {
xl(48),

/// Extra-extra large avatar (80px diameter).
xxl(80)
;
xxl(80);

/// Constructs a [StreamAvatarSize] with the given diameter.
const StreamAvatarSize(this.value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ enum StreamBadgeCountSize {
md(32),

/// Large badge (40px height).
lg(40)
;
lg(40);

/// Constructs a [StreamBadgeCountSize] with the given height.
const StreamBadgeCountSize(this.value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ enum StreamBadgeNotificationSize {
xs(16),

/// Small badge (20px height).
sm(20)
;
sm(20);

/// Constructs a [StreamBadgeNotificationSize] with the given height.
const StreamBadgeNotificationSize(this.value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ enum StreamCheckboxSize {
sm(20),

/// Medium checkbox (24px).
md(24)
;
md(24);

/// Constructs a [StreamCheckboxSize] with the given dimension.
const StreamCheckboxSize(this.value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ enum StreamEmojiButtonSize {
lg(40),

/// Extra large button (48px diameter).
xl(48)
;
xl(48);

/// Constructs a [StreamEmojiButtonSize] with the given diameter.
const StreamEmojiButtonSize(this.value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ enum StreamOnlineIndicatorSize {
lg(14),

/// Extra large indicator (16px diameter).
xl(16)
;
xl(16),

/// Extra-extra large indicator (20px diameter).
xxl(20);

/// Constructs a [StreamOnlineIndicatorSize] with the given diameter.
const StreamOnlineIndicatorSize(this.value);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading