From 3cfa82d4d0ae38f096acd3e7eaeebe36fb46c17e Mon Sep 17 00:00:00 2001 From: Roscoe Rubin-Rottenberg Date: Fri, 13 Mar 2026 14:13:50 -0400 Subject: [PATCH] chore: simplify lint setup --- analysis_options.yaml | 26 +-- .../core/auth/data/models/login_result.dart | 6 +- .../repositories/auth_repository_impl.dart | 15 +- .../onboarding_repository_impl.dart | 4 +- .../components/atoms/avatar_stack.dart | 5 +- .../atoms/buttons/accent_button.dart | 6 +- .../atoms/buttons/action_button.dart | 6 +- .../atoms/buttons/circle_icon_button.dart | 6 +- .../components/atoms/buttons/live_button.dart | 10 +- .../atoms/buttons/primary_button.dart | 5 +- .../atoms/buttons/tappable_text.dart | 6 +- .../components/atoms/buttons/text_button.dart | 11 +- .../components/atoms/tags/feed_tag.dart | 4 +- .../components/atoms/tags/hashtag.dart | 4 +- .../components/atoms/tags/tag.dart | 4 +- .../atoms/toggles/follow_button.dart | 4 +- .../atoms/toggles/glass_follow_button.dart | 4 +- .../molecules/create_media_sheet.dart | 2 +- .../components/molecules/feed_card.dart | 21 +- .../components/molecules/feed_tag_list.dart | 10 +- .../molecules/known_interactions_bar.dart | 15 +- .../components/molecules/post_tile.dart | 25 +-- .../molecules/profile_action_buttons.dart | 12 +- .../components/molecules/profile_card.dart | 5 +- .../components/molecules/profile_info.dart | 5 +- .../components/molecules/profile_stats.dart | 5 +- .../molecules/recording_button.dart | 5 +- .../molecules/settings_feed_card.dart | 25 +-- .../components/molecules/story_circle.dart | 9 +- .../components/organisms/bottom_nav_bar.dart | 14 +- .../components/organisms/side_action_bar.dart | 25 +-- .../organisms/sticky_profile_tab_bar.dart | 10 +- .../templates/explore_page_template.dart | 9 +- .../templates/feeds_bar_template.dart | 9 +- .../templates/image_review_page_template.dart | 13 +- .../templates/info_bar_template.dart | 4 +- .../templates/profile_page_template.dart | 6 +- .../templates/recording_page_template.dart | 14 +- .../templates/video_review_page_template.dart | 10 +- .../core/design_system/theme/app_theme.dart | 16 +- .../core/design_system/theme/text_theme.dart | 6 +- .../core/design_system/tokens/gradients.dart | 206 +++--------------- .../core/design_system/tokens/typography.dart | 180 ++++----------- lib/src/core/media/create_media_actions.dart | 9 +- .../data/adapters/bsky/feed_adapter.dart | 20 +- .../atproto/data/models/feed_models.dart | 50 ++--- .../atproto/data/models/labeler_models.dart | 9 +- .../data/models/notification_models.dart | 10 +- .../atproto/data/models/pref_models.dart | 28 +-- .../atproto/data/models/record_models.dart | 21 +- .../atproto/data/models/sound_models.dart | 5 +- .../repositories/actor_repository_impl.dart | 9 +- .../repositories/feed_repository_impl.dart | 35 +-- .../notification_repository_impl.dart | 4 +- .../repositories/repo_repository_impl.dart | 4 +- .../repositories/sound_repository_impl.dart | 4 +- .../data/repositories/story_repository.dart | 5 +- .../repositories/story_repository_impl.dart | 5 +- .../messages/data/models/message_models.dart | 4 +- .../repository/messages_repository_xrpc.dart | 32 +-- .../story_image_editor_configs.dart | 31 +-- .../ui/story_image_editor_page.dart | 40 +--- .../widgets/story_editor_bottom_section.dart | 5 +- .../ui/widgets/story_editor_toolbar.dart | 6 +- .../models/video_editor_result.dart | 5 +- .../pro_video_editor_repository_impl.dart | 10 +- .../services/audio_helper_service.dart | 13 +- .../ui/video_editor_grounded_page.dart | 20 +- .../audio/audio_edit_controls_section.dart | 6 +- .../ui/widgets/common/build_stickers.dart | 24 +- .../common/video_editor_configs_builder.dart | 39 +--- .../widgets/common/video_progress_alert.dart | 5 +- .../crop_rotate/crop_rotate_editor_bar.dart | 82 ++++--- .../ui/widgets/filter/filter_editor_bar.dart | 5 +- .../widgets/layout/video_editor_header.dart | 5 +- .../ui/widgets/layout/video_toolbar.dart | 12 +- .../ui/widgets/paint/paint_editor_bar.dart | 37 ++-- .../ui/widgets/text/text_editor_bar.dart | 48 ++-- .../text/text_editor_font_scale_sheet.dart | 5 +- lib/src/core/routing/app_router.dart | 21 +- .../preferences/default_preferences.dart | 10 +- lib/src/core/ui/widgets/report_dialog.dart | 8 +- lib/src/core/utils/label_utils.dart | 6 +- lib/src/core/utils/logging/log_level.dart | 3 +- .../auth/providers/auth_providers.dart | 5 +- .../providers/comments_page_state.dart | 5 +- .../comments/ui/pages/comments_page.dart | 10 +- .../comments/ui/widgets/comment_item.dart | 6 +- .../comments/ui/widgets/emoji_picker.dart | 5 +- .../providers/feed_action_controller.dart | 8 +- .../feed/providers/feed_provider.dart | 58 ++--- lib/src/features/feed/ui/pages/feed_page.dart | 14 +- .../feed/ui/pages/standalone_post_page.dart | 26 +-- .../widgets/action_buttons/share_panel.dart | 13 +- .../action_buttons/side_action_bar.dart | 18 +- .../ui/widgets/feed/cacheable_page_view.dart | 8 +- .../feed/ui/widgets/feed/feeds_bar.dart | 8 +- .../ui/widgets/images/image_carousel.dart | 17 +- .../ui/widgets/post/feed_post_widget.dart | 10 +- .../feed/ui/widgets/videos/video_player.dart | 10 +- .../home/providers/navigation_state.dart | 5 +- .../ui/pages/new_chat_search_page.dart | 9 +- .../providers/notification_provider.dart | 20 +- .../ui/widgets/notification_item.dart | 24 +- .../ui/widgets/notifications_list.dart | 39 +--- .../posting/ui/pages/media_picker_page.dart | 17 +- .../posting/ui/pages/recording_page.dart | 41 ++-- .../posting/ui/pages/story_post_page.dart | 18 +- .../profile/providers/blocks_provider.dart | 4 +- .../providers/profile_likes_provider.dart | 10 +- .../providers/profile_reposts_provider.dart | 10 +- .../profile/providers/user_list_provider.dart | 4 +- .../profile/ui/pages/blocks_page.dart | 4 +- .../profile/ui/pages/profile_page.dart | 28 +-- .../ui/pages/standalone_likes_feed_page.dart | 20 +- .../pages/standalone_profile_feed_page.dart | 16 +- .../pages/standalone_reposts_feed_page.dart | 16 +- .../profile/ui/widgets/blocks_list_view.dart | 4 +- .../ui/widgets/early_supporter_sheet.dart | 4 +- .../ui/widgets/profile_feed_post_widget.dart | 4 +- .../profile/ui/widgets/profile_grid_tab.dart | 4 +- .../ui/widgets/profile_grid_widget.dart | 29 ++- .../profile/ui/widgets/profile_likes_tab.dart | 33 ++- .../ui/widgets/profile_reposts_tab.dart | 33 ++- .../search/ui/pages/post_results.dart | 63 +++--- .../features/search/ui/pages/search_page.dart | 25 +-- .../settings/providers/settings_provider.dart | 45 +--- .../settings/ui/pages/feed_list_page.dart | 5 +- .../ui/pages/labeler_label_settings_page.dart | 11 +- .../ui/pages/labeler_management_page.dart | 125 +++++------ .../settings/ui/pages/settings_page.dart | 12 +- .../features/sound/ui/pages/sound_page.dart | 5 +- .../sound/ui/widgets/sound_header_card.dart | 15 +- .../stories/providers/stories_by_author.dart | 6 +- .../stories/ui/pages/author_stories_page.dart | 5 +- .../stories/ui/pages/story_manager_page.dart | 4 +- .../stories/ui/widgets/stories_list.dart | 5 +- pubspec.lock | 36 ++- pubspec.yaml | 1 - 139 files changed, 693 insertions(+), 1774 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index 2b72c61..161ac47 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,29 +1,11 @@ include: - - package:very_good_analysis/analysis_options.yaml - package:flutter_lints/flutter.yaml analyzer: errors: - avoid_catches_without_on_clauses: ignore - avoid_dynamic_calls: ignore - inference_failure_on_function_invocation: ignore - inference_failure_on_instance_creation: ignore invalid_annotation_target: ignore - comment_references: ignore # enable when starting documentation - public_member_api_docs: ignore # enable when starting documentation - prefer_null_aware_method_calls: ignore - strict_raw_type: ignore - avoid_equals_and_hash_code_on_mutable_classes: ignore - inference_failure_on_function_return_type: ignore - inference_failure_on_untyped_parameter: ignore - flutter_style_todos: ignore - specify_nonobvious_property_types: ignore - sort_constructors_first: ignore - unawaited_futures: ignore - avoid_positional_boolean_parameters: ignore - use_setters_to_change_properties: ignore - document_ignores: ignore - one_member_abstracts: ignore - discarded_futures: ignore + language: + strict-casts: true + strict-raw-types: true exclude: - - '**/*.g.dart' + - "**/*.g.dart" diff --git a/lib/src/core/auth/data/models/login_result.dart b/lib/src/core/auth/data/models/login_result.dart index 0c62d17..dca1a9a 100644 --- a/lib/src/core/auth/data/models/login_result.dart +++ b/lib/src/core/auth/data/models/login_result.dart @@ -6,10 +6,8 @@ part 'login_result.freezed.dart'; /// Result of a login attempt @freezed abstract class LoginResult with _$LoginResult { - const factory LoginResult({ - required LoginStatus status, - String? error, - }) = _LoginResult; + const factory LoginResult({required LoginStatus status, String? error}) = + _LoginResult; const LoginResult._(); factory LoginResult.success() => diff --git a/lib/src/core/auth/data/repositories/auth_repository_impl.dart b/lib/src/core/auth/data/repositories/auth_repository_impl.dart index 052f256..ef5b2ab 100644 --- a/lib/src/core/auth/data/repositories/auth_repository_impl.dart +++ b/lib/src/core/auth/data/repositories/auth_repository_impl.dart @@ -173,10 +173,7 @@ class AuthRepositoryImpl implements AuthRepository { ? Uri.parse(_pdsEndpoint!).host : null; - _atProto = ATProto.fromOAuthSession( - _oauthSession!, - service: pdsHost, - ); + _atProto = ATProto.fromOAuthSession(_oauthSession!, service: pdsHost); } catch (e) { _logger.e('Error loading saved account', error: e); } @@ -382,10 +379,7 @@ class AuthRepositoryImpl implements AuthRepository { // Create ATProto client from OAuth session if (_pdsEndpoint != null) { final pdsHost = Uri.parse(_pdsEndpoint!).host; - _atProto = ATProto.fromOAuthSession( - _oauthSession!, - service: pdsHost, - ); + _atProto = ATProto.fromOAuthSession(_oauthSession!, service: pdsHost); } else { _logger.e('PDS endpoint is null, cannot create ATProto client'); return LoginResult.failed('PDS endpoint not found'); @@ -480,10 +474,7 @@ class AuthRepositoryImpl implements AuthRepository { final pdsHost = _pdsEndpoint != null ? Uri.parse(_pdsEndpoint!).host : null; - _atProto = ATProto.fromOAuthSession( - _oauthSession!, - service: pdsHost, - ); + _atProto = ATProto.fromOAuthSession(_oauthSession!, service: pdsHost); await _saveSession(); return true; diff --git a/lib/src/core/auth/data/repositories/onboarding_repository_impl.dart b/lib/src/core/auth/data/repositories/onboarding_repository_impl.dart index eebcd26..ef4787d 100644 --- a/lib/src/core/auth/data/repositories/onboarding_repository_impl.dart +++ b/lib/src/core/auth/data/repositories/onboarding_repository_impl.dart @@ -55,9 +55,7 @@ class OnboardingRepositoryImpl implements OnboardingRepository { if (_did == null) return null; try { - final uri = AtUri.parse( - 'at://$_did/app.bsky.actor.profile/self', - ); + final uri = AtUri.parse('at://$_did/app.bsky.actor.profile/self'); final response = await _repoRepository.getRecord(uri: uri); return ActorProfileRecord.fromJson(response.record.toJson()); } catch (e) { diff --git a/lib/src/core/design_system/components/atoms/avatar_stack.dart b/lib/src/core/design_system/components/atoms/avatar_stack.dart index 4e67c28..cd46859 100644 --- a/lib/src/core/design_system/components/atoms/avatar_stack.dart +++ b/lib/src/core/design_system/components/atoms/avatar_stack.dart @@ -5,10 +5,7 @@ import 'package:spark/src/core/ui/widgets/user_avatar.dart'; /// Data class representing an avatar in the stack. class AvatarData { - const AvatarData({ - required this.imageUrl, - required this.username, - }); + const AvatarData({required this.imageUrl, required this.username}); final String imageUrl; final String username; diff --git a/lib/src/core/design_system/components/atoms/buttons/accent_button.dart b/lib/src/core/design_system/components/atoms/buttons/accent_button.dart index bdb3637..8252d9c 100644 --- a/lib/src/core/design_system/components/atoms/buttons/accent_button.dart +++ b/lib/src/core/design_system/components/atoms/buttons/accent_button.dart @@ -9,11 +9,7 @@ class AccentButton extends StatelessWidget { final String label; final VoidCallback? onPressed; - const AccentButton({ - required this.label, - super.key, - this.onPressed, - }); + const AccentButton({required this.label, super.key, this.onPressed}); @override Widget build(BuildContext context) { diff --git a/lib/src/core/design_system/components/atoms/buttons/action_button.dart b/lib/src/core/design_system/components/atoms/buttons/action_button.dart index 786af67..dfe4b0b 100644 --- a/lib/src/core/design_system/components/atoms/buttons/action_button.dart +++ b/lib/src/core/design_system/components/atoms/buttons/action_button.dart @@ -26,11 +26,7 @@ class ActionButton extends StatelessWidget { const pressedScale = 0.9; const iconSize = 34.0; - final sizedIcon = SizedBox( - width: iconSize, - height: iconSize, - child: icon, - ); + final sizedIcon = SizedBox(width: iconSize, height: iconSize, child: icon); return SizedBox( width: baseSize, diff --git a/lib/src/core/design_system/components/atoms/buttons/circle_icon_button.dart b/lib/src/core/design_system/components/atoms/buttons/circle_icon_button.dart index 1439d3c..e45e4bb 100644 --- a/lib/src/core/design_system/components/atoms/buttons/circle_icon_button.dart +++ b/lib/src/core/design_system/components/atoms/buttons/circle_icon_button.dart @@ -46,11 +46,7 @@ class CircleIconButton extends StatelessWidget { ); if (semanticLabel != null) { - return Semantics( - label: semanticLabel, - button: true, - child: content, - ); + return Semantics(label: semanticLabel, button: true, child: content); } return content; diff --git a/lib/src/core/design_system/components/atoms/buttons/live_button.dart b/lib/src/core/design_system/components/atoms/buttons/live_button.dart index d45f5b6..04f265d 100644 --- a/lib/src/core/design_system/components/atoms/buttons/live_button.dart +++ b/lib/src/core/design_system/components/atoms/buttons/live_button.dart @@ -7,11 +7,7 @@ class LiveButton extends StatelessWidget { final Widget child; final VoidCallback? onTap; - const LiveButton({ - required this.child, - super.key, - this.onTap, - }); + const LiveButton({required this.child, super.key, this.onTap}); @override Widget build(BuildContext context) { @@ -36,9 +32,7 @@ class LiveButton extends StatelessWidget { ), borderRadius: BorderRadius.circular(50), ), - child: Center( - child: child, - ), + child: Center(child: child), ), ), ), diff --git a/lib/src/core/design_system/components/atoms/buttons/primary_button.dart b/lib/src/core/design_system/components/atoms/buttons/primary_button.dart index 6921de8..7be24c8 100644 --- a/lib/src/core/design_system/components/atoms/buttons/primary_button.dart +++ b/lib/src/core/design_system/components/atoms/buttons/primary_button.dart @@ -59,10 +59,7 @@ class PrimaryButton extends StatelessWidget { color: AppColors.greyWhite, ), ), - if (trailing != null) ...[ - const SizedBox(width: 8), - trailing!, - ], + if (trailing != null) ...[const SizedBox(width: 8), trailing!], ], ), ), diff --git a/lib/src/core/design_system/components/atoms/buttons/tappable_text.dart b/lib/src/core/design_system/components/atoms/buttons/tappable_text.dart index b0af8e2..7c82485 100644 --- a/lib/src/core/design_system/components/atoms/buttons/tappable_text.dart +++ b/lib/src/core/design_system/components/atoms/buttons/tappable_text.dart @@ -6,11 +6,7 @@ class TappableText extends StatelessWidget { final String text; final VoidCallback onTap; - const TappableText({ - required this.text, - required this.onTap, - super.key, - }); + const TappableText({required this.text, required this.onTap, super.key}); @override Widget build(BuildContext context) { diff --git a/lib/src/core/design_system/components/atoms/buttons/text_button.dart b/lib/src/core/design_system/components/atoms/buttons/text_button.dart index 6705c2a..d2a717b 100644 --- a/lib/src/core/design_system/components/atoms/buttons/text_button.dart +++ b/lib/src/core/design_system/components/atoms/buttons/text_button.dart @@ -7,11 +7,7 @@ class TextButton extends StatelessWidget { final String label; final VoidCallback? onTap; - const TextButton({ - required this.label, - super.key, - this.onTap, - }); + const TextButton({required this.label, super.key, this.onTap}); @override Widget build(BuildContext context) { @@ -27,10 +23,7 @@ class TextButton extends StatelessWidget { color: isDark ? AppColors.darkGreyButton : AppColors.lightGreyButton, borderRadius: const BorderRadius.all(Radius.circular(8)), border: const Border.fromBorderSide( - BorderSide( - color: AppColors.greyBorder, - width: 1.14667, - ), + BorderSide(color: AppColors.greyBorder, width: 1.14667), ), ), child: Align( diff --git a/lib/src/core/design_system/components/atoms/tags/feed_tag.dart b/lib/src/core/design_system/components/atoms/tags/feed_tag.dart index b6b36fc..f4bc0b3 100644 --- a/lib/src/core/design_system/components/atoms/tags/feed_tag.dart +++ b/lib/src/core/design_system/components/atoms/tags/feed_tag.dart @@ -43,9 +43,7 @@ class FeedTag extends StatelessWidget { decoration: BoxDecoration( color: Colors.white.withAlpha(50), borderRadius: BorderRadius.circular(9), - border: Border.all( - color: Colors.white.withAlpha(37), - ), + border: Border.all(color: Colors.white.withAlpha(37)), ), child: Center( child: Text( diff --git a/lib/src/core/design_system/components/atoms/tags/hashtag.dart b/lib/src/core/design_system/components/atoms/tags/hashtag.dart index 18cab67..3a1af77 100644 --- a/lib/src/core/design_system/components/atoms/tags/hashtag.dart +++ b/lib/src/core/design_system/components/atoms/tags/hashtag.dart @@ -28,9 +28,7 @@ class GlassmorphicTag extends StatelessWidget { decoration: BoxDecoration( color: isDark ? AppColors.darkGreyButton : AppColors.lightGreyButton, borderRadius: BorderRadius.circular(13), - border: Border.all( - color: AppColors.greyBorder, - ), + border: Border.all(color: AppColors.greyBorder), ), child: Row( mainAxisAlignment: MainAxisAlignment.center, diff --git a/lib/src/core/design_system/components/atoms/tags/tag.dart b/lib/src/core/design_system/components/atoms/tags/tag.dart index 6b98e79..7d474b5 100644 --- a/lib/src/core/design_system/components/atoms/tags/tag.dart +++ b/lib/src/core/design_system/components/atoms/tags/tag.dart @@ -28,9 +28,7 @@ class Tag extends StatelessWidget { decoration: BoxDecoration( color: isDark ? AppColors.darkGreyButton : AppColors.lightGreyButton, borderRadius: BorderRadius.circular(13), - border: Border.all( - color: AppColors.greyBorder, - ), + border: Border.all(color: AppColors.greyBorder), ), child: Row( mainAxisAlignment: MainAxisAlignment.center, diff --git a/lib/src/core/design_system/components/atoms/toggles/follow_button.dart b/lib/src/core/design_system/components/atoms/toggles/follow_button.dart index fc8c4bd..fd10fee 100644 --- a/lib/src/core/design_system/components/atoms/toggles/follow_button.dart +++ b/lib/src/core/design_system/components/atoms/toggles/follow_button.dart @@ -46,9 +46,7 @@ class FollowButton extends StatelessWidget { color: isDark ? AppColors.red900 : AppColors.red50, borderRadius: const BorderRadius.all(Radius.circular(8)), border: Border.fromBorderSide( - BorderSide( - color: isDark ? AppColors.red800 : AppColors.red200, - ), + BorderSide(color: isDark ? AppColors.red800 : AppColors.red200), ), ), child: Align( diff --git a/lib/src/core/design_system/components/atoms/toggles/glass_follow_button.dart b/lib/src/core/design_system/components/atoms/toggles/glass_follow_button.dart index 0116356..e534ab3 100644 --- a/lib/src/core/design_system/components/atoms/toggles/glass_follow_button.dart +++ b/lib/src/core/design_system/components/atoms/toggles/glass_follow_button.dart @@ -40,9 +40,7 @@ class GlassFollowButton extends StatelessWidget { decoration: BoxDecoration( color: Colors.white.withAlpha(51), borderRadius: BorderRadius.circular(100), - border: Border.all( - color: Colors.white.withAlpha(37), - ), + border: Border.all(color: Colors.white.withAlpha(37)), ), child: Center( child: Text( diff --git a/lib/src/core/design_system/components/molecules/create_media_sheet.dart b/lib/src/core/design_system/components/molecules/create_media_sheet.dart index 4095fe0..b19ec51 100644 --- a/lib/src/core/design_system/components/molecules/create_media_sheet.dart +++ b/lib/src/core/design_system/components/molecules/create_media_sheet.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; /// Shows a standardized bottom sheet for creating media: /// Record, Upload Video, Upload Images. /// Only renders the actions whose callbacks are provided (non-null). -Future showCreateMediaSheet( +Future showCreateMediaSheet( BuildContext context, { VoidCallback? onRecord, VoidCallback? onUploadVideo, diff --git a/lib/src/core/design_system/components/molecules/feed_card.dart b/lib/src/core/design_system/components/molecules/feed_card.dart index 68b1df7..38a152a 100644 --- a/lib/src/core/design_system/components/molecules/feed_card.dart +++ b/lib/src/core/design_system/components/molecules/feed_card.dart @@ -120,10 +120,7 @@ class FeedCard extends StatelessWidget { ); if (onTap != null) { - return GestureDetector( - onTap: onTap, - child: content, - ); + return GestureDetector(onTap: onTap, child: content); } return content; @@ -169,20 +166,14 @@ class FeedCard extends StatelessWidget { mainAxisSize: MainAxisSize.min, children: [ if (isLiked) - AppIcons.likeFilled( - size: 14, - color: AppColors.primary600, - ) + AppIcons.likeFilled(size: 14, color: AppColors.primary600) else AppIcons.like( size: 14, color: isDark ? AppColors.grey200 : AppColors.grey400, ), const SizedBox(width: 4), - Text( - _formatCount(likeCount), - style: AppTypography.textExtraSmallThin, - ), + Text(_formatCount(likeCount), style: AppTypography.textExtraSmallThin), const SizedBox(width: 8), ], ); @@ -305,11 +296,7 @@ class _FallbackAvatar extends StatelessWidget { ), ), ) - : const Icon( - FluentIcons.feed_24_regular, - color: iconColor, - size: 18, - ), + : const Icon(FluentIcons.feed_24_regular, color: iconColor, size: 18), ); } } diff --git a/lib/src/core/design_system/components/molecules/feed_tag_list.dart b/lib/src/core/design_system/components/molecules/feed_tag_list.dart index 9490c73..0166548 100644 --- a/lib/src/core/design_system/components/molecules/feed_tag_list.dart +++ b/lib/src/core/design_system/components/molecules/feed_tag_list.dart @@ -118,10 +118,7 @@ class _FeedTagListState extends State { return Transform.scale( scale: scale, - child: Material( - color: Colors.transparent, - child: child, - ), + child: Material(color: Colors.transparent, child: child), ); }, child: child, @@ -220,9 +217,6 @@ class _FeedTagListState extends State { ) : listView; - return SizedBox( - height: 30, - child: fadedList, - ); + return SizedBox(height: 30, child: fadedList); } } diff --git a/lib/src/core/design_system/components/molecules/known_interactions_bar.dart b/lib/src/core/design_system/components/molecules/known_interactions_bar.dart index ee58745..3a822f3 100644 --- a/lib/src/core/design_system/components/molecules/known_interactions_bar.dart +++ b/lib/src/core/design_system/components/molecules/known_interactions_bar.dart @@ -14,10 +14,7 @@ import 'package:spark/src/core/ui/theme/theme.dart'; /// Shows reposts on the left with a green repost icon, and likes on the right /// with a pink heart icon. Only renders if there are actual interactions. class KnownInteractionsBar extends StatelessWidget { - const KnownInteractionsBar({ - required this.interactions, - super.key, - }); + const KnownInteractionsBar({required this.interactions, super.key}); /// List of known interactions to display. final List? interactions; @@ -75,10 +72,7 @@ class KnownInteractionsBar extends StatelessWidget { /// A single interaction pill with icon and avatar stack. class _InteractionPill extends StatelessWidget { - const _InteractionPill({ - required this.icon, - required this.avatars, - }); + const _InteractionPill({required this.icon, required this.avatars}); final Widget icon; final List avatars; @@ -104,10 +98,7 @@ class _InteractionPill extends StatelessWidget { children: [ icon, const SizedBox(width: 6), - AvatarStack( - avatars: avatars, - largeSize: 32, - ), + AvatarStack(avatars: avatars, largeSize: 32), ], ), ), diff --git a/lib/src/core/design_system/components/molecules/post_tile.dart b/lib/src/core/design_system/components/molecules/post_tile.dart index 8edb3af..c30066b 100644 --- a/lib/src/core/design_system/components/molecules/post_tile.dart +++ b/lib/src/core/design_system/components/molecules/post_tile.dart @@ -62,15 +62,11 @@ class PostTile extends StatelessWidget { fadeInDuration: Duration.zero, imageUrl: thumbnailUrl, fit: BoxFit.cover, - placeholder: (context, url) => const ColoredBox( - color: AppColors.grey800, - ), + placeholder: (context, url) => + const ColoredBox(color: AppColors.grey800), errorWidget: (context, url, error) => const ColoredBox( color: AppColors.grey800, - child: Icon( - Icons.broken_image, - color: AppColors.grey400, - ), + child: Icon(Icons.broken_image, color: AppColors.grey400), ), ), ) @@ -79,21 +75,14 @@ class PostTile extends StatelessWidget { fadeInDuration: Duration.zero, imageUrl: thumbnailUrl, fit: BoxFit.cover, - placeholder: (context, url) => const ColoredBox( - color: AppColors.grey800, - ), + placeholder: (context, url) => + const ColoredBox(color: AppColors.grey800), errorWidget: (context, url, error) => const ColoredBox( color: AppColors.grey800, - child: Icon( - Icons.broken_image, - color: AppColors.grey400, - ), + child: Icon(Icons.broken_image, color: AppColors.grey400), ), ), - if (seen) - Container( - color: Colors.black.withAlpha(180), - ), + if (seen) Container(color: Colors.black.withAlpha(180)), Positioned( bottom: 0, right: 0, diff --git a/lib/src/core/design_system/components/molecules/profile_action_buttons.dart b/lib/src/core/design_system/components/molecules/profile_action_buttons.dart index c30cb9b..4b975fd 100644 --- a/lib/src/core/design_system/components/molecules/profile_action_buttons.dart +++ b/lib/src/core/design_system/components/molecules/profile_action_buttons.dart @@ -28,13 +28,7 @@ class ProfileActionButtons extends StatelessWidget { Widget build(BuildContext context) { if (isCurrentUser) { return Row( - children: [ - Expanded( - child: _EditButton( - onTap: onEditTap, - ), - ), - ], + children: [Expanded(child: _EditButton(onTap: onEditTap))], ); } @@ -59,9 +53,7 @@ class ProfileActionButtons extends StatelessWidget { /// Edit button that matches the FollowButton's following state style class _EditButton extends StatelessWidget { - const _EditButton({ - this.onTap, - }); + const _EditButton({this.onTap}); final VoidCallback? onTap; diff --git a/lib/src/core/design_system/components/molecules/profile_card.dart b/lib/src/core/design_system/components/molecules/profile_card.dart index b9ddeda..a6c3c48 100644 --- a/lib/src/core/design_system/components/molecules/profile_card.dart +++ b/lib/src/core/design_system/components/molecules/profile_card.dart @@ -174,10 +174,7 @@ class ProfileCard extends StatelessWidget { ); if (onTap != null) { - return GestureDetector( - onTap: onTap, - child: content, - ); + return GestureDetector(onTap: onTap, child: content); } return content; diff --git a/lib/src/core/design_system/components/molecules/profile_info.dart b/lib/src/core/design_system/components/molecules/profile_info.dart index e168b2a..d253686 100644 --- a/lib/src/core/design_system/components/molecules/profile_info.dart +++ b/lib/src/core/design_system/components/molecules/profile_info.dart @@ -112,10 +112,7 @@ class _ProfileDescriptionText extends StatelessWidget { final spans = _buildTextSpans(text, usernameMatches); return RichText( - text: TextSpan( - style: style, - children: spans, - ), + text: TextSpan(style: style, children: spans), ); } } diff --git a/lib/src/core/design_system/components/molecules/profile_stats.dart b/lib/src/core/design_system/components/molecules/profile_stats.dart index c742131..eda2939 100644 --- a/lib/src/core/design_system/components/molecules/profile_stats.dart +++ b/lib/src/core/design_system/components/molecules/profile_stats.dart @@ -40,10 +40,7 @@ class ProfileStats extends StatelessWidget { } class _StatItem extends StatelessWidget { - const _StatItem({ - required this.count, - required this.label, - }); + const _StatItem({required this.count, required this.label}); final String count; final String label; diff --git a/lib/src/core/design_system/components/molecules/recording_button.dart b/lib/src/core/design_system/components/molecules/recording_button.dart index 8039073..63f9242 100644 --- a/lib/src/core/design_system/components/molecules/recording_button.dart +++ b/lib/src/core/design_system/components/molecules/recording_button.dart @@ -144,10 +144,7 @@ class _RecordingButtonState extends State height: _outerSize, decoration: BoxDecoration( shape: BoxShape.circle, - border: Border.all( - color: Colors.white, - width: _ringWidth, - ), + border: Border.all(color: Colors.white, width: _ringWidth), ), ), // Animated inner shape (white circle -> red square) diff --git a/lib/src/core/design_system/components/molecules/settings_feed_card.dart b/lib/src/core/design_system/components/molecules/settings_feed_card.dart index f6e0607..c184bd6 100644 --- a/lib/src/core/design_system/components/molecules/settings_feed_card.dart +++ b/lib/src/core/design_system/components/molecules/settings_feed_card.dart @@ -7,10 +7,7 @@ import 'package:spark/src/core/design_system/tokens/shapes.dart'; import 'package:spark/src/core/design_system/tokens/typography.dart'; import 'package:spark/src/core/network/atproto/data/models/feed_models.dart'; -enum SettingsFeedCardMode { - display, - edit, -} +enum SettingsFeedCardMode { display, edit } class SettingsFeedCard extends StatelessWidget { const SettingsFeedCard({ @@ -155,9 +152,7 @@ class SettingsFeedCard extends StatelessWidget { child: Container( width: 40, height: 40, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(8), - ), + decoration: BoxDecoration(borderRadius: BorderRadius.circular(8)), child: _avatarUrl.isNotEmpty ? Image.network( _avatarUrl, @@ -244,14 +239,8 @@ class SettingsFeedCard extends StatelessWidget { ), ), child: _isLiked - ? AppIcons.likeFilled( - size: 16, - color: Colors.white, - ) - : AppIcons.like( - size: 16, - color: Colors.grey, - ), + ? AppIcons.likeFilled(size: 16, color: Colors.white) + : AppIcons.like(size: 16, color: Colors.grey), ), ); } @@ -271,11 +260,7 @@ class SettingsFeedCard extends StatelessWidget { color: Colors.red.shade500, borderRadius: BorderRadius.circular(6), ), - child: const Icon( - Icons.delete, - size: 16, - color: Colors.white, - ), + child: const Icon(Icons.delete, size: 16, color: Colors.white), ), ), ], diff --git a/lib/src/core/design_system/components/molecules/story_circle.dart b/lib/src/core/design_system/components/molecules/story_circle.dart index 76dab33..090463c 100644 --- a/lib/src/core/design_system/components/molecules/story_circle.dart +++ b/lib/src/core/design_system/components/molecules/story_circle.dart @@ -48,10 +48,7 @@ class StoryCircle extends StatelessWidget { } /// Constructor variant for a "Close Friends" story with a green border. - factory StoryCircle.cf({ - required String userName, - required String imageUrl, - }) { + factory StoryCircle.cf({required String userName, required String imageUrl}) { return StoryCircle._( type: StoryType.cf, userName: userName, @@ -180,9 +177,7 @@ class StoryCircle extends StatelessWidget { } class _LiveBadge extends StatelessWidget { - const _LiveBadge({ - required this.live, - }); + const _LiveBadge({required this.live}); final String live; diff --git a/lib/src/core/design_system/components/organisms/bottom_nav_bar.dart b/lib/src/core/design_system/components/organisms/bottom_nav_bar.dart index b927de1..f1df805 100644 --- a/lib/src/core/design_system/components/organisms/bottom_nav_bar.dart +++ b/lib/src/core/design_system/components/organisms/bottom_nav_bar.dart @@ -32,10 +32,7 @@ class SparkBottomNavBar extends ConsumerWidget { children: [ _BarBackground( child: Container( - padding: EdgeInsets.only( - top: 12, - bottom: 12 + bottomPadding, - ), + padding: EdgeInsets.only(top: 12, bottom: 12 + bottomPadding), color: isDark ? const Color.fromARGB(51, 0, 0, 0) : const Color.fromARGB(178, 255, 255, 255), @@ -242,9 +239,7 @@ class _ProfileAvatar extends StatelessWidget { height: 34, decoration: BoxDecoration( shape: BoxShape.circle, - border: Border.all( - color: Colors.white, - ), + border: Border.all(color: Colors.white), image: image is AssetImage ? null : DecorationImage(image: image, fit: BoxFit.cover), @@ -260,9 +255,6 @@ class _ProfileAvatar extends StatelessWidget { ) : null, ); - return GestureDetector( - onTap: onTap, - child: avatar, - ); + return GestureDetector(onTap: onTap, child: avatar); } } diff --git a/lib/src/core/design_system/components/organisms/side_action_bar.dart b/lib/src/core/design_system/components/organisms/side_action_bar.dart index f1ca212..cf35031 100644 --- a/lib/src/core/design_system/components/organisms/side_action_bar.dart +++ b/lib/src/core/design_system/components/organisms/side_action_bar.dart @@ -219,17 +219,11 @@ class _SparkSideActionBarState extends State { soundCover.startsWith('https://'))) { children.addAll([ const SizedBox(height: 13), - _SoundItem( - cover: soundCover, - onTap: widget.onSoundTap, - ), + _SoundItem(cover: soundCover, onTap: widget.onSoundTap), ]); } - return Column( - mainAxisSize: MainAxisSize.min, - children: children, - ); + return Column(mainAxisSize: MainAxisSize.min, children: children); } } @@ -330,10 +324,7 @@ class _ActionItemState extends State<_ActionItem> } class _SoundItem extends StatelessWidget { - const _SoundItem({ - required this.cover, - this.onTap, - }); + const _SoundItem({required this.cover, this.onTap}); final String cover; final VoidCallback? onTap; @@ -357,10 +348,7 @@ class _SoundItem extends StatelessWidget { shape: BoxShape.circle, color: hasValidCover ? null : Colors.grey[800], image: hasValidCover - ? DecorationImage( - image: NetworkImage(cover), - fit: BoxFit.cover, - ) + ? DecorationImage(image: NetworkImage(cover), fit: BoxFit.cover) : null, ), ), @@ -405,10 +393,7 @@ class _CuratePopover extends StatelessWidget { ), ), if (i < destinations.length - 1) - Container( - height: 1, - color: Colors.white.withValues(alpha: 0.25), - ), + Container(height: 1, color: Colors.white.withValues(alpha: 0.25)), ], ], ), diff --git a/lib/src/core/design_system/components/organisms/sticky_profile_tab_bar.dart b/lib/src/core/design_system/components/organisms/sticky_profile_tab_bar.dart index f59f98d..57dfe83 100644 --- a/lib/src/core/design_system/components/organisms/sticky_profile_tab_bar.dart +++ b/lib/src/core/design_system/components/organisms/sticky_profile_tab_bar.dart @@ -1,10 +1,7 @@ import 'package:flutter/material.dart'; class StickyProfileTabBar extends SliverPersistentHeaderDelegate { - StickyProfileTabBar({ - required this.child, - this.height = 50.0, - }); + StickyProfileTabBar({required this.child, this.height = 50.0}); final Widget child; final double height; @@ -15,10 +12,7 @@ class StickyProfileTabBar extends SliverPersistentHeaderDelegate { double shrinkOffset, bool overlapsContent, ) { - return Material( - elevation: shrinkOffset > 0 ? 1.0 : 0.0, - child: child, - ); + return Material(elevation: shrinkOffset > 0 ? 1.0 : 0.0, child: child); } @override diff --git a/lib/src/core/design_system/templates/explore_page_template.dart b/lib/src/core/design_system/templates/explore_page_template.dart index cf40132..bcfbb55 100644 --- a/lib/src/core/design_system/templates/explore_page_template.dart +++ b/lib/src/core/design_system/templates/explore_page_template.dart @@ -29,14 +29,9 @@ class ExplorePageTemplate extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Padding( - padding: const EdgeInsets.all(16), - child: searchWidget, - ), + Padding(padding: const EdgeInsets.all(16), child: searchWidget), if (showTabs && tabsWidget != null) tabsWidget!, - Expanded( - child: showTabs ? contentWidget : emptyStateWidget, - ), + Expanded(child: showTabs ? contentWidget : emptyStateWidget), ], ), ), diff --git a/lib/src/core/design_system/templates/feeds_bar_template.dart b/lib/src/core/design_system/templates/feeds_bar_template.dart index 574dd3b..5f313f7 100644 --- a/lib/src/core/design_system/templates/feeds_bar_template.dart +++ b/lib/src/core/design_system/templates/feeds_bar_template.dart @@ -60,10 +60,7 @@ class FeedsBarTemplate extends StatelessWidget implements PreferredSizeWidget { gradient: LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, - colors: [ - Color.fromARGB(110, 0, 0, 0), - Colors.transparent, - ], + colors: [Color.fromARGB(110, 0, 0, 0), Colors.transparent], ), ), ), @@ -87,9 +84,7 @@ class FeedsBarTemplate extends StatelessWidget implements PreferredSizeWidget { message: 'Create post', child: GestureDetector( onTap: onLeadingPressed, - child: Center( - child: AppIcons.addPostFilled(size: 28), - ), + child: Center(child: AppIcons.addPostFilled(size: 28)), ), ), ), diff --git a/lib/src/core/design_system/templates/image_review_page_template.dart b/lib/src/core/design_system/templates/image_review_page_template.dart index fcd4df9..bd2a48e 100644 --- a/lib/src/core/design_system/templates/image_review_page_template.dart +++ b/lib/src/core/design_system/templates/image_review_page_template.dart @@ -77,9 +77,7 @@ class ImageReviewPageTemplate extends StatelessWidget { color: theme.textTheme.titleLarge?.color, tooltip: 'Back', ), - title: Text( - title, - ), + title: Text(title), centerTitle: false, ), body: SafeArea( @@ -341,10 +339,7 @@ class _ImagePager extends StatelessWidget { } class _DescriptionSection extends StatelessWidget { - const _DescriptionSection({ - required this.controller, - required this.maxChars, - }); + const _DescriptionSection({required this.controller, required this.maxChars}); final TextEditingController controller; final int maxChars; @@ -411,9 +406,7 @@ class _CrossPostSection extends StatelessWidget { ), title: Text( 'Post to Bluesky', - style: AppTypography.textMediumBold.copyWith( - color: titleColor, - ), + style: AppTypography.textMediumBold.copyWith(color: titleColor), ), trailing: Switch(value: value, onChanged: onChanged), onTap: () => onChanged(!value), diff --git a/lib/src/core/design_system/templates/info_bar_template.dart b/lib/src/core/design_system/templates/info_bar_template.dart index bc13174..437a341 100644 --- a/lib/src/core/design_system/templates/info_bar_template.dart +++ b/lib/src/core/design_system/templates/info_bar_template.dart @@ -116,9 +116,7 @@ class _InfoBarTemplateState extends State if (widget.showFollowButton) Padding( padding: const EdgeInsets.only(left: 8, top: 2), - child: FollowPillButton( - onPressed: widget.onFollow ?? () {}, - ), + child: FollowPillButton(onPressed: widget.onFollow ?? () {}), ), ], ), diff --git a/lib/src/core/design_system/templates/profile_page_template.dart b/lib/src/core/design_system/templates/profile_page_template.dart index 71fb71a..2a12d93 100644 --- a/lib/src/core/design_system/templates/profile_page_template.dart +++ b/lib/src/core/design_system/templates/profile_page_template.dart @@ -88,11 +88,7 @@ class ProfilePageTemplate extends StatelessWidget { return Scaffold( appBar: AppBar( centerTitle: isCurrentUser, - title: appBarTitle != null - ? Text( - appBarTitle!, - ) - : null, + title: appBarTitle != null ? Text(appBarTitle!) : null, elevation: 0, actions: appBarActions, leading: leading ?? const AppLeadingButton(), diff --git a/lib/src/core/design_system/templates/recording_page_template.dart b/lib/src/core/design_system/templates/recording_page_template.dart index 90e82e5..90d4e30 100644 --- a/lib/src/core/design_system/templates/recording_page_template.dart +++ b/lib/src/core/design_system/templates/recording_page_template.dart @@ -78,9 +78,7 @@ class RecordingPageTemplate extends StatelessWidget { Positioned.fill( child: Transform.scale( scale: scale, - child: Center( - child: cameraPreview, - ), + child: Center(child: cameraPreview), ), ), // Top controls aligned within rounded view @@ -122,10 +120,7 @@ class RecordingPageTemplate extends StatelessWidget { } class _TopOverlay extends StatelessWidget { - const _TopOverlay({ - required this.onBack, - required this.timer, - }); + const _TopOverlay({required this.onBack, required this.timer}); final VoidCallback onBack; final Widget timer; @@ -206,10 +201,7 @@ class _BottomOverlay extends StatelessWidget { gradient: LinearGradient( begin: Alignment.bottomCenter, end: Alignment.topCenter, - colors: [ - Colors.black.withAlpha(180), - Colors.transparent, - ], + colors: [Colors.black.withAlpha(180), Colors.transparent], ), ), padding: EdgeInsets.only( diff --git a/lib/src/core/design_system/templates/video_review_page_template.dart b/lib/src/core/design_system/templates/video_review_page_template.dart index 58e889b..438c593 100644 --- a/lib/src/core/design_system/templates/video_review_page_template.dart +++ b/lib/src/core/design_system/templates/video_review_page_template.dart @@ -192,10 +192,7 @@ class _VideoPreview extends StatelessWidget { } class _DescriptionSection extends StatelessWidget { - const _DescriptionSection({ - required this.controller, - required this.maxChars, - }); + const _DescriptionSection({required this.controller, required this.maxChars}); final TextEditingController controller; final int maxChars; @@ -226,10 +223,7 @@ class _DescriptionSection extends StatelessWidget { } class _CrossPostSection extends StatelessWidget { - const _CrossPostSection({ - required this.value, - required this.onChanged, - }); + const _CrossPostSection({required this.value, required this.onChanged}); final bool value; final ValueChanged onChanged; diff --git a/lib/src/core/design_system/theme/app_theme.dart b/lib/src/core/design_system/theme/app_theme.dart index 80f8bd7..7d5055c 100644 --- a/lib/src/core/design_system/theme/app_theme.dart +++ b/lib/src/core/design_system/theme/app_theme.dart @@ -31,9 +31,7 @@ class AppTheme { borderRadius: BorderRadius.circular(12), ), padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 24), - textStyle: const TextStyle( - fontWeight: FontWeight.bold, - ), + textStyle: const TextStyle(fontWeight: FontWeight.bold), ), ), outlinedButtonTheme: OutlinedButtonThemeData( @@ -44,9 +42,7 @@ class AppTheme { borderRadius: BorderRadius.circular(12), ), padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 24), - textStyle: const TextStyle( - fontWeight: FontWeight.bold, - ), + textStyle: const TextStyle(fontWeight: FontWeight.bold), ), ), inputDecorationTheme: InputDecorationTheme( @@ -120,9 +116,7 @@ class AppTheme { borderRadius: BorderRadius.circular(12), ), padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 24), - textStyle: const TextStyle( - fontWeight: FontWeight.bold, - ), + textStyle: const TextStyle(fontWeight: FontWeight.bold), ), ), outlinedButtonTheme: OutlinedButtonThemeData( @@ -133,9 +127,7 @@ class AppTheme { borderRadius: BorderRadius.circular(12), ), padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 24), - textStyle: const TextStyle( - fontWeight: FontWeight.bold, - ), + textStyle: const TextStyle(fontWeight: FontWeight.bold), ), ), inputDecorationTheme: InputDecorationTheme( diff --git a/lib/src/core/design_system/theme/text_theme.dart b/lib/src/core/design_system/theme/text_theme.dart index 667c635..1139832 100644 --- a/lib/src/core/design_system/theme/text_theme.dart +++ b/lib/src/core/design_system/theme/text_theme.dart @@ -37,8 +37,6 @@ class AppTextTheme { /// Dark theme text theme /// Same typography but optimized for dark backgrounds - static TextTheme get dark => light.apply( - bodyColor: Colors.white, - displayColor: Colors.white, - ); + static TextTheme get dark => + light.apply(bodyColor: Colors.white, displayColor: Colors.white); } diff --git a/lib/src/core/design_system/tokens/gradients.dart b/lib/src/core/design_system/tokens/gradients.dart index e3255b9..7957512 100644 --- a/lib/src/core/design_system/tokens/gradients.dart +++ b/lib/src/core/design_system/tokens/gradients.dart @@ -6,38 +6,21 @@ class AppGradients { static const accent = LinearGradient( begin: Alignment(-1.3914, 1.0057999999999998), end: Alignment(2.0484, -1.3258), - stops: [ - 0, - 1, - ], - colors: [ - Color(0xffff97cd), - Color(0xffff349d), - ], + stops: [0, 1], + colors: [Color(0xffff97cd), Color(0xffff349d)], ); static const linear2 = LinearGradient( begin: Alignment(-1.3914, 1.0057999999999998), end: Alignment(2.0484, -1.3258), - stops: [ - 0, - 1, - ], - colors: [ - Color(0xffffcee2), - Color(0xfff99bb1), - ], + stops: [0, 1], + colors: [Color(0xffffcee2), Color(0xfff99bb1)], ); static const gradientLinearGlass = LinearGradient( begin: Alignment.topLeft, end: Alignment(1, 1.0028000000000001), - stops: [ - 0, - 0.37, - 0.72, - 1, - ], + stops: [0, 0.37, 0.72, 1], colors: [ Color(0x4dffffff), Color(0x26ffffff), @@ -49,165 +32,84 @@ class AppGradients { static const gradientLinearSecondaryGradient = LinearGradient( begin: Alignment(-0.6918, 1), end: Alignment(0.679, -1), - stops: [ - 0, - 1, - ], - colors: [ - Color(0xffffcee2), - Color(0xfff99bb1), - ], + stops: [0, 1], + colors: [Color(0xffffcee2), Color(0xfff99bb1)], ); static const gradientLinearPrimaryGradient = LinearGradient( begin: Alignment(-0.28200000000000003, 1), end: Alignment(0.28200000000000003, -1), - stops: [ - 0, - 1, - ], - colors: [ - Color(0xffff97cd), - Color(0xffff349d), - ], + stops: [0, 1], + colors: [Color(0xffff97cd), Color(0xffff349d)], ); static const gradientLinearGr4 = LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, - stops: [ - 0, - 0.2822, - 1, - ], - colors: [ - Color(0xffff7f65), - Color(0xfff63d68), - Color(0xffffd9d1), - ], + stops: [0, 0.2822, 1], + colors: [Color(0xffff7f65), Color(0xfff63d68), Color(0xffffd9d1)], ); static const gradientLinearGr5 = LinearGradient( begin: Alignment.topLeft, end: Alignment(0.6112, 0.1976), - stops: [ - 0, - 0.5312, - 1, - ], - colors: [ - Color(0xfffbb1c3), - Color(0xff2834e7), - Color(0xff000000), - ], + stops: [0, 0.5312, 1], + colors: [Color(0xfffbb1c3), Color(0xff2834e7), Color(0xff000000)], ); static const gradientLinearGr6 = LinearGradient( begin: Alignment.topLeft, end: Alignment(0.6112, 0.1976), - stops: [ - 0, - 0.5312, - 1, - ], - colors: [ - Color(0xffffd9d1), - Color(0xff7042d2), - Color(0xff000000), - ], + stops: [0, 0.5312, 1], + colors: [Color(0xffffd9d1), Color(0xff7042d2), Color(0xff000000)], ); static const gradientLinearGr7 = LinearGradient( begin: Alignment.topLeft, end: Alignment(0.6112, 0.1976), - stops: [ - 0, - 0.5312, - 1, - ], - colors: [ - Color(0xff91f3f3), - Color(0xff4648ff), - Color(0xff000000), - ], + stops: [0, 0.5312, 1], + colors: [Color(0xff91f3f3), Color(0xff4648ff), Color(0xff000000)], ); static const gradientLinearGr8 = LinearGradient( begin: Alignment.topLeft, end: Alignment(0.5524, 0.4710000000000001), - stops: [ - 0, - 0.2822, - 1, - ], - colors: [ - Color(0xffffccc1), - Color(0xfff63d68), - Color(0xff000000), - ], + stops: [0, 0.2822, 1], + colors: [Color(0xffffccc1), Color(0xfff63d68), Color(0xff000000)], ); static const gradientGreyGrey1 = LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, - stops: [ - 0, - 1, - ], - colors: [ - Color(0xff16171f), - Color(0xff000000), - ], + stops: [0, 1], + colors: [Color(0xff16171f), Color(0xff000000)], ); static const gradientGreyGrey2 = LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, - stops: [ - 0, - 1, - ], - colors: [ - Color(0xff20212b), - Color(0xff16171f), - ], + stops: [0, 1], + colors: [Color(0xff20212b), Color(0xff16171f)], ); static const gradientGreyGrey3 = LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, - stops: [ - 0, - 1, - ], - colors: [ - Color(0xff373946), - Color(0xff16171f), - ], + stops: [0, 1], + colors: [Color(0xff373946), Color(0xff16171f)], ); static const gradientGreyGrey4 = LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, - stops: [ - 0, - 1, - ], - colors: [ - Color(0xff4d4f60), - Color(0xff292a36), - ], + stops: [0, 1], + colors: [Color(0xff4d4f60), Color(0xff292a36)], ); static const backgroundLinearGlass = LinearGradient( begin: Alignment(-0.8200000000000001, -0.8), end: Alignment(0.72, 0.8200000000000001), - stops: [ - 0, - 0.3702, - 0.7212, - 1, - ], + stops: [0, 0.3702, 0.7212, 1], colors: [ Color(0x4dffffff), Color(0x26ffffff), @@ -220,12 +122,7 @@ class AppGradients { begin: Alignment(-0.8200000000000001, -0.8), end: Alignment(0.72, 0.8200000000000001), transform: GradientRotation(45 * (math.pi / 180)), - stops: [ - 0, - 0.3702, - 0.7212, - 1, - ], + stops: [0, 0.3702, 0.7212, 1], colors: [ Color(0x3FFFFFFF), // was 6 * 5, now 9 * 7 Color(0x1CFFFFFF), // was 3 * 5, now 4 * 7 @@ -237,12 +134,7 @@ class AppGradients { static const glassStrokeLight = LinearGradient( begin: Alignment(-0.8200000000000001, -0.8), end: Alignment(0.72, 0.8200000000000001), - stops: [ - 0, - 0.3702, - 0.7212, - 1, - ], + stops: [0, 0.3702, 0.7212, 1], colors: [ Color(0x4d000000), Color(0x26000000), @@ -255,12 +147,7 @@ class AppGradients { begin: Alignment(-0.8200000000000001, -0.8), end: Alignment(0.72, 0.8200000000000001), transform: GradientRotation(45 * (math.pi / 180)), - stops: [ - 0, - 0.3702, - 0.7212, - 1, - ], + stops: [0, 0.3702, 0.7212, 1], colors: [ Color(0xFF313131), Color(0xFF232323), @@ -273,28 +160,15 @@ class AppGradients { begin: Alignment(-0.8200000000000001, -0.8), end: Alignment(0.72, 0.8200000000000001), transform: GradientRotation(45 * (math.pi / 180)), - stops: [ - 0, - 0.7212, - 1, - ], - colors: [ - Color(0xFF6F6F6F), - Color(0xFF3D3D3D), - Color(0xFF6F6F6F), - ], + stops: [0, 0.7212, 1], + colors: [Color(0xFF6F6F6F), Color(0xFF3D3D3D), Color(0xFF6F6F6F)], ); static const lightStroke = LinearGradient( begin: Alignment(-0.8200000000000001, -0.8), end: Alignment(0.72, 0.8200000000000001), transform: GradientRotation(45 * (math.pi / 180)), - stops: [ - 0, - 0.3702, - 0.7212, - 1, - ], + stops: [0, 0.3702, 0.7212, 1], colors: [ Color(0xFFFEFEFE), Color(0xFFFCFCFC), @@ -307,16 +181,8 @@ class AppGradients { begin: Alignment(-0.8200000000000001, -0.8), end: Alignment(0.72, 0.8200000000000001), transform: GradientRotation(45 * (math.pi / 180)), - stops: [ - 0, - 0.7212, - 1, - ], - colors: [ - Color(0xFFB0B0B0), - Color(0xFFD2D2D2), - Color(0xFFB0B0B0), - ], + stops: [0, 0.7212, 1], + colors: [Color(0xFFB0B0B0), Color(0xFFD2D2D2), Color(0xFFB0B0B0)], ); static const green = LinearGradient( diff --git a/lib/src/core/design_system/tokens/typography.dart b/lib/src/core/design_system/tokens/typography.dart index c4abc9d..47cf468 100644 --- a/lib/src/core/design_system/tokens/typography.dart +++ b/lib/src/core/design_system/tokens/typography.dart @@ -9,9 +9,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -4.48, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 700), - ], + fontVariations: [FontVariation('wght', 700)], ); static const displayXxlMedium = TextStyle( @@ -23,9 +21,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -4.48, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 600), - ], + fontVariations: [FontVariation('wght', 600)], ); static const displayXxlLight = TextStyle( @@ -37,9 +33,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -4.48, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 300), - ], + fontVariations: [FontVariation('wght', 300)], ); static const displayXlLight = TextStyle( @@ -51,9 +45,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -3.84, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 300), - ], + fontVariations: [FontVariation('wght', 300)], ); static const displayXlMedium = TextStyle( @@ -65,9 +57,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -3.84, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 600), - ], + fontVariations: [FontVariation('wght', 600)], ); static const displayXlBold = TextStyle( @@ -79,9 +69,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -3.84, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 700), - ], + fontVariations: [FontVariation('wght', 700)], ); static const displayLargeThin = TextStyle( @@ -93,9 +81,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -3.52, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 300), - ], + fontVariations: [FontVariation('wght', 300)], ); static const displayLargeMedium = TextStyle( @@ -107,9 +93,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -3.52, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 600), - ], + fontVariations: [FontVariation('wght', 600)], ); static const displayLargeBold = TextStyle( @@ -121,9 +105,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -3.52, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 700), - ], + fontVariations: [FontVariation('wght', 700)], ); static const displayMediumThin = TextStyle( @@ -135,9 +117,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -2.88, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 300), - ], + fontVariations: [FontVariation('wght', 300)], ); static const displayMediumMedium = TextStyle( @@ -149,9 +129,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -2.88, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 600), - ], + fontVariations: [FontVariation('wght', 600)], ); static const displayMediumBold = TextStyle( @@ -163,9 +141,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -2.88, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 700), - ], + fontVariations: [FontVariation('wght', 700)], ); static const displaySmallThin = TextStyle( @@ -177,9 +153,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -1.92, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 300), - ], + fontVariations: [FontVariation('wght', 300)], ); static const displaySmallMedium = TextStyle( @@ -191,9 +165,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -1.92, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 600), - ], + fontVariations: [FontVariation('wght', 600)], ); static const displaySmallBold = TextStyle( @@ -205,9 +177,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -1.92, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 700), - ], + fontVariations: [FontVariation('wght', 700)], ); static const headlineXlThin = TextStyle( @@ -219,9 +189,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -1.68, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 300), - ], + fontVariations: [FontVariation('wght', 300)], ); static const headlineXlMedium = TextStyle( @@ -233,9 +201,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -1.68, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 500), - ], + fontVariations: [FontVariation('wght', 500)], ); static const headlineXlBold = TextStyle( @@ -247,9 +213,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -1.68, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 700), - ], + fontVariations: [FontVariation('wght', 700)], ); static const headlineLargeThin = TextStyle( @@ -261,9 +225,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -1.44, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 300), - ], + fontVariations: [FontVariation('wght', 300)], ); static const headlineLargeMedium = TextStyle( @@ -275,9 +237,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -1.44, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 500), - ], + fontVariations: [FontVariation('wght', 500)], ); static const headlineLargeBold = TextStyle( @@ -289,9 +249,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -1.44, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 700), - ], + fontVariations: [FontVariation('wght', 700)], ); static const headlineMediumThin = TextStyle( @@ -303,9 +261,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -0.64, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 300), - ], + fontVariations: [FontVariation('wght', 300)], ); static const headlineMediumMedium = TextStyle( @@ -317,9 +273,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -0.64, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 500), - ], + fontVariations: [FontVariation('wght', 500)], ); static const headlineMediumBold = TextStyle( @@ -331,9 +285,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -0.64, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 700), - ], + fontVariations: [FontVariation('wght', 700)], ); static const headlineSmallThin = TextStyle( @@ -345,9 +297,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -0.48, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 300), - ], + fontVariations: [FontVariation('wght', 300)], ); static const headlineSmallMedium = TextStyle( @@ -359,9 +309,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -0.48, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 500), - ], + fontVariations: [FontVariation('wght', 500)], ); static const headlineSmallBold = TextStyle( @@ -373,9 +321,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -0.48, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 700), - ], + fontVariations: [FontVariation('wght', 700)], ); static const textSmallThin = TextStyle( @@ -387,9 +333,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: 0, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 300), - ], + fontVariations: [FontVariation('wght', 300)], ); static const textSmallMedium = TextStyle( @@ -401,9 +345,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: 0, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 500), - ], + fontVariations: [FontVariation('wght', 500)], ); static const textSmallBold = TextStyle( @@ -415,9 +357,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: 0, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 700), - ], + fontVariations: [FontVariation('wght', 700)], ); static const textExtraSmallThin = TextStyle( @@ -429,9 +369,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: 0, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 300), - ], + fontVariations: [FontVariation('wght', 300)], ); static const textExtraSmallMedium = TextStyle( @@ -443,9 +381,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: 0, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 500), - ], + fontVariations: [FontVariation('wght', 500)], ); static const textExtraSmallBold = TextStyle( @@ -457,9 +393,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: 0, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 700), - ], + fontVariations: [FontVariation('wght', 700)], ); static const textLargeThin = TextStyle( @@ -471,9 +405,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: 0, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 300), - ], + fontVariations: [FontVariation('wght', 300)], ); static const textLargeMedium = TextStyle( @@ -485,9 +417,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: 0, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 500), - ], + fontVariations: [FontVariation('wght', 500)], ); static const textLargeBold = TextStyle( @@ -499,9 +429,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: 0, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 700), - ], + fontVariations: [FontVariation('wght', 700)], ); static const textMediumThin = TextStyle( @@ -513,9 +441,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: 0, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 300), - ], + fontVariations: [FontVariation('wght', 300)], ); static const textMediumMedium = TextStyle( @@ -527,9 +453,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: 0, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 500), - ], + fontVariations: [FontVariation('wght', 500)], ); static const textMediumBold = TextStyle( @@ -541,9 +465,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: 0, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 700), - ], + fontVariations: [FontVariation('wght', 700)], ); static const textXlThin = TextStyle( @@ -555,9 +477,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: 0, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 300), - ], + fontVariations: [FontVariation('wght', 300)], ); static const textXlMedium = TextStyle( @@ -569,9 +489,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: 0, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 500), - ], + fontVariations: [FontVariation('wght', 500)], ); static const textXlBold = TextStyle( @@ -583,9 +501,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: 0, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 700), - ], + fontVariations: [FontVariation('wght', 700)], ); static const bannerLMedium = TextStyle( @@ -597,9 +513,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -16, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 600), - ], + fontVariations: [FontVariation('wght', 600)], ); static const bannerMMedium = TextStyle( @@ -611,9 +525,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -12, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 600), - ], + fontVariations: [FontVariation('wght', 600)], ); static const metaTitle = TextStyle( @@ -624,9 +536,7 @@ class AppTypography { decoration: TextDecoration.none, letterSpacing: -4.48, leadingDistribution: TextLeadingDistribution.even, - fontVariations: [ - FontVariation('wght', 590), - ], + fontVariations: [FontVariation('wght', 590)], ); AppTypography._(); diff --git a/lib/src/core/media/create_media_actions.dart b/lib/src/core/media/create_media_actions.dart index ad3819a..0e596d5 100644 --- a/lib/src/core/media/create_media_actions.dart +++ b/lib/src/core/media/create_media_actions.dart @@ -103,9 +103,7 @@ class CreateMediaActions { .openStoryImageEditor(context, pickedImage); if (editedImage != null && context.mounted) { // Post directly - await context.router.push( - StoryPostRoute(imageFile: editedImage), - ); + await context.router.push(StoryPostRoute(imageFile: editedImage)); } } } else { @@ -113,10 +111,7 @@ class CreateMediaActions { final pickedImages = await ImagePicker().pickMultiImage(limit: 12); if (context.mounted && pickedImages.isNotEmpty) { await context.router.push( - ImageReviewRoute( - imageFiles: pickedImages, - storyMode: storyMode, - ), + ImageReviewRoute(imageFiles: pickedImages, storyMode: storyMode), ); } } diff --git a/lib/src/core/network/atproto/data/adapters/bsky/feed_adapter.dart b/lib/src/core/network/atproto/data/adapters/bsky/feed_adapter.dart index 15d6794..b854ac4 100644 --- a/lib/src/core/network/atproto/data/adapters/bsky/feed_adapter.dart +++ b/lib/src/core/network/atproto/data/adapters/bsky/feed_adapter.dart @@ -269,10 +269,7 @@ class BskyFeedAdapter { final text = record['text'] as String? ?? ''; final facets = record['facets'] as List? ?? []; - record['caption'] = { - 'text': text, - 'facets': facets, - }; + record['caption'] = {'text': text, 'facets': facets}; record[r'$type'] = 'so.sprk.feed.post'; @@ -403,10 +400,7 @@ class BskyFeedAdapter { switch (media) { case MediaImage(:final image, :final alt): // Convert single Spark image to Bluesky embed images - final bskyImage = EmbedImagesImage( - alt: alt ?? '', - image: image, - ); + final bskyImage = EmbedImagesImage(alt: alt ?? '', image: image); return UFeedPostEmbed.embedImages( data: EmbedImages(images: [bskyImage]), ); @@ -462,10 +456,7 @@ class BskyFeedAdapter { return FeedPostRecord( text: text, createdAt: createdAt, - reply: ReplyRef( - root: reply.root, - parent: reply.parent, - ), + reply: ReplyRef(root: reply.root, parent: reply.parent), embed: embed, ); } @@ -642,10 +633,7 @@ class BskyFeedAdapter { /// Check if a FeedViewPost is a reply bool _feedViewPostIsReply(FeedViewPost feedViewPost) { - return feedViewPost.map( - post: (p) => p.reply != null, - reply: (r) => true, - ); + return feedViewPost.map(post: (p) => p.reply != null, reply: (r) => true); } /// Process raw Bluesky FeedViewPost list and convert to Spark format diff --git a/lib/src/core/network/atproto/data/models/feed_models.dart b/lib/src/core/network/atproto/data/models/feed_models.dart index 00ae142..0dacb64 100644 --- a/lib/src/core/network/atproto/data/models/feed_models.dart +++ b/lib/src/core/network/atproto/data/models/feed_models.dart @@ -44,9 +44,8 @@ Map _storyRecordToJson(StoryRecord record) => record.toJson(); @freezed abstract class GeneratorViewerState with _$GeneratorViewerState { @JsonSerializable(explicitToJson: true) - const factory GeneratorViewerState({ - @AtUriConverter() AtUri? like, - }) = _GeneratorViewerState; + const factory GeneratorViewerState({@AtUriConverter() AtUri? like}) = + _GeneratorViewerState; const GeneratorViewerState._(); factory GeneratorViewerState.fromJson(Map json) => @@ -95,9 +94,8 @@ abstract class Feed with _$Feed { @freezed abstract class SkeletonFeedPost with _$SkeletonFeedPost { @JsonSerializable(explicitToJson: true) - const factory SkeletonFeedPost({ - @AtUriConverter() required AtUri uri, - }) = _SkeletonFeedPost; + const factory SkeletonFeedPost({@AtUriConverter() required AtUri uri}) = + _SkeletonFeedPost; factory SkeletonFeedPost.fromJson(Map json) => _$SkeletonFeedPostFromJson(json); @@ -124,10 +122,8 @@ sealed class FeedViewPost with _$FeedViewPost { @FreezedUnionValue('so.sprk.feed.defs#feedPostView') @JsonSerializable(explicitToJson: true) - const factory FeedViewPost.post({ - required PostView post, - ReplyRef? reply, - }) = FeedViewPostPost; + const factory FeedViewPost.post({required PostView post, ReplyRef? reply}) = + FeedViewPostPost; @FreezedUnionValue('so.sprk.feed.defs#feedReplyView') @JsonSerializable(explicitToJson: true) @@ -142,34 +138,22 @@ sealed class FeedViewPost with _$FeedViewPost { PostView? get asPost => mapOrNull(post: (p) => p.post); ReplyView? get asReply => mapOrNull(reply: (r) => r.reply); - ProfileViewBasic get author => map( - post: (p) => p.post.author, - reply: (r) => r.reply.author, - ); + ProfileViewBasic get author => + map(post: (p) => p.post.author, reply: (r) => r.reply.author); - AtUri get uri => map( - post: (p) => p.post.uri, - reply: (r) => r.reply.uri, - ); + AtUri get uri => map(post: (p) => p.post.uri, reply: (r) => r.reply.uri); - String get cid => map( - post: (p) => p.post.cid, - reply: (r) => r.reply.cid, - ); + String get cid => map(post: (p) => p.post.cid, reply: (r) => r.reply.cid); - MediaView? get media => map( - post: (p) => p.post.displayMedia, - reply: (r) => r.reply.media, - ); + MediaView? get media => + map(post: (p) => p.post.displayMedia, reply: (r) => r.reply.media); ViewerState? get viewerState => mapOrNull(post: (p) => p.post.viewer); ReplyViewerState? get replyViewerState => mapOrNull(reply: (r) => r.reply.viewer); - String get displayText => map( - post: (p) => p.post.displayText, - reply: (r) => r.reply.displayText, - ); + String get displayText => + map(post: (p) => p.post.displayText, reply: (r) => r.reply.displayText); List get displayFacets => map( post: (p) => p.post.displayFacets, @@ -180,10 +164,8 @@ sealed class FeedViewPost with _$FeedViewPost { @freezed abstract class FeedView with _$FeedView { @JsonSerializable(explicitToJson: true) - const factory FeedView({ - required List feed, - String? cursor, - }) = _FeedView; + const factory FeedView({required List feed, String? cursor}) = + _FeedView; const FeedView._(); factory FeedView.fromJson(Map json) => diff --git a/lib/src/core/network/atproto/data/models/labeler_models.dart b/lib/src/core/network/atproto/data/models/labeler_models.dart index 52d09e6..4ca11d6 100644 --- a/lib/src/core/network/atproto/data/models/labeler_models.dart +++ b/lib/src/core/network/atproto/data/models/labeler_models.dart @@ -23,8 +23,7 @@ const defaultLabels = [ enum Blurs { content('content'), media('media'), - none('none') - ; + none('none'); final String value; const Blurs(this.value); @@ -40,8 +39,7 @@ enum Blurs { enum Severity { alert('alert'), inform('inform'), - none('none') - ; + none('none'); final String value; const Severity(this.value); @@ -57,8 +55,7 @@ enum Severity { enum Setting { hide('hide'), warn('warn'), - ignore('ignore') - ; + ignore('ignore'); final String value; const Setting(this.value); diff --git a/lib/src/core/network/atproto/data/models/notification_models.dart b/lib/src/core/network/atproto/data/models/notification_models.dart index 6657cb9..84bc7d6 100644 --- a/lib/src/core/network/atproto/data/models/notification_models.dart +++ b/lib/src/core/network/atproto/data/models/notification_models.dart @@ -45,9 +45,8 @@ abstract class ListNotificationsResponse with _$ListNotificationsResponse { @freezed abstract class UnreadCountResponse with _$UnreadCountResponse { @JsonSerializable(explicitToJson: true) - const factory UnreadCountResponse({ - required int count, - }) = _UnreadCountResponse; + const factory UnreadCountResponse({required int count}) = + _UnreadCountResponse; const UnreadCountResponse._(); factory UnreadCountResponse.fromJson(Map json) => @@ -57,9 +56,8 @@ abstract class UnreadCountResponse with _$UnreadCountResponse { @freezed abstract class UpdateSeenRequest with _$UpdateSeenRequest { @JsonSerializable(explicitToJson: true) - const factory UpdateSeenRequest({ - required DateTime seenAt, - }) = _UpdateSeenRequest; + const factory UpdateSeenRequest({required DateTime seenAt}) = + _UpdateSeenRequest; const UpdateSeenRequest._(); factory UpdateSeenRequest.fromJson(Map json) => diff --git a/lib/src/core/network/atproto/data/models/pref_models.dart b/lib/src/core/network/atproto/data/models/pref_models.dart index 7fad110..e5dce17 100644 --- a/lib/src/core/network/atproto/data/models/pref_models.dart +++ b/lib/src/core/network/atproto/data/models/pref_models.dart @@ -7,9 +7,7 @@ part 'pref_models.g.dart'; @freezed abstract class Preferences with _$Preferences { @JsonSerializable(explicitToJson: true) - factory Preferences({ - required List preferences, - }) { + factory Preferences({required List preferences}) { final contentLabelPrefs = []; final savedFeeds = []; final labelers = []; @@ -123,17 +121,15 @@ abstract class Preference with _$Preference { @FreezedUnionValue('so.sprk.actor.defs#savedFeedsPref') @JsonSerializable(explicitToJson: true) - const factory Preference.savedFeedsPref({ - required List items, - }) = _SavedFeedsPref; + const factory Preference.savedFeedsPref({required List items}) = + _SavedFeedsPref; bool isSavedFeedsPref(Preference preference) => preference.mapOrNull(savedFeedsPref: (pref) => pref) != null; @FreezedUnionValue('so.sprk.actor.defs#personalDetailsPref') @JsonSerializable(explicitToJson: true) - const factory Preference.personalDetailsPref({ - required DateTime? birthDate, - }) = _PersonalDetailsPref; + const factory Preference.personalDetailsPref({required DateTime? birthDate}) = + _PersonalDetailsPref; bool isPersonalDetailsPref(Preference preference) => preference.mapOrNull(personalDetailsPref: (pref) => pref) != null; @@ -161,17 +157,15 @@ abstract class Preference with _$Preference { @FreezedUnionValue('so.sprk.actor.defs#interestsPref') @JsonSerializable(explicitToJson: true) - const factory Preference.interestsPref({ - required List tags, - }) = _InterestsPref; + const factory Preference.interestsPref({required List tags}) = + _InterestsPref; bool isInterestsPref(Preference preference) => preference.mapOrNull(interestsPref: (pref) => pref) != null; @FreezedUnionValue('so.sprk.actor.defs#mutedWordsPref') @JsonSerializable(explicitToJson: true) - const factory Preference.mutedWordsPref({ - required List words, - }) = _MutedWordsPref; + const factory Preference.mutedWordsPref({required List words}) = + _MutedWordsPref; bool isMutedWordsPref(Preference preference) => preference.mapOrNull(mutedWordsPref: (pref) => pref) != null; @@ -253,9 +247,7 @@ abstract class MutedWord with _$MutedWord { @freezed abstract class LabelerPrefItem with _$LabelerPrefItem { @JsonSerializable(explicitToJson: true) - const factory LabelerPrefItem({ - required String did, - }) = _LabelerPrefItem; + const factory LabelerPrefItem({required String did}) = _LabelerPrefItem; const LabelerPrefItem._(); factory LabelerPrefItem.fromJson(Map json) => diff --git a/lib/src/core/network/atproto/data/models/record_models.dart b/lib/src/core/network/atproto/data/models/record_models.dart index 4ef12e6..d911428 100644 --- a/lib/src/core/network/atproto/data/models/record_models.dart +++ b/lib/src/core/network/atproto/data/models/record_models.dart @@ -124,17 +124,11 @@ sealed class Media with _$Media { // Spark media types (new schema) @FreezedUnionValue('so.sprk.media.video') @JsonSerializable(explicitToJson: true) - const factory Media.video({ - required Blob video, - String? alt, - }) = MediaVideo; + const factory Media.video({required Blob video, String? alt}) = MediaVideo; @FreezedUnionValue('so.sprk.media.image') @JsonSerializable(explicitToJson: true) - const factory Media.image({ - required Blob image, - String? alt, - }) = MediaImage; + const factory Media.image({required Blob image, String? alt}) = MediaImage; @FreezedUnionValue('so.sprk.media.images') @JsonSerializable(explicitToJson: true) @@ -143,10 +137,8 @@ sealed class Media with _$Media { // Bluesky embed types @FreezedUnionValue('app.bsky.embed.video') @JsonSerializable(explicitToJson: true) - const factory Media.bskyVideo({ - required Blob video, - String? alt, - }) = MediaBskyVideo; + const factory Media.bskyVideo({required Blob video, String? alt}) = + MediaBskyVideo; @FreezedUnionValue('app.bsky.embed.images') @JsonSerializable(explicitToJson: true) @@ -167,9 +159,8 @@ sealed class Media with _$Media { @FreezedUnionValue('app.bsky.embed.external') @JsonSerializable(explicitToJson: true) - const factory Media.bskyExternal({ - required EmbedExternal external, - }) = MediaBskyExternal; + const factory Media.bskyExternal({required EmbedExternal external}) = + MediaBskyExternal; factory Media.fromJson(Map json) => _$MediaFromJson(json); } diff --git a/lib/src/core/network/atproto/data/models/sound_models.dart b/lib/src/core/network/atproto/data/models/sound_models.dart index df264c7..16363bf 100644 --- a/lib/src/core/network/atproto/data/models/sound_models.dart +++ b/lib/src/core/network/atproto/data/models/sound_models.dart @@ -30,10 +30,7 @@ Map _audioRecordToJson(AudioRecord record) => record.toJson(); @freezed abstract class AudioDetails with _$AudioDetails { @JsonSerializable(explicitToJson: true) - const factory AudioDetails({ - String? artist, - String? title, - }) = _AudioDetails; + const factory AudioDetails({String? artist, String? title}) = _AudioDetails; factory AudioDetails.fromJson(Map json) => _$AudioDetailsFromJson(json); diff --git a/lib/src/core/network/atproto/data/repositories/actor_repository_impl.dart b/lib/src/core/network/atproto/data/repositories/actor_repository_impl.dart index cee3dc8..ed55554 100644 --- a/lib/src/core/network/atproto/data/repositories/actor_repository_impl.dart +++ b/lib/src/core/network/atproto/data/repositories/actor_repository_impl.dart @@ -64,9 +64,7 @@ class ActorRepositoryImpl implements ActorRepository { jsonDecode(utf8.decode(uint8 as List)) as Map, ); _logger.d('Profile retrieved successfully from Spark'); - return ProfileViewDetailed.fromJson( - result.data as Map, - ); + return ProfileViewDetailed.fromJson(result.data as Map); }); } @@ -132,10 +130,7 @@ class ActorRepositoryImpl implements ActorRepository { final clampedLimit = limit.clamp(1, 100); final result = await atproto.get( NSID.parse('so.sprk.actor.searchActorsTypeahead'), - parameters: { - 'q': query, - 'limit': clampedLimit.toString(), - }, + parameters: {'q': query, 'limit': clampedLimit.toString()}, headers: {'atproto-proxy': _client.sprkDid}, to: (jsonMap) => jsonMap, adaptor: (uint8) => diff --git a/lib/src/core/network/atproto/data/repositories/feed_repository_impl.dart b/lib/src/core/network/atproto/data/repositories/feed_repository_impl.dart index 2ec75fe..fd0e43e 100644 --- a/lib/src/core/network/atproto/data/repositories/feed_repository_impl.dart +++ b/lib/src/core/network/atproto/data/repositories/feed_repository_impl.dart @@ -327,10 +327,9 @@ class FeedRepositoryImpl implements FeedRepository { if (oauthSession == null) { throw Exception('No OAuth session available'); } - final resultBsky = - await bsky.Bluesky.fromOAuthSession( - oauthSession, - ).feed.getAuthorFeed( + final resultBsky = await bsky.Bluesky.fromOAuthSession(oauthSession) + .feed + .getAuthorFeed( actor: actorUri.hostname, limit: limit, cursor: cursor, @@ -1122,9 +1121,7 @@ class FeedRepositoryImpl implements FeedRepository { final byteData = await image.toByteData(format: ui.ImageByteFormat.png); if (byteData == null) { - _logger.w( - 'Failed to encode image $imageName with dart:ui codec', - ); + _logger.w('Failed to encode image $imageName with dart:ui codec'); return null; } return byteData.buffer.asUint8List(); @@ -1228,9 +1225,7 @@ class FeedRepositoryImpl implements FeedRepository { Uri.parse( '${AppConfig.videoServiceUrl}/xrpc/so.sprk.video.getJobStatus', ).replace( - queryParameters: { - 'jobId': responseData['jobStatus']?['jobId'], - }, + queryParameters: {'jobId': responseData['jobStatus']?['jobId']}, ), headers: { 'Authorization': 'Bearer $serviceToken', @@ -1328,10 +1323,7 @@ class FeedRepositoryImpl implements FeedRepository { if (linkUrl != null) { final linkStart = text.isEmpty ? 0 : text.length; facets = [ - bskyFeedAdapter.createLinkFacet( - linkUrl: linkUrl, - byteStart: linkStart, - ), + bskyFeedAdapter.createLinkFacet(linkUrl: linkUrl, byteStart: linkStart), ]; } @@ -1353,10 +1345,7 @@ class FeedRepositoryImpl implements FeedRepository { } /// Prepare text for Bluesky post, handling link addition and truncation - String _prepareTextWithLink({ - required String text, - String? linkUrl, - }) { + String _prepareTextWithLink({required String text, String? linkUrl}) { if (linkUrl == null) { return text; } @@ -1688,10 +1677,7 @@ class FeedRepositoryImpl implements FeedRepository { throw Exception('AtProto not initialized'); } - final parameters = { - 'actor': actor, - 'limit': limit, - }; + final parameters = {'actor': actor, 'limit': limit}; if (cursor != null) { parameters['cursor'] = cursor; @@ -1766,10 +1752,7 @@ class FeedRepositoryImpl implements FeedRepository { throw Exception('AtProto not initialized'); } - final parameters = { - 'actor': actor, - 'limit': limit, - }; + final parameters = {'actor': actor, 'limit': limit}; if (cursor != null) { parameters['cursor'] = cursor; diff --git a/lib/src/core/network/atproto/data/repositories/notification_repository_impl.dart b/lib/src/core/network/atproto/data/repositories/notification_repository_impl.dart index 1ad1062..26ea59f 100644 --- a/lib/src/core/network/atproto/data/repositories/notification_repository_impl.dart +++ b/lib/src/core/network/atproto/data/repositories/notification_repository_impl.dart @@ -42,9 +42,7 @@ class NotificationRepositoryImpl implements NotificationRepository { throw Exception('AtProto not initialized'); } - final parameters = { - 'limit': limit.toString(), - }; + final parameters = {'limit': limit.toString()}; if (cursor != null && cursor.isNotEmpty) { parameters['cursor'] = cursor; } diff --git a/lib/src/core/network/atproto/data/repositories/repo_repository_impl.dart b/lib/src/core/network/atproto/data/repositories/repo_repository_impl.dart index 5383307..c17af92 100644 --- a/lib/src/core/network/atproto/data/repositories/repo_repository_impl.dart +++ b/lib/src/core/network/atproto/data/repositories/repo_repository_impl.dart @@ -280,9 +280,7 @@ class RepoRepositoryImpl implements RepoRepository { 'service: $modServiceDid', ); - final headers = { - 'atproto-proxy': modServiceDid, - }; + final headers = {'atproto-proxy': modServiceDid}; try { final response = await atproto.post( diff --git a/lib/src/core/network/atproto/data/repositories/sound_repository_impl.dart b/lib/src/core/network/atproto/data/repositories/sound_repository_impl.dart index 25d5cab..62b2501 100644 --- a/lib/src/core/network/atproto/data/repositories/sound_repository_impl.dart +++ b/lib/src/core/network/atproto/data/repositories/sound_repository_impl.dart @@ -106,9 +106,7 @@ class SoundRepositoryImpl implements SoundRepository { throw Exception('AtProto not initialized'); } - final parameters = { - 'limit': limit, - }; + final parameters = {'limit': limit}; if (cursor != null) { parameters['cursor'] = cursor; } diff --git a/lib/src/core/network/atproto/data/repositories/story_repository.dart b/lib/src/core/network/atproto/data/repositories/story_repository.dart index eaa91ed..8acfc15 100644 --- a/lib/src/core/network/atproto/data/repositories/story_repository.dart +++ b/lib/src/core/network/atproto/data/repositories/story_repository.dart @@ -23,10 +23,7 @@ abstract class StoryRepository { Future< ({String? cursor, Map> storiesByAuthor}) > - getStoriesTimeline({ - int limit = 30, - String? cursor, - }); + getStoriesTimeline({int limit = 30, String? cursor}); /// Gets story views for a specified list of stories (by AT-URI). /// diff --git a/lib/src/core/network/atproto/data/repositories/story_repository_impl.dart b/lib/src/core/network/atproto/data/repositories/story_repository_impl.dart index 419d572..db43737 100644 --- a/lib/src/core/network/atproto/data/repositories/story_repository_impl.dart +++ b/lib/src/core/network/atproto/data/repositories/story_repository_impl.dart @@ -46,10 +46,7 @@ class StoryRepositoryImpl implements StoryRepository { Future< ({String? cursor, Map> storiesByAuthor}) > - getStoriesTimeline({ - int limit = 30, - String? cursor, - }) { + getStoriesTimeline({int limit = 30, String? cursor}) { return _client.executeWithRetry(() async { if (!_client.authRepository.isAuthenticated) { throw Exception('Not authenticated'); diff --git a/lib/src/core/network/messages/data/models/message_models.dart b/lib/src/core/network/messages/data/models/message_models.dart index bff9fe1..c353593 100644 --- a/lib/src/core/network/messages/data/models/message_models.dart +++ b/lib/src/core/network/messages/data/models/message_models.dart @@ -38,9 +38,7 @@ abstract class Message with _$Message { @freezed abstract class SenderView with _$SenderView { @JsonSerializable(explicitToJson: true) - const factory SenderView({ - required String did, - }) = _SenderView; + const factory SenderView({required String did}) = _SenderView; const SenderView._(); factory SenderView.fromJson(Map json) => diff --git a/lib/src/core/network/messages/data/repository/messages_repository_xrpc.dart b/lib/src/core/network/messages/data/repository/messages_repository_xrpc.dart index af96aca..9adc200 100644 --- a/lib/src/core/network/messages/data/repository/messages_repository_xrpc.dart +++ b/lib/src/core/network/messages/data/repository/messages_repository_xrpc.dart @@ -27,9 +27,9 @@ class MessagesRepositoryXrpc implements MessagesRepository { ) async { try { final token = await _serviceAuthHelper.getServiceToken(nsid); - final url = Uri.parse('$_baseUrl/xrpc/$nsid').replace( - queryParameters: params.isEmpty ? null : params, - ); + final url = Uri.parse( + '$_baseUrl/xrpc/$nsid', + ).replace(queryParameters: params.isEmpty ? null : params); final response = await http.get( url, @@ -115,10 +115,9 @@ class MessagesRepositoryXrpc implements MessagesRepository { @override Future getConversation(String convoId) async { - final data = await _callQuery( - 'so.sprk.chat.getConvo', - {'convoId': convoId}, - ); + final data = await _callQuery('so.sprk.chat.getConvo', { + 'convoId': convoId, + }); return ConvoView.fromJson(data['convo'] as Map); } @@ -127,9 +126,7 @@ class MessagesRepositoryXrpc implements MessagesRepository { Future getConvoForMembers(List members) async { // Build URL with repeated members parameters // Need to manually construct query string for repeated params - final baseUri = Uri.parse( - '$_baseUrl/xrpc/so.sprk.chat.getConvoForMembers', - ); + final baseUri = Uri.parse('$_baseUrl/xrpc/so.sprk.chat.getConvoForMembers'); final queryParts = members .map((m) => 'members=${Uri.encodeComponent(m)}') .join('&'); @@ -141,10 +138,7 @@ class MessagesRepositoryXrpc implements MessagesRepository { final response = await http.get( url, - headers: { - 'Accept': 'application/json', - 'Authorization': 'Bearer $token', - }, + headers: {'Accept': 'application/json', 'Authorization': 'Bearer $token'}, ); if (response.statusCode == 200) { @@ -230,20 +224,14 @@ class MessagesRepositoryXrpc implements MessagesRepository { 'value': value, }; - final data = await _callProcedure( - 'so.sprk.chat.removeReaction', - body, - ); + final data = await _callProcedure('so.sprk.chat.removeReaction', body); return MessageView.fromJson(data); } @override Future updateRead(String convoId, String messageId) async { - final body = { - 'convoId': convoId, - 'messageId': messageId, - }; + final body = {'convoId': convoId, 'messageId': messageId}; final data = await _callProcedure('so.sprk.chat.updateRead', body); diff --git a/lib/src/core/pro_image_editor/story_image_editor_configs.dart b/lib/src/core/pro_image_editor/story_image_editor_configs.dart index 8254cc2..251c079 100644 --- a/lib/src/core/pro_image_editor/story_image_editor_configs.dart +++ b/lib/src/core/pro_image_editor/story_image_editor_configs.dart @@ -69,17 +69,13 @@ class StoryImageEditorConfigs { ], widgets: MainEditorWidgets( removeLayerArea: - ( - removeAreaKey, - editor, - rebuildStream, - isLayerBeingTransformed, - ) => VideoEditorRemoveArea( - removeAreaKey: removeAreaKey, - editor: editor, - rebuildStream: rebuildStream, - isLayerBeingTransformed: isLayerBeingTransformed, - ), + (removeAreaKey, editor, rebuildStream, isLayerBeingTransformed) => + VideoEditorRemoveArea( + removeAreaKey: removeAreaKey, + editor: editor, + rebuildStream: rebuildStream, + isLayerBeingTransformed: isLayerBeingTransformed, + ), appBar: (editor, rebuildStream) => null, bottomBar: (editor, rebuildStream, key) => ReactiveWidget( key: key, @@ -242,9 +238,7 @@ class StoryImageEditorConfigs { ), blurEditor: BlurEditorConfigs( maxBlur: 25, - style: const BlurEditorStyle( - background: AppColors.greyBlack, - ), + style: const BlurEditorStyle(background: AppColors.greyBlack), widgets: BlurEditorWidgets( appBar: (blurEditor, rebuildStream) => null, bottomBar: (editorState, rebuildStream) { @@ -279,19 +273,14 @@ class StoryImageEditorConfigs { setLayer: setLayer, scrollController: scrollController, ), - style: const StickerEditorStyle( - showDragHandle: false, - ), + style: const StickerEditorStyle(showDragHandle: false), ), i18n: const I18n( paintEditor: I18nPaintEditor( changeOpacity: 'Opacity', lineWidth: 'Thickness', ), - textEditor: I18nTextEditor( - backgroundMode: 'Mode', - textAlign: 'Align', - ), + textEditor: I18nTextEditor(backgroundMode: 'Mode', textAlign: 'Align'), ), ); } diff --git a/lib/src/core/pro_image_editor/ui/story_image_editor_page.dart b/lib/src/core/pro_image_editor/ui/story_image_editor_page.dart index 74ae75b..8908e7a 100644 --- a/lib/src/core/pro_image_editor/ui/story_image_editor_page.dart +++ b/lib/src/core/pro_image_editor/ui/story_image_editor_page.dart @@ -22,10 +22,7 @@ import 'package:spark/src/core/pro_image_editor/utils/story_image_cropper.dart'; /// - NO crop/rotate tools (to maintain aspect ratio) /// - Custom UI matching the app's design language class StoryImageEditorPage extends StatefulWidget { - const StoryImageEditorPage({ - required this.imageFile, - super.key, - }); + const StoryImageEditorPage({required this.imageFile, super.key}); /// The source image file to edit. final File imageFile; @@ -88,10 +85,8 @@ class _StoryImageEditorPageState extends State { // Initialize editor config _configs = StoryImageEditorConfigs.build( useMaterialDesign: _useMaterialDesign, - imagePreviewBuilder: () => Image.file( - _croppedImageFile!, - fit: BoxFit.cover, - ), + imagePreviewBuilder: () => + Image.file(_croppedImageFile!, fit: BoxFit.cover), ); if (mounted) { @@ -117,13 +112,9 @@ class _StoryImageEditorPageState extends State { await file.writeAsBytes(bytes, flush: true); if (mounted) { - Navigator.of(context).pop( - XFile( - file.path, - mimeType: 'image/png', - name: filename, - ), - ); + Navigator.of( + context, + ).pop(XFile(file.path, mimeType: 'image/png', name: filename)); } } @@ -297,13 +288,9 @@ class _StoryBlankCanvasEditorPageState await file.writeAsBytes(bytes, flush: true); if (mounted) { - Navigator.of(context).pop( - XFile( - file.path, - mimeType: 'image/png', - name: filename, - ), - ); + Navigator.of( + context, + ).pop(XFile(file.path, mimeType: 'image/png', name: filename)); } } @@ -357,10 +344,7 @@ class _StoryBlankCanvasEditorPageState 'layers': [layer.toMap()], }, ], - 'imgSize': { - 'width': storySize.width, - 'height': storySize.height, - }, + 'imgSize': {'width': storySize.width, 'height': storySize.height}, 'lastRenderedImgSize': { 'width': storySize.width, 'height': storySize.height, @@ -395,9 +379,7 @@ class _StoryBlankCanvasEditorPageState if (!_isInitialized) { return const Scaffold( backgroundColor: Colors.black, - body: Center( - child: CircularProgressIndicator(color: Colors.white), - ), + body: Center(child: CircularProgressIndicator(color: Colors.white)), ); } diff --git a/lib/src/core/pro_image_editor/ui/widgets/story_editor_bottom_section.dart b/lib/src/core/pro_image_editor/ui/widgets/story_editor_bottom_section.dart index d35b2ba..dc474d0 100644 --- a/lib/src/core/pro_image_editor/ui/widgets/story_editor_bottom_section.dart +++ b/lib/src/core/pro_image_editor/ui/widgets/story_editor_bottom_section.dart @@ -7,10 +7,7 @@ import 'package:spark/src/core/pro_image_editor/ui/widgets/story_editor_toolbar. /// /// Contains the toolbar with editing tools. class StoryEditorBottomSection extends StatelessWidget { - const StoryEditorBottomSection({ - required this.editor, - super.key, - }); + const StoryEditorBottomSection({required this.editor, super.key}); final ProImageEditorState editor; diff --git a/lib/src/core/pro_image_editor/ui/widgets/story_editor_toolbar.dart b/lib/src/core/pro_image_editor/ui/widgets/story_editor_toolbar.dart index 85e9923..bd39302 100644 --- a/lib/src/core/pro_image_editor/ui/widgets/story_editor_toolbar.dart +++ b/lib/src/core/pro_image_editor/ui/widgets/story_editor_toolbar.dart @@ -87,11 +87,7 @@ class _ToolbarItem extends StatelessWidget { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Icon( - icon, - color: AppColors.greyWhite, - size: 26, - ), + Icon(icon, color: AppColors.greyWhite, size: 26), const SizedBox(height: 4), Text( label, diff --git a/lib/src/core/pro_video_editor/models/video_editor_result.dart b/lib/src/core/pro_video_editor/models/video_editor_result.dart index 6839c08..ee223a2 100644 --- a/lib/src/core/pro_video_editor/models/video_editor_result.dart +++ b/lib/src/core/pro_video_editor/models/video_editor_result.dart @@ -4,10 +4,7 @@ import 'package:image_picker/image_picker.dart'; /// Result returned from the video editor containing the edited video /// and optional metadata about audio used. class VideoEditorResult { - const VideoEditorResult({ - required this.video, - this.soundRef, - }); + const VideoEditorResult({required this.video, this.soundRef}); /// The edited video file. final XFile video; diff --git a/lib/src/core/pro_video_editor/pro_video_editor_repository_impl.dart b/lib/src/core/pro_video_editor/pro_video_editor_repository_impl.dart index 02e3399..ab21b3e 100644 --- a/lib/src/core/pro_video_editor/pro_video_editor_repository_impl.dart +++ b/lib/src/core/pro_video_editor/pro_video_editor_repository_impl.dart @@ -60,11 +60,7 @@ class ProVideoEditorRepositoryImpl implements ProVideoEditorRepository { await file.writeAsBytes(bytes, flush: true); if (ctx.mounted) { Navigator.of(ctx).pop( - XFile( - file.path, - mimeType: 'image/jpeg', - name: filename, - ), + XFile(file.path, mimeType: 'image/jpeg', name: filename), ); } }, @@ -81,9 +77,7 @@ class ProVideoEditorRepositoryImpl implements ProVideoEditorRepository { EditorVideo video, ) async { return Navigator.of(context).push( - MaterialPageRoute( - builder: (_) => VideoEditorGroundedPage(video: video), - ), + MaterialPageRoute(builder: (_) => VideoEditorGroundedPage(video: video)), ); } diff --git a/lib/src/core/pro_video_editor/services/audio_helper_service.dart b/lib/src/core/pro_video_editor/services/audio_helper_service.dart index 936e3ae..288c8c2 100644 --- a/lib/src/core/pro_video_editor/services/audio_helper_service.dart +++ b/lib/src/core/pro_video_editor/services/audio_helper_service.dart @@ -8,9 +8,7 @@ import 'package:video_player/video_player.dart'; class AudioHelperService { /// Creates an instance of [AudioHelperService] for the /// given [videoController]. - AudioHelperService({ - required this.videoController, - }); + AudioHelperService({required this.videoController}); /// The internal audio player used to handle audio playback. final _audioPlayer = AudioPlayer(); @@ -32,9 +30,7 @@ class AudioHelperService { Future initialize() { return _audioPlayer.setAudioContext( AudioContext( - android: const AudioContextAndroid( - audioFocus: AndroidAudioFocus.none, - ), + android: const AudioContextAndroid(audioFocus: AndroidAudioFocus.none), iOS: AudioContextIOS( options: const { AVAudioSessionOptions.mixWithOthers, @@ -125,10 +121,7 @@ class AudioHelperService { /// Mutes all audio (both original and custom). Future muteAll() async { - await Future.wait([ - setVolume(0), - videoController.setVolume(0), - ]); + await Future.wait([setVolume(0), videoController.setVolume(0)]); } /// Restores audio based on current balance. diff --git a/lib/src/core/pro_video_editor/ui/video_editor_grounded_page.dart b/lib/src/core/pro_video_editor/ui/video_editor_grounded_page.dart index f67562c..8ea88d4 100644 --- a/lib/src/core/pro_video_editor/ui/video_editor_grounded_page.dart +++ b/lib/src/core/pro_video_editor/ui/video_editor_grounded_page.dart @@ -57,9 +57,7 @@ class _VideoEditorGroundedPageState extends State { final VideoEditorConfigs _videoConfigs = const VideoEditorConfigs( enableTrimBar: false, playTimeSmoothingDuration: Duration(milliseconds: 600), - widgets: VideoEditorWidgets( - headerToolbar: SizedBox.shrink(), - ), + widgets: VideoEditorWidgets(headerToolbar: SizedBox.shrink()), ); /// Indicates whether a seek operation is in progress. @@ -156,9 +154,7 @@ class _VideoEditorGroundedPageState extends State { if (updateClipThumbnails) { _configs.clipsEditor.clips.first = _configs.clipsEditor.clips.first - .copyWith( - thumbnails: temporaryThumbnails, - ); + .copyWith(thumbnails: temporaryThumbnails); } if (!mounted) return; @@ -219,9 +215,7 @@ class _VideoEditorGroundedPageState extends State { // Update clip duration and thumbnails after first frame _configs.clipsEditor.clips.first = _configs.clipsEditor.clips.first - .copyWith( - duration: _videoMetadata.duration, - ); + .copyWith(duration: _videoMetadata.duration); if (!widget.storyMode) { WidgetsBinding.instance.addPostFrameCallback((_) { _generateThumbnails(); @@ -298,12 +292,8 @@ class _VideoEditorGroundedPageState extends State { title: audio.title, subtitle: audio.author.handle, duration: const Duration(seconds: 9), - image: EditorImage( - networkUrl: audio.coverArt.toString(), - ), - audio: EditorAudio( - networkUrl: audio.audio?.toString(), - ), + image: EditorImage(networkUrl: audio.coverArt.toString()), + audio: EditorAudio(networkUrl: audio.audio?.toString()), ), ), ); diff --git a/lib/src/core/pro_video_editor/ui/widgets/audio/audio_edit_controls_section.dart b/lib/src/core/pro_video_editor/ui/widgets/audio/audio_edit_controls_section.dart index 9a2d958..0b1deea 100644 --- a/lib/src/core/pro_video_editor/ui/widgets/audio/audio_edit_controls_section.dart +++ b/lib/src/core/pro_video_editor/ui/widgets/audio/audio_edit_controls_section.dart @@ -163,11 +163,7 @@ class _AudioEditControlsSectionState extends State { color: color.withAlpha(80), borderRadius: BorderRadius.circular(8), ), - child: Icon( - _configs.icons.audioTrackDefaultIcon, - color: color, - size: 24, - ), + child: Icon(_configs.icons.audioTrackDefaultIcon, color: color, size: 24), ); } diff --git a/lib/src/core/pro_video_editor/ui/widgets/common/build_stickers.dart b/lib/src/core/pro_video_editor/ui/widgets/common/build_stickers.dart index 73c00ca..7353fb8 100644 --- a/lib/src/core/pro_video_editor/ui/widgets/common/build_stickers.dart +++ b/lib/src/core/pro_video_editor/ui/widgets/common/build_stickers.dart @@ -147,10 +147,7 @@ class _DragHandle extends StatelessWidget { } class _SheetHeader extends StatelessWidget { - const _SheetHeader({ - required this.title, - required this.onClose, - }); + const _SheetHeader({required this.title, required this.onClose}); final String title; final VoidCallback onClose; @@ -281,10 +278,7 @@ class _StickerGrid extends StatelessWidget { itemCount: _itemCount(categoryIndex), itemBuilder: (context, index) { final url = _stickerUrl(categoryIndex: categoryIndex, index: index); - return _StickerTile( - url: url, - onTap: () => onPickSticker(url), - ); + return _StickerTile(url: url, onTap: () => onPickSticker(url)); }, ), ); @@ -295,10 +289,7 @@ class _StickerGrid extends StatelessWidget { return max(12, 12 + offset % 12); } - String _stickerUrl({ - required int categoryIndex, - required int index, - }) { + String _stickerUrl({required int categoryIndex, required int index}) { final offset = categoryIndex * 20; final id = offset + (index + 3) * 3; return 'https://picsum.photos/id/$id/800'; @@ -306,10 +297,7 @@ class _StickerGrid extends StatelessWidget { } class _StickerTile extends StatelessWidget { - const _StickerTile({ - required this.url, - required this.onTap, - }); + const _StickerTile({required this.url, required this.onTap}); final String url; final VoidCallback onTap; @@ -347,9 +335,7 @@ class _StickerTile extends StatelessWidget { } class _StickerContent extends StatelessWidget { - const _StickerContent({ - required this.url, - }); + const _StickerContent({required this.url}); final String url; diff --git a/lib/src/core/pro_video_editor/ui/widgets/common/video_editor_configs_builder.dart b/lib/src/core/pro_video_editor/ui/widgets/common/video_editor_configs_builder.dart index f4d3066..3ac566c 100644 --- a/lib/src/core/pro_video_editor/ui/widgets/common/video_editor_configs_builder.dart +++ b/lib/src/core/pro_video_editor/ui/widgets/common/video_editor_configs_builder.dart @@ -72,9 +72,7 @@ class VideoEditorConfigsBuilder { initialMuted: true, enableTrimBar: false, playTimeSmoothingDuration: Duration(milliseconds: 300), - widgets: VideoEditorWidgets( - headerToolbar: SizedBox.shrink(), - ), + widgets: VideoEditorWidgets(headerToolbar: SizedBox.shrink()), ), }) { final tools = storyMode ? _storyModeTools : _fullTools; @@ -96,17 +94,13 @@ class VideoEditorConfigsBuilder { tools: tools, widgets: MainEditorWidgets( removeLayerArea: - ( - removeAreaKey, - editor, - rebuildStream, - isLayerBeingTransformed, - ) => VideoEditorRemoveArea( - removeAreaKey: removeAreaKey, - editor: editor, - rebuildStream: rebuildStream, - isLayerBeingTransformed: isLayerBeingTransformed, - ), + (removeAreaKey, editor, rebuildStream, isLayerBeingTransformed) => + VideoEditorRemoveArea( + removeAreaKey: removeAreaKey, + editor: editor, + rebuildStream: rebuildStream, + isLayerBeingTransformed: isLayerBeingTransformed, + ), appBar: (editor, rebuildStream) => null, bottomBar: (editor, rebuildStream, key) => ReactiveWidget( key: key, @@ -339,9 +333,7 @@ class VideoEditorConfigsBuilder { ), blurEditor: BlurEditorConfigs( maxBlur: 25, - style: const BlurEditorStyle( - background: AppColors.greyBlack, - ), + style: const BlurEditorStyle(background: AppColors.greyBlack), widgets: BlurEditorWidgets( appBar: (blurEditor, rebuildStream) => null, bottomBar: (editorState, rebuildStream) { @@ -376,19 +368,14 @@ class VideoEditorConfigsBuilder { setLayer: setLayer, scrollController: scrollController, ), - style: const StickerEditorStyle( - showDragHandle: false, - ), + style: const StickerEditorStyle(showDragHandle: false), ), i18n: const I18n( paintEditor: I18nPaintEditor( changeOpacity: 'Opacity', lineWidth: 'Thickness', ), - textEditor: I18nTextEditor( - backgroundMode: 'Mode', - textAlign: 'Align', - ), + textEditor: I18nTextEditor(backgroundMode: 'Mode', textAlign: 'Align'), ), // audioEditor: const AudioEditorConfigs( // // Audio selection is now handled by the custom bottom sheet @@ -397,9 +384,7 @@ class VideoEditorConfigsBuilder { // audioTracks: const [], // ), clipsEditor: ClipsEditorConfigs( - style: const ClipsEditorStyle( - reversedClipsList: true, - ), + style: const ClipsEditorStyle(reversedClipsList: true), widgets: ClipsEditorWidgets( appBar: (editorState, rebuildStream) => null, bottomBar: (editorState, rebuildStream) { diff --git a/lib/src/core/pro_video_editor/ui/widgets/common/video_progress_alert.dart b/lib/src/core/pro_video_editor/ui/widgets/common/video_progress_alert.dart index 67e9220..5deaa20 100644 --- a/lib/src/core/pro_video_editor/ui/widgets/common/video_progress_alert.dart +++ b/lib/src/core/pro_video_editor/ui/widgets/common/video_progress_alert.dart @@ -15,10 +15,7 @@ class VideoProgressAlert extends StatelessWidget { Widget build(BuildContext context) { return Stack( children: [ - const ModalBarrier( - dismissible: false, - color: Colors.black54, - ), + const ModalBarrier(dismissible: false, color: Colors.black54), Center( child: Theme( data: Theme.of(context), diff --git a/lib/src/core/pro_video_editor/ui/widgets/crop_rotate/crop_rotate_editor_bar.dart b/lib/src/core/pro_video_editor/ui/widgets/crop_rotate/crop_rotate_editor_bar.dart index 0051834..f2f79e7 100644 --- a/lib/src/core/pro_video_editor/ui/widgets/crop_rotate/crop_rotate_editor_bar.dart +++ b/lib/src/core/pro_video_editor/ui/widgets/crop_rotate/crop_rotate_editor_bar.dart @@ -139,51 +139,48 @@ class _CropRotateEditorBarState extends State { } List _buildAspectRatioButtons() { - return List.generate( - cropRotateEditorConfigs.aspectRatios.length, - (index) { - final item = cropRotateEditorConfigs.aspectRatios[index]; - final isSelected = widget.editor.activeAspectRatio == item.value; - - return Padding( - padding: const EdgeInsets.symmetric(horizontal: 10), - child: TextButton( - onPressed: () => widget.editor.updateAspectRatio(item.value ?? -1), - style: TextButton.styleFrom( - padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 2), - maximumSize: const Size( - double.infinity, - kBottomNavigationBarHeight, - ), + return List.generate(cropRotateEditorConfigs.aspectRatios.length, (index) { + final item = cropRotateEditorConfigs.aspectRatios[index]; + final isSelected = widget.editor.activeAspectRatio == item.value; + + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 10), + child: TextButton( + onPressed: () => widget.editor.updateAspectRatio(item.value ?? -1), + style: TextButton.styleFrom( + padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 2), + maximumSize: const Size( + double.infinity, + kBottomNavigationBarHeight, ), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - SizedBox( - height: 28, - child: FittedBox( - child: AspectRatioButton( - aspectRatio: item.value, - isSelected: isSelected, - ), + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox( + height: 28, + child: FittedBox( + child: AspectRatioButton( + aspectRatio: item.value, + isSelected: isSelected, ), ), - const SizedBox(height: 5), - Text( - item.text, - style: TextStyle( - fontSize: 10, - color: isSelected - ? widget.selectedRatioColor - : _foreGroundColorAccent, - ), + ), + const SizedBox(height: 5), + Text( + item.text, + style: TextStyle( + fontSize: 10, + color: isSelected + ? widget.selectedRatioColor + : _foreGroundColorAccent, ), - ], - ), + ), + ], ), - ); - }, - ); + ), + ); + }); } Widget _buildIconTextButton({ @@ -204,10 +201,7 @@ class _CropRotateEditorBarState extends State { const SizedBox(height: 5), Text( label, - style: TextStyle( - fontSize: 10, - color: _foreGroundColorAccent, - ), + style: TextStyle(fontSize: 10, color: _foreGroundColorAccent), ), ], ), diff --git a/lib/src/core/pro_video_editor/ui/widgets/filter/filter_editor_bar.dart b/lib/src/core/pro_video_editor/ui/widgets/filter/filter_editor_bar.dart index 6a73ad3..0539765 100644 --- a/lib/src/core/pro_video_editor/ui/widgets/filter/filter_editor_bar.dart +++ b/lib/src/core/pro_video_editor/ui/widgets/filter/filter_editor_bar.dart @@ -78,10 +78,7 @@ class _FilterEditorBarState extends State { duration: const Duration(milliseconds: 200), transitionBuilder: (child, animation) => FadeTransition( opacity: animation, - child: SizeTransition( - sizeFactor: animation, - child: child, - ), + child: SizeTransition(sizeFactor: animation, child: child), ), child: widget.editor.selectedFilter.filters.isNotEmpty ? StatefulBuilder( diff --git a/lib/src/core/pro_video_editor/ui/widgets/layout/video_editor_header.dart b/lib/src/core/pro_video_editor/ui/widgets/layout/video_editor_header.dart index 3687f6c..0b712e9 100644 --- a/lib/src/core/pro_video_editor/ui/widgets/layout/video_editor_header.dart +++ b/lib/src/core/pro_video_editor/ui/widgets/layout/video_editor_header.dart @@ -29,10 +29,7 @@ class VideoEditorHeader extends StatelessWidget { CircleIconButton( onPressed: onNext, backgroundColor: AppColors.primary500, - icon: const Icon( - Icons.arrow_forward, - size: 22, - ), + icon: const Icon(Icons.arrow_forward, size: 22), iconColor: AppColors.greyWhite, semanticLabel: 'Done', ), diff --git a/lib/src/core/pro_video_editor/ui/widgets/layout/video_toolbar.dart b/lib/src/core/pro_video_editor/ui/widgets/layout/video_toolbar.dart index edb8908..51b44da 100644 --- a/lib/src/core/pro_video_editor/ui/widgets/layout/video_toolbar.dart +++ b/lib/src/core/pro_video_editor/ui/widgets/layout/video_toolbar.dart @@ -56,11 +56,7 @@ class VideoToolbar extends StatelessWidget { label: 'Crop', onPressed: onCrop, ), - _ToolButton( - icon: Icons.tune, - label: 'Tune', - onPressed: onTune, - ), + _ToolButton(icon: Icons.tune, label: 'Tune', onPressed: onTune), _ToolButton( icon: Icons.filter, label: 'Filter', @@ -117,11 +113,7 @@ class _ToolButton extends StatelessWidget { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Icon( - icon, - color: AppColors.greyWhite, - size: 24, - ), + Icon(icon, color: AppColors.greyWhite, size: 24), const SizedBox(height: 4), Text( label, diff --git a/lib/src/core/pro_video_editor/ui/widgets/paint/paint_editor_bar.dart b/lib/src/core/pro_video_editor/ui/widgets/paint/paint_editor_bar.dart index db92f1c..e436fb1 100644 --- a/lib/src/core/pro_video_editor/ui/widgets/paint/paint_editor_bar.dart +++ b/lib/src/core/pro_video_editor/ui/widgets/paint/paint_editor_bar.dart @@ -173,22 +173,19 @@ class _PaintEditorBarState extends State { } List _buildPaintTools() { - return List.generate( - widget.editor.tools.length, - (index) { - final item = widget.editor.tools[index]; - final isActive = widget.editor.paintMode == item.mode; - - return _buildIconTextButton( - icon: item.icon, - label: item.label, - onPressed: () { - widget.editor.setMode(item.mode); - }, - isActive: isActive, - ); - }, - ); + return List.generate(widget.editor.tools.length, (index) { + final item = widget.editor.tools[index]; + final isActive = widget.editor.paintMode == item.mode; + + return _buildIconTextButton( + icon: item.icon, + label: item.label, + onPressed: () { + widget.editor.setMode(item.mode); + }, + isActive: isActive, + ); + }); } Widget _buildIconTextButton({ @@ -215,13 +212,7 @@ class _PaintEditorBarState extends State { children: [ Icon(icon, color: color), const SizedBox(height: 5), - Text( - label, - style: TextStyle( - fontSize: 10, - color: labelColor, - ), - ), + Text(label, style: TextStyle(fontSize: 10, color: labelColor)), ], ), ); diff --git a/lib/src/core/pro_video_editor/ui/widgets/text/text_editor_bar.dart b/lib/src/core/pro_video_editor/ui/widgets/text/text_editor_bar.dart index b687818..9b101a8 100644 --- a/lib/src/core/pro_video_editor/ui/widgets/text/text_editor_bar.dart +++ b/lib/src/core/pro_video_editor/ui/widgets/text/text_editor_bar.dart @@ -145,31 +145,28 @@ class _TextEditorBarState extends State { return []; } - return List.generate( - textEditorConfigs.customTextStyles!.length, - (index) { - final item = textEditorConfigs.customTextStyles![index]; - final selected = widget.editor.selectedTextStyle; - final isSelected = selected.hashCode == item.hashCode; - - return Padding( - padding: const EdgeInsets.symmetric(horizontal: 10), - child: IconButton( - onPressed: () => widget.editor.setTextStyle(item), - icon: Text( - 'Aa', - style: item.copyWith( - color: isSelected ? Colors.black : Colors.white, - ), - ), - style: IconButton.styleFrom( - backgroundColor: isSelected ? Colors.white : Colors.black38, - foregroundColor: isSelected ? Colors.black : Colors.white, + return List.generate(textEditorConfigs.customTextStyles!.length, (index) { + final item = textEditorConfigs.customTextStyles![index]; + final selected = widget.editor.selectedTextStyle; + final isSelected = selected.hashCode == item.hashCode; + + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 10), + child: IconButton( + onPressed: () => widget.editor.setTextStyle(item), + icon: Text( + 'Aa', + style: item.copyWith( + color: isSelected ? Colors.black : Colors.white, ), ), - ); - }, - ); + style: IconButton.styleFrom( + backgroundColor: isSelected ? Colors.white : Colors.black38, + foregroundColor: isSelected ? Colors.black : Colors.white, + ), + ), + ); + }); } Widget _buildIconTextButton({ @@ -190,10 +187,7 @@ class _TextEditorBarState extends State { const SizedBox(height: 5), Text( label, - style: TextStyle( - fontSize: 10, - color: _foreGroundColorAccent, - ), + style: TextStyle(fontSize: 10, color: _foreGroundColorAccent), ), ], ), diff --git a/lib/src/core/pro_video_editor/ui/widgets/text/text_editor_font_scale_sheet.dart b/lib/src/core/pro_video_editor/ui/widgets/text/text_editor_font_scale_sheet.dart index c509133..84c4c27 100644 --- a/lib/src/core/pro_video_editor/ui/widgets/text/text_editor_font_scale_sheet.dart +++ b/lib/src/core/pro_video_editor/ui/widgets/text/text_editor_font_scale_sheet.dart @@ -61,10 +61,7 @@ class _TextEditorFontScaleSheetState extends State { child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - _buildHeader(), - _buildBody(), - ], + children: [_buildHeader(), _buildBody()], ), ), ), diff --git a/lib/src/core/routing/app_router.dart b/lib/src/core/routing/app_router.dart index de25102..79c2536 100644 --- a/lib/src/core/routing/app_router.dart +++ b/lib/src/core/routing/app_router.dart @@ -65,10 +65,7 @@ class AppRouter extends RootStackRouter { AutoRoute(page: SearchRoute.page, path: 'search'), AutoRoute(page: MessagesRoute.page, path: 'messages'), AutoRoute(page: NotificationsRoute.page, path: 'notifications'), - AutoRoute( - page: UserProfileRoute.page, - path: 'profile', - ), + AutoRoute(page: UserProfileRoute.page, path: 'profile'), ], ), @@ -107,10 +104,7 @@ class AppRouter extends RootStackRouter { // Deep linking routes or routes that will be pushed on top of everything AutoRoute(page: StandalonePostRoute.page, path: '/post/:postUri'), - AutoRoute( - page: ProfileRoute.page, - path: '/profile/:did', - ), + AutoRoute(page: ProfileRoute.page, path: '/profile/:did'), AutoRoute( page: StandaloneProfileFeedRoute.page, path: '/profile/:did/feed', @@ -119,10 +113,7 @@ class AppRouter extends RootStackRouter { page: StandaloneRepostsFeedRoute.page, path: '/profile/:did/reposts', ), - AutoRoute( - page: StandaloneLikesFeedRoute.page, - path: '/profile/:did/likes', - ), + AutoRoute(page: StandaloneLikesFeedRoute.page, path: '/profile/:did/likes'), AutoRoute(page: UserListRoute.page, path: '/profile/:did/users'), AutoRoute(page: VideoReviewRoute.page, path: '/video-review'), AutoRoute(page: ImageReviewRoute.page, path: '/image-review'), @@ -181,10 +172,8 @@ class AppRouter extends RootStackRouter { ) { return ModalBottomSheetRoute( settings: page, - builder: (context) => Padding( - padding: const EdgeInsets.only(top: 12), - child: child, - ), + builder: (context) => + Padding(padding: const EdgeInsets.only(top: 12), child: child), isScrollControlled: true, useSafeArea: true, shape: const RoundedRectangleBorder( diff --git a/lib/src/core/storage/preferences/default_preferences.dart b/lib/src/core/storage/preferences/default_preferences.dart index 4118ce8..d8dff66 100644 --- a/lib/src/core/storage/preferences/default_preferences.dart +++ b/lib/src/core/storage/preferences/default_preferences.dart @@ -10,11 +10,7 @@ class DefaultPreferences { final labelerDid = modServiceDid; // Default feeds: timeline, forYou, latest final defaultFeeds = [ - SavedFeed( - type: 'timeline', - value: 'following', - pinned: true, - ), + SavedFeed(type: 'timeline', value: 'following', pinned: true), SavedFeed( type: 'feed', value: @@ -74,9 +70,7 @@ class DefaultPreferences { ]; // Default labelers - final defaultLabelers = [ - LabelerPrefItem(did: labelerDid), - ]; + final defaultLabelers = [LabelerPrefItem(did: labelerDid)]; return Preferences( preferences: [ diff --git a/lib/src/core/ui/widgets/report_dialog.dart b/lib/src/core/ui/widgets/report_dialog.dart index 3610139..dccf0cb 100644 --- a/lib/src/core/ui/widgets/report_dialog.dart +++ b/lib/src/core/ui/widgets/report_dialog.dart @@ -19,8 +19,7 @@ enum ReportCategory { misleading('Misleading'), ruleViolations('Rule Violations'), selfHarm('Self-Harm'), - other('Other') - ; + other('Other'); const ReportCategory(this.displayName); final String displayName; @@ -553,10 +552,7 @@ class _ReportDialogState extends ConsumerState { height: 16, child: CircularProgressIndicator(strokeWidth: 2), ) - : LongButton( - label: 'Submit', - onPressed: _submitReport, - ), + : LongButton(label: 'Submit', onPressed: _submitReport), ], ); } diff --git a/lib/src/core/utils/label_utils.dart b/lib/src/core/utils/label_utils.dart index 8de4f19..38c6bfa 100644 --- a/lib/src/core/utils/label_utils.dart +++ b/lib/src/core/utils/label_utils.dart @@ -72,11 +72,7 @@ class LabelUtils { } static bool _isAdultOnlyLabel(String label) { - const adultOnlyLabels = { - 'porn', - 'sexual', - 'nsfl', - }; + const adultOnlyLabels = {'porn', 'sexual', 'nsfl'}; return adultOnlyLabels.contains(label); } diff --git a/lib/src/core/utils/logging/log_level.dart b/lib/src/core/utils/logging/log_level.dart index a81c141..302335d 100644 --- a/lib/src/core/utils/logging/log_level.dart +++ b/lib/src/core/utils/logging/log_level.dart @@ -6,8 +6,7 @@ enum LogLevel { warning(3, 'WARNING'), error(4, 'ERROR'), fatal(5, 'FATAL'), - nothing(6, 'NOTHING') - ; + nothing(6, 'NOTHING'); final int value; final String name; diff --git a/lib/src/features/auth/providers/auth_providers.dart b/lib/src/features/auth/providers/auth_providers.dart index 74b4eb7..cd62ad2 100644 --- a/lib/src/features/auth/providers/auth_providers.dart +++ b/lib/src/features/auth/providers/auth_providers.dart @@ -141,10 +141,7 @@ class Auth extends _$Auth { return result; } catch (e, stackTrace) { _logger.e('OAuth completion error', error: e, stackTrace: stackTrace); - state = state.copyWith( - isLoading: false, - error: 'Login failed: $e', - ); + state = state.copyWith(isLoading: false, error: 'Login failed: $e'); return LoginResult.failed('Login failed: $e'); } } diff --git a/lib/src/features/comments/providers/comments_page_state.dart b/lib/src/features/comments/providers/comments_page_state.dart index f1d1715..cf0f00b 100644 --- a/lib/src/features/comments/providers/comments_page_state.dart +++ b/lib/src/features/comments/providers/comments_page_state.dart @@ -5,7 +5,6 @@ part 'comments_page_state.freezed.dart'; @freezed abstract class CommentsPageState with _$CommentsPageState { - const factory CommentsPageState({ - required ThreadViewPost thread, - }) = _CommentsPageState; + const factory CommentsPageState({required ThreadViewPost thread}) = + _CommentsPageState; } diff --git a/lib/src/features/comments/ui/pages/comments_page.dart b/lib/src/features/comments/ui/pages/comments_page.dart index 73a4034..0d06cc1 100644 --- a/lib/src/features/comments/ui/pages/comments_page.dart +++ b/lib/src/features/comments/ui/pages/comments_page.dart @@ -256,10 +256,7 @@ class _CommentsListPageState extends ConsumerState { padding: EdgeInsets.zero, constraints: const BoxConstraints(), onPressed: _closeComments, - icon: Icon( - FluentIcons.dismiss_24_regular, - color: textColor, - ), + icon: Icon(FluentIcons.dismiss_24_regular, color: textColor), ), ], ), @@ -267,9 +264,8 @@ class _CommentsListPageState extends ConsumerState { ), if (hasCrossposts) _CrosspostCommentsBanner( - onTap: () => context.router.push( - CrosspostCommentsRoute(postUri: _postUri), - ), + onTap: () => + context.router.push(CrosspostCommentsRoute(postUri: _postUri)), ), Expanded( child: asyncState.when( diff --git a/lib/src/features/comments/ui/widgets/comment_item.dart b/lib/src/features/comments/ui/widgets/comment_item.dart index 11bebe8..c2527a1 100644 --- a/lib/src/features/comments/ui/widgets/comment_item.dart +++ b/lib/src/features/comments/ui/widgets/comment_item.dart @@ -52,11 +52,7 @@ class _CommentItemState extends ConsumerState { 'app.bsky', ); context.router.push( - ProfileRoute( - did: author.did, - initialProfile: author, - bsky: isBskyPost, - ), + ProfileRoute(did: author.did, initialProfile: author, bsky: isBskyPost), ); } diff --git a/lib/src/features/comments/ui/widgets/emoji_picker.dart b/lib/src/features/comments/ui/widgets/emoji_picker.dart index fef2b8d..6c1bc8e 100644 --- a/lib/src/features/comments/ui/widgets/emoji_picker.dart +++ b/lib/src/features/comments/ui/widgets/emoji_picker.dart @@ -60,10 +60,7 @@ class EmojiPicker extends StatelessWidget { } class _EmojiItem extends StatelessWidget { - const _EmojiItem({ - required this.emoji, - required this.onEmojiSelected, - }); + const _EmojiItem({required this.emoji, required this.onEmojiSelected}); final String emoji; final Function(String) onEmojiSelected; diff --git a/lib/src/features/feed/providers/feed_action_controller.dart b/lib/src/features/feed/providers/feed_action_controller.dart index db16bde..a27eb34 100644 --- a/lib/src/features/feed/providers/feed_action_controller.dart +++ b/lib/src/features/feed/providers/feed_action_controller.dart @@ -7,9 +7,7 @@ import 'package:spark/src/core/network/atproto/data/models/feed_models.dart'; /// like advancing to the next post without needing to pass callbacks through /// the widget tree. class FeedActionController { - FeedActionController({ - required this.onAdvanceAndRemove, - }); + FeedActionController({required this.onAdvanceAndRemove}); /// Called after an action that should remove the current post and advance /// to the next one (e.g., blocking a user, deleting a post). @@ -43,6 +41,4 @@ feedActionControllerProvider = FeedActionControllerNotifier, FeedActionController?, Feed - >( - (ref, feed) => FeedActionControllerNotifier(), - ); + >((ref, feed) => FeedActionControllerNotifier()); diff --git a/lib/src/features/feed/providers/feed_provider.dart b/lib/src/features/feed/providers/feed_provider.dart index 19a47cb..807b2de 100644 --- a/lib/src/features/feed/providers/feed_provider.dart +++ b/lib/src/features/feed/providers/feed_provider.dart @@ -170,43 +170,33 @@ class FeedNotifier extends _$FeedNotifier { for (final newLabel in allLabels) { final uri = AtUri.parse(newLabel.uri); - extraInfo.update( - uri, - (value) { - final existingLabels = value.postLabels; - - // if new label in existing labels, - //check if it should replace existing one - if (existingLabels.any((label) => label.val == newLabel.val)) { - final existingLabel = existingLabels.firstWhere( - (label) => label.val == newLabel.val, - ); + extraInfo.update(uri, (value) { + final existingLabels = value.postLabels; + + // if new label in existing labels, + //check if it should replace existing one + if (existingLabels.any((label) => label.val == newLabel.val)) { + final existingLabel = existingLabels.firstWhere( + (label) => label.val == newLabel.val, + ); - // if new label says that existing one is negated or expired, - // replace the existing one - if (((newLabel.ver ?? 0) > (existingLabel.ver ?? 0) && - newLabel.isNeg) || - existingLabel.exp != null && - existingLabel.exp!.isBefore(DateTime.now())) { - existingLabels.remove(existingLabel); - return ( - postLabels: [...existingLabels, newLabel], - ); - } else { - // if the new label is the same as the existing one, do nothing - return value; - } + // if new label says that existing one is negated or expired, + // replace the existing one + if (((newLabel.ver ?? 0) > (existingLabel.ver ?? 0) && + newLabel.isNeg) || + existingLabel.exp != null && + existingLabel.exp!.isBefore(DateTime.now())) { + existingLabels.remove(existingLabel); + return (postLabels: [...existingLabels, newLabel]); } else { - // if the new label is not in the existing labels, add it - return ( - postLabels: [...existingLabels, newLabel], - ); + // if the new label is the same as the existing one, do nothing + return value; } - }, - ifAbsent: () => ( - postLabels: [newLabel], - ), - ); + } else { + // if the new label is not in the existing labels, add it + return (postLabels: [...existingLabels, newLabel]); + } + }, ifAbsent: () => (postLabels: [newLabel])); } final filteredPosts = await _filterHiddenPosts( diff --git a/lib/src/features/feed/ui/pages/feed_page.dart b/lib/src/features/feed/ui/pages/feed_page.dart index c20b532..0985a91 100644 --- a/lib/src/features/feed/ui/pages/feed_page.dart +++ b/lib/src/features/feed/ui/pages/feed_page.dart @@ -48,9 +48,7 @@ class _FeedPageState extends ConsumerState feedActionControllerProvider(widget.feed).notifier, ); _actionControllerNotifier!.setController( - FeedActionController( - onAdvanceAndRemove: scrollToNextAndRemovePrevious, - ), + FeedActionController(onAdvanceAndRemove: scrollToNextAndRemovePrevious), ); }); } @@ -201,10 +199,7 @@ class _FeedPageState extends ConsumerState if (shouldBeActive) { return Stack( children: [ - FeedPostWidget( - index: index, - feed: widget.feed, - ), + FeedPostWidget(index: index, feed: widget.feed), const Positioned( bottom: 10, left: 10, @@ -234,10 +229,7 @@ class _FeedPageState extends ConsumerState ); } else { if (shouldBeActive) { - return FeedPostWidget( - index: index, - feed: widget.feed, - ); + return FeedPostWidget(index: index, feed: widget.feed); } else { // SizedBox to maintain scroll position but hide content return const DecoratedBox( diff --git a/lib/src/features/feed/ui/pages/standalone_post_page.dart b/lib/src/features/feed/ui/pages/standalone_post_page.dart index 459640a..46e734f 100644 --- a/lib/src/features/feed/ui/pages/standalone_post_page.dart +++ b/lib/src/features/feed/ui/pages/standalone_post_page.dart @@ -215,9 +215,7 @@ class _StandalonePostPageState extends ConsumerState { _videoPlayerKey.currentState?.pauseVideo(); final isBskyPost = postData.uri.collection .toString() - .startsWith( - 'app.bsky', - ); + .startsWith('app.bsky'); context.router.push( ProfileRoute( did: postData.author.did, @@ -250,11 +248,7 @@ class _StandalonePostPageState extends ConsumerState { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - const Icon( - Icons.error, - color: Colors.white, - size: 48, - ), + const Icon(Icons.error, color: Colors.white, size: 48), const SizedBox(height: 16), Text( 'Error loading post: ${snapshot.error}', @@ -273,11 +267,7 @@ class _StandalonePostPageState extends ConsumerState { body: Stack( children: [ content, - const Positioned( - top: 0, - left: 0, - child: AppOverlayBackButton(), - ), + const Positioned(top: 0, left: 0, child: AppOverlayBackButton()), ], ), bottomNavigationBar: postData == null @@ -301,10 +291,7 @@ class _StandalonePostPageState extends ConsumerState { } class _CommentBar extends StatelessWidget { - const _CommentBar({ - required this.bottomPadding, - required this.onTap, - }); + const _CommentBar({required this.bottomPadding, required this.onTap}); final double bottomPadding; final VoidCallback onTap; @@ -348,10 +335,7 @@ class _CommentBar extends StatelessWidget { ), child: const Text( 'Add comment...', - style: TextStyle( - color: Colors.white54, - fontSize: 14, - ), + style: TextStyle(color: Colors.white54, fontSize: 14), ), ), ), diff --git a/lib/src/features/feed/ui/widgets/action_buttons/share_panel.dart b/lib/src/features/feed/ui/widgets/action_buttons/share_panel.dart index e9cdeb6..47a1faf 100644 --- a/lib/src/features/feed/ui/widgets/action_buttons/share_panel.dart +++ b/lib/src/features/feed/ui/widgets/action_buttons/share_panel.dart @@ -52,11 +52,7 @@ class _SharePanelState extends ConsumerState { ShareParams(uri: Uri.parse(widget.shareUrl)), ); } catch (e, st) { - logger.e( - 'Failed to open native share sheet', - error: e, - stackTrace: st, - ); + logger.e('Failed to open native share sheet', error: e, stackTrace: st); } } @@ -201,11 +197,8 @@ class _SharePanelState extends ConsumerState { child: child, ); } - final scaleAnimation = - Tween( - begin: 0.7, - end: 1, - ).animate( + final scaleAnimation = Tween(begin: 0.7, end: 1) + .animate( CurvedAnimation( parent: animation, curve: Curves.easeOutBack, diff --git a/lib/src/features/feed/ui/widgets/action_buttons/side_action_bar.dart b/lib/src/features/feed/ui/widgets/action_buttons/side_action_bar.dart index efc229e..8693cb4 100644 --- a/lib/src/features/feed/ui/widgets/action_buttons/side_action_bar.dart +++ b/lib/src/features/feed/ui/widgets/action_buttons/side_action_bar.dart @@ -275,10 +275,7 @@ class SideActionBarState extends ConsumerState { isScrollControlled: true, backgroundColor: Colors.transparent, builder: (context) { - return SharePanel( - shareUrl: shareUrl, - atUri: originalAtUri, - ); + return SharePanel(shareUrl: shareUrl, atUri: originalAtUri); }, ); } @@ -347,9 +344,7 @@ class SideActionBarState extends ConsumerState { } if (widget.feed != null) { - final controller = ref.read( - feedActionControllerProvider(widget.feed!), - ); + final controller = ref.read(feedActionControllerProvider(widget.feed!)); controller?.onAdvanceAndRemove(); } else { final profileUri = AtUri.parse('at://${currentPost.author.did}'); @@ -396,16 +391,11 @@ class SideActionBarState extends ConsumerState { try { final graphRepository = GetIt.instance().graph; - await graphRepository.toggleBlock( - author.did, - author.viewer?.blocking, - ); + await graphRepository.toggleBlock(author.did, author.viewer?.blocking); // If blocking and we have a feed, use the action controller to advance if (!wasBlocked && widget.feed != null) { - final controller = ref.read( - feedActionControllerProvider(widget.feed!), - ); + final controller = ref.read(feedActionControllerProvider(widget.feed!)); controller?.onAdvanceAndRemove(); } } catch (_) {} diff --git a/lib/src/features/feed/ui/widgets/feed/cacheable_page_view.dart b/lib/src/features/feed/ui/widgets/feed/cacheable_page_view.dart index c79b5eb..81b7fa2 100644 --- a/lib/src/features/feed/ui/widgets/feed/cacheable_page_view.dart +++ b/lib/src/features/feed/ui/widgets/feed/cacheable_page_view.dart @@ -200,12 +200,8 @@ class _CacheablePageViewState extends State { void debugFillProperties(DiagnosticPropertiesBuilder description) { super.debugFillProperties(description); description - ..add( - EnumProperty('scrollDirection', widget.scrollDirection), - ) - ..add( - FlagProperty('reverse', value: widget.reverse, ifTrue: 'reversed'), - ) + ..add(EnumProperty('scrollDirection', widget.scrollDirection)) + ..add(FlagProperty('reverse', value: widget.reverse, ifTrue: 'reversed')) ..add( DiagnosticsProperty( 'controller', diff --git a/lib/src/features/feed/ui/widgets/feed/feeds_bar.dart b/lib/src/features/feed/ui/widgets/feed/feeds_bar.dart index febacf7..e429a29 100644 --- a/lib/src/features/feed/ui/widgets/feed/feeds_bar.dart +++ b/lib/src/features/feed/ui/widgets/feed/feeds_bar.dart @@ -190,9 +190,7 @@ class _FeedsBarState extends ConsumerState { selectedTagId: settings.activeFeed.config.id, onLeadingPressed: () => _showCreateMenu(context), onTagTap: (tagId) { - final feed = pinnedFeeds.firstWhere( - (f) => f.config.id == tagId, - ); + final feed = pinnedFeeds.firstWhere((f) => f.config.id == tagId); if (settings.activeFeed == feed) { ref.read(feedRefreshTriggerProvider(feed).notifier).trigger(); @@ -205,9 +203,7 @@ class _FeedsBarState extends ConsumerState { } }, onLongPress: (tagData) { - final feed = pinnedFeeds.firstWhere( - (f) => f.config.id == tagData.id, - ); + final feed = pinnedFeeds.firstWhere((f) => f.config.id == tagData.id); _showFeedOptionsSheet(context, feed); }, ); diff --git a/lib/src/features/feed/ui/widgets/images/image_carousel.dart b/lib/src/features/feed/ui/widgets/images/image_carousel.dart index 6f661ae..9c65166 100644 --- a/lib/src/features/feed/ui/widgets/images/image_carousel.dart +++ b/lib/src/features/feed/ui/widgets/images/image_carousel.dart @@ -119,9 +119,8 @@ class _ImageCarouselState extends ConsumerState { } return const SizedBox.shrink(); }, - errorBuilder: (context, error, stackTrace) => const Center( - child: Icon(FluentIcons.error_circle_24_regular), - ), + errorBuilder: (context, error, stackTrace) => + const Center(child: Icon(FluentIcons.error_circle_24_regular)), ), ); } @@ -244,9 +243,10 @@ class _ScrollingDotIndicatorState extends State<_ScrollingDotIndicator> duration: const Duration(milliseconds: 200), vsync: this, ); - _scrollAnimation = Tween(begin: 0, end: 0).animate( - CurvedAnimation(parent: _controller, curve: Curves.easeOutCubic), - ); + _scrollAnimation = Tween( + begin: 0, + end: 0, + ).animate(CurvedAnimation(parent: _controller, curve: Curves.easeOutCubic)); _previousIndex = widget.currentIndex; _targetScrollOffset = _calculateScrollOffset(widget.currentIndex); _currentScrollOffset = _targetScrollOffset; @@ -318,10 +318,7 @@ class _ScrollingDotIndicatorState extends State<_ScrollingDotIndicator> _currentScrollOffset = currentVisualPosition; _scrollAnimation = - Tween( - begin: currentVisualPosition, - end: newOffset, - ).animate( + Tween(begin: currentVisualPosition, end: newOffset).animate( CurvedAnimation(parent: _controller, curve: Curves.easeOutCubic), ); _targetScrollOffset = newOffset; diff --git a/lib/src/features/feed/ui/widgets/post/feed_post_widget.dart b/lib/src/features/feed/ui/widgets/post/feed_post_widget.dart index 9837fba..904f8ab 100644 --- a/lib/src/features/feed/ui/widgets/post/feed_post_widget.dart +++ b/lib/src/features/feed/ui/widgets/post/feed_post_widget.dart @@ -18,11 +18,7 @@ import 'package:spark/src/features/home/providers/navigation_provider.dart'; import 'package:spark/src/features/settings/providers/preferences_provider.dart'; class FeedPostWidget extends ConsumerStatefulWidget { - const FeedPostWidget({ - required this.index, - required this.feed, - super.key, - }); + const FeedPostWidget({required this.index, required this.feed, super.key}); final int index; final Feed feed; @@ -311,9 +307,7 @@ class _FeedPostWidgetState extends ConsumerState { _videoPlayerKey.currentState?.pauseVideo(); final isBskyPost = currentPost.uri.collection .toString() - .startsWith( - 'app.bsky', - ); + .startsWith('app.bsky'); context.router.push( ProfileRoute( did: currentPost.author.did, diff --git a/lib/src/features/feed/ui/widgets/videos/video_player.dart b/lib/src/features/feed/ui/widgets/videos/video_player.dart index 2bcfc84..0a65efe 100644 --- a/lib/src/features/feed/ui/widgets/videos/video_player.dart +++ b/lib/src/features/feed/ui/widgets/videos/video_player.dart @@ -66,13 +66,9 @@ class PostVideoPlayerState extends ConsumerState duration: const Duration(milliseconds: 300), vsync: this, ); - _bounceAnimation = - Tween( - begin: 1, - end: 1.3, - ).animate( - CurvedAnimation(parent: _bounceController, curve: Curves.elasticOut), - ); + _bounceAnimation = Tween(begin: 1, end: 1.3).animate( + CurvedAnimation(parent: _bounceController, curve: Curves.elasticOut), + ); initVideoPlayer(); GetIt.I() .getLogger('PostVideoPlayer') diff --git a/lib/src/features/home/providers/navigation_state.dart b/lib/src/features/home/providers/navigation_state.dart index 27ba6e8..2259549 100644 --- a/lib/src/features/home/providers/navigation_state.dart +++ b/lib/src/features/home/providers/navigation_state.dart @@ -4,9 +4,8 @@ part 'navigation_state.freezed.dart'; @freezed abstract class NavigationState with _$NavigationState { - const factory NavigationState({ - @Default(0) int currentIndex, - }) = _NavigationState; + const factory NavigationState({@Default(0) int currentIndex}) = + _NavigationState; factory NavigationState.initial() => const NavigationState(); } diff --git a/lib/src/features/messages/ui/pages/new_chat_search_page.dart b/lib/src/features/messages/ui/pages/new_chat_search_page.dart index 4703df7..b08c849 100644 --- a/lib/src/features/messages/ui/pages/new_chat_search_page.dart +++ b/lib/src/features/messages/ui/pages/new_chat_search_page.dart @@ -66,9 +66,7 @@ class _NewChatSearchPageState extends ConsumerState { controller: _searchController, decoration: InputDecoration( hintText: 'Search users', - prefixIcon: const Icon( - FluentIcons.search_24_regular, - ), + prefixIcon: const Icon(FluentIcons.search_24_regular), suffixIcon: _searchController.text.isNotEmpty ? IconButton( iconSize: 20, @@ -212,10 +210,7 @@ class _UserResultsState extends ConsumerState<_UserResults> { final theme = Theme.of(context); final colorScheme = theme.colorScheme; return Center( - child: Text( - state.error!, - style: TextStyle(color: colorScheme.error), - ), + child: Text(state.error!, style: TextStyle(color: colorScheme.error)), ); } if (state.query.isEmpty) { diff --git a/lib/src/features/notifications/providers/notification_provider.dart b/lib/src/features/notifications/providers/notification_provider.dart index 7e21415..90ddc54 100644 --- a/lib/src/features/notifications/providers/notification_provider.dart +++ b/lib/src/features/notifications/providers/notification_provider.dart @@ -18,10 +18,7 @@ class NotificationNotifier extends _$NotificationNotifier { bool _isLoading = false; @override - NotificationState build({ - bool? priority, - List? reasons, - }) { + NotificationState build({bool? priority, List? reasons}) { _notificationRepository = GetIt.instance().notification; _logger = GetIt.instance().getLogger('NotificationNotifier'); @@ -30,10 +27,7 @@ class NotificationNotifier extends _$NotificationNotifier { loadNotifications(priority: priority, reasons: reasons); }); - return const NotificationState( - notifications: [], - isLoading: true, - ); + return const NotificationState(notifications: [], isLoading: true); } /// Load initial notifications or refresh @@ -85,10 +79,7 @@ class NotificationNotifier extends _$NotificationNotifier { } /// Load more notifications (pagination) - Future loadMore({ - bool? priority, - List? reasons, - }) async { + Future loadMore({bool? priority, List? reasons}) async { if (_isLoading || state.isLoadingMore || !state.hasMore) { return; } @@ -170,10 +161,7 @@ class NotificationNotifier extends _$NotificationNotifier { } /// Refresh notifications - Future refresh({ - bool? priority, - List? reasons, - }) async { + Future refresh({bool? priority, List? reasons}) async { await loadNotifications( priority: priority, reasons: reasons, diff --git a/lib/src/features/notifications/ui/widgets/notification_item.dart b/lib/src/features/notifications/ui/widgets/notification_item.dart index a248158..0878e95 100644 --- a/lib/src/features/notifications/ui/widgets/notification_item.dart +++ b/lib/src/features/notifications/ui/widgets/notification_item.dart @@ -144,9 +144,7 @@ class _NotificationItemState extends ConsumerState { // Navigate based on notification type if (notification.reason == 'follow') { // Navigate to profile (use first author for grouped follows) - context.router.push( - ProfileRoute(did: notification.author.did), - ); + context.router.push(ProfileRoute(did: notification.author.did)); } else if (notification.reason == 'reply') { // Reply notification - navigate to root post with reply highlighted final replyUri = notification.uri.toString(); @@ -160,9 +158,7 @@ class _NotificationItemState extends ConsumerState { ); } else { // Fallback to standalone post - context.router.push( - StandalonePostRoute(postUri: replyUri), - ); + context.router.push(StandalonePostRoute(postUri: replyUri)); } } else if (notification.reason == 'like' && _isReplySubject()) { // Like on a reply - get root post URI from embedded subject or fetch it @@ -183,31 +179,23 @@ class _NotificationItemState extends ConsumerState { ); } else if (context.mounted) { // Fallback to standalone post showing the reply - context.router.push( - StandalonePostRoute(postUri: replyUri), - ); + context.router.push(StandalonePostRoute(postUri: replyUri)); } } else if (notification.reasonSubject != null) { // Navigate to the post/thread final reasonSubjectStr = notification.reasonSubject!.toString(); - context.router.push( - StandalonePostRoute(postUri: reasonSubjectStr), - ); + context.router.push(StandalonePostRoute(postUri: reasonSubjectStr)); } else { final collectionStr = notification.uri.collection.toString(); if (collectionStr.startsWith('so.sprk.feed.post') || collectionStr.startsWith('app.bsky.feed.post')) { // Navigate to the post final uriStr = notification.uri.toString(); - context.router.push( - StandalonePostRoute(postUri: uriStr), - ); + context.router.push(StandalonePostRoute(postUri: uriStr)); return; } // Fallback to author profile - context.router.push( - ProfileRoute(did: notification.author.did), - ); + context.router.push(ProfileRoute(did: notification.author.did)); } } diff --git a/lib/src/features/notifications/ui/widgets/notifications_list.dart b/lib/src/features/notifications/ui/widgets/notifications_list.dart index a81a29e..6dec385 100644 --- a/lib/src/features/notifications/ui/widgets/notifications_list.dart +++ b/lib/src/features/notifications/ui/widgets/notifications_list.dart @@ -4,11 +4,7 @@ import 'package:spark/src/features/notifications/providers/notification_provider import 'package:spark/src/features/notifications/ui/widgets/notification_item.dart'; class NotificationsList extends ConsumerStatefulWidget { - const NotificationsList({ - this.priority, - this.reasons, - super.key, - }); + const NotificationsList({this.priority, this.reasons, super.key}); final bool? priority; final List? reasons; @@ -45,20 +41,14 @@ class _NotificationsListState extends ConsumerState { reasons: widget.reasons, ).notifier, ) - .loadMore( - priority: widget.priority, - reasons: widget.reasons, - ); + .loadMore(priority: widget.priority, reasons: widget.reasons); } } @override Widget build(BuildContext context) { final notificationState = ref.watch( - notificationProvider( - priority: widget.priority, - reasons: widget.reasons, - ), + notificationProvider(priority: widget.priority, reasons: widget.reasons), ); final isLoading = notificationState.isLoading; @@ -66,9 +56,7 @@ class _NotificationsListState extends ConsumerState { final hasError = notificationState.hasError; if (isLoading && isEmpty) { - return const Center( - child: CircularProgressIndicator(), - ); + return const Center(child: CircularProgressIndicator()); } if (hasError && isEmpty) { @@ -84,10 +72,7 @@ class _NotificationsListState extends ConsumerState { reasons: widget.reasons, ).notifier, ) - .refresh( - priority: widget.priority, - reasons: widget.reasons, - ); + .refresh(priority: widget.priority, reasons: widget.reasons); }, child: SingleChildScrollView( physics: const AlwaysScrollableScrollPhysics(), @@ -158,10 +143,7 @@ class _NotificationsListState extends ConsumerState { reasons: widget.reasons, ).notifier, ) - .refresh( - priority: widget.priority, - reasons: widget.reasons, - ); + .refresh(priority: widget.priority, reasons: widget.reasons); }, child: SingleChildScrollView( physics: const AlwaysScrollableScrollPhysics(), @@ -212,10 +194,7 @@ class _NotificationsListState extends ConsumerState { reasons: widget.reasons, ).notifier, ) - .refresh( - priority: widget.priority, - reasons: widget.reasons, - ); + .refresh(priority: widget.priority, reasons: widget.reasons); }, child: ListView.builder( controller: _scrollController, @@ -228,9 +207,7 @@ class _NotificationsListState extends ConsumerState { // Loading more indicator return const Padding( padding: EdgeInsets.all(16), - child: Center( - child: CircularProgressIndicator(), - ), + child: Center(child: CircularProgressIndicator()), ); } diff --git a/lib/src/features/posting/ui/pages/media_picker_page.dart b/lib/src/features/posting/ui/pages/media_picker_page.dart index 9d8692a..2444f45 100644 --- a/lib/src/features/posting/ui/pages/media_picker_page.dart +++ b/lib/src/features/posting/ui/pages/media_picker_page.dart @@ -442,10 +442,7 @@ class _MediaLibraryPickerPageState extends State { return Center( child: Padding( padding: const EdgeInsets.all(24), - child: Text( - _errorMessage!, - textAlign: TextAlign.center, - ), + child: Text(_errorMessage!, textAlign: TextAlign.center), ), ); } @@ -533,11 +530,7 @@ class _MediaLibraryPickerPageState extends State { Container( color: Colors.black.withAlpha(140), alignment: Alignment.center, - child: const Icon( - Icons.block, - color: Colors.white, - size: 22, - ), + child: const Icon(Icons.block, color: Colors.white, size: 22), ), ], ), @@ -593,11 +586,7 @@ class _AssetThumbnailState extends State<_AssetThumbnail> { ); } - return Image.memory( - bytes, - fit: BoxFit.cover, - gaplessPlayback: true, - ); + return Image.memory(bytes, fit: BoxFit.cover, gaplessPlayback: true); }, ); } diff --git a/lib/src/features/posting/ui/pages/recording_page.dart b/lib/src/features/posting/ui/pages/recording_page.dart index 43e581e..304ce87 100644 --- a/lib/src/features/posting/ui/pages/recording_page.dart +++ b/lib/src/features/posting/ui/pages/recording_page.dart @@ -170,10 +170,7 @@ class _RecordingPageState extends ConsumerState { try { await context.router.push( - ImageReviewRoute( - imageFiles: photos, - storyMode: widget.storyMode, - ), + ImageReviewRoute(imageFiles: photos, storyMode: widget.storyMode), ); if (!mounted) return; @@ -192,9 +189,9 @@ class _RecordingPageState extends ConsumerState { setState(() { _isProcessing = false; }); - ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text('Error: $e')), - ); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text('Error: $e'))); } } } @@ -264,9 +261,9 @@ class _RecordingPageState extends ConsumerState { setState(() { _isProcessing = false; }); - ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text('Error: $e')), - ); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text('Error: $e'))); } } } @@ -367,9 +364,9 @@ class _RecordingPageState extends ConsumerState { stackTrace: stackTrace, ); if (mounted) { - ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text('Failed to post story: $e')), - ); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text('Failed to post story: $e'))); } } // If posting failed or was cancelled, reset state @@ -399,9 +396,9 @@ class _RecordingPageState extends ConsumerState { setState(() { _isProcessing = false; }); - ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text('Error: $e')), - ); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text('Error: $e'))); } } } @@ -467,9 +464,7 @@ class _RecordingPageState extends ConsumerState { if (!cameraState.isInitialized || cameraState.controller == null) { return const Scaffold( backgroundColor: Colors.black, - body: Center( - child: CircularProgressIndicator(color: Colors.white), - ), + body: Center(child: CircularProgressIndicator(color: Colors.white)), ); } @@ -477,9 +472,7 @@ class _RecordingPageState extends ConsumerState { if (_isExiting) { return const Scaffold( backgroundColor: Colors.black, - body: Center( - child: CircularProgressIndicator(color: Colors.white), - ), + body: Center(child: CircularProgressIndicator(color: Colors.white)), ); } @@ -533,9 +526,7 @@ class _RecordingPageState extends ConsumerState { }, loading: () => const Scaffold( backgroundColor: Colors.black, - body: Center( - child: CircularProgressIndicator(color: Colors.white), - ), + body: Center(child: CircularProgressIndicator(color: Colors.white)), ), error: (error, stack) => Scaffold( backgroundColor: Colors.black, diff --git a/lib/src/features/posting/ui/pages/story_post_page.dart b/lib/src/features/posting/ui/pages/story_post_page.dart index 70a7ec8..6f5e657 100644 --- a/lib/src/features/posting/ui/pages/story_post_page.dart +++ b/lib/src/features/posting/ui/pages/story_post_page.dart @@ -15,14 +15,11 @@ import 'package:spark/src/features/posting/providers/video_upload_provider.dart' /// Shows a loading indicator while uploading and posting. @RoutePage() class StoryPostPage extends ConsumerStatefulWidget { - const StoryPostPage({ - this.imageFile, - this.videoPath, - super.key, - }) : assert( - imageFile != null || videoPath != null, - 'Either imageFile or videoPath must be provided', - ); + const StoryPostPage({this.imageFile, this.videoPath, super.key}) + : assert( + imageFile != null || videoPath != null, + 'Either imageFile or videoPath must be provided', + ); final XFile? imageFile; final String? videoPath; @@ -216,10 +213,7 @@ class _StoryPostingProgressCard extends StatelessWidget { const SizedBox(height: 10), const Text( 'Keep this screen open. This usually takes a few seconds.', - style: TextStyle( - color: Color(0xFF94A3B8), - fontSize: 12, - ), + style: TextStyle(color: Color(0xFF94A3B8), fontSize: 12), textAlign: TextAlign.center, ), ], diff --git a/lib/src/features/profile/providers/blocks_provider.dart b/lib/src/features/profile/providers/blocks_provider.dart index c1135dc..2e724d8 100644 --- a/lib/src/features/profile/providers/blocks_provider.dart +++ b/lib/src/features/profile/providers/blocks_provider.dart @@ -30,9 +30,7 @@ class Blocks extends _$Blocks { /// Fetch missing profile data using ActorRepository (Spark-first with /// Bluesky fallback) /// Only fetches profiles that are actually incomplete (missing key fields) - Future _fetchAndMergeProfiles( - List profiles, - ) async { + Future _fetchAndMergeProfiles(List profiles) async { // Check if profile is incomplete - need to check multiple fields // Profile is incomplete if it's missing displayName, description, or avatar // AND has a valid handle (if handle missing, it's likely deleted account) diff --git a/lib/src/features/profile/providers/profile_likes_provider.dart b/lib/src/features/profile/providers/profile_likes_provider.dart index 9854a8f..5d09c37 100644 --- a/lib/src/features/profile/providers/profile_likes_provider.dart +++ b/lib/src/features/profile/providers/profile_likes_provider.dart @@ -25,10 +25,7 @@ class ProfileLikes extends _$ProfileLikes { Future build(String actor, bool bsky) async { _actor = actor; try { - final result = await _loadLikes( - actor: actor, - cursor: null, - ); + final result = await _loadLikes(actor: actor, cursor: null); return result; } catch (e, stackTrace) { _logger.e( @@ -156,10 +153,7 @@ class ProfileLikes extends _$ProfileLikes { Future refresh() async { try { - final result = await _loadLikes( - actor: _actor, - cursor: null, - ); + final result = await _loadLikes(actor: _actor, cursor: null); state = AsyncValue.data(result); } catch (e) { _logger.e('Error refreshing likes: $e'); diff --git a/lib/src/features/profile/providers/profile_reposts_provider.dart b/lib/src/features/profile/providers/profile_reposts_provider.dart index e3a1c20..a532c64 100644 --- a/lib/src/features/profile/providers/profile_reposts_provider.dart +++ b/lib/src/features/profile/providers/profile_reposts_provider.dart @@ -25,10 +25,7 @@ class ProfileReposts extends _$ProfileReposts { Future build(String actor, bool bsky) async { _actor = actor; try { - final result = await _loadReposts( - actor: actor, - cursor: null, - ); + final result = await _loadReposts(actor: actor, cursor: null); return result; } catch (e, stackTrace) { _logger.e( @@ -156,10 +153,7 @@ class ProfileReposts extends _$ProfileReposts { Future refresh() async { try { - final result = await _loadReposts( - actor: _actor, - cursor: null, - ); + final result = await _loadReposts(actor: _actor, cursor: null); state = AsyncValue.data(result); } catch (e) { _logger.e('Error refreshing reposts: $e'); diff --git a/lib/src/features/profile/providers/user_list_provider.dart b/lib/src/features/profile/providers/user_list_provider.dart index 0cf0df9..a9e81ef 100644 --- a/lib/src/features/profile/providers/user_list_provider.dart +++ b/lib/src/features/profile/providers/user_list_provider.dart @@ -81,9 +81,7 @@ class UserList extends _$UserList { /// Fetch missing profile data using ActorRepository (Spark-first with /// Bluesky fallback) /// Only fetches profiles that are actually incomplete (missing key fields) - Future _fetchAndMergeProfiles( - List profiles, - ) async { + Future _fetchAndMergeProfiles(List profiles) async { // Check if profile is incomplete - need to check multiple fields // Profile is incomplete if it's missing displayName, description, or avatar // AND has a valid handle (if handle missing, it's likely a deleted account) diff --git a/lib/src/features/profile/ui/pages/blocks_page.dart b/lib/src/features/profile/ui/pages/blocks_page.dart index c4b702b..142c15b 100644 --- a/lib/src/features/profile/ui/pages/blocks_page.dart +++ b/lib/src/features/profile/ui/pages/blocks_page.dart @@ -51,9 +51,7 @@ class _BlocksPageState extends ConsumerState { leading: const AppLeadingButton(tooltip: 'Back'), title: const Text('Blocked Users'), ), - body: const Center( - child: Text('Please log in to view blocked users'), - ), + body: const Center(child: Text('Please log in to view blocked users')), ); } diff --git a/lib/src/features/profile/ui/pages/profile_page.dart b/lib/src/features/profile/ui/pages/profile_page.dart index 82137b5..8698165 100644 --- a/lib/src/features/profile/ui/pages/profile_page.dart +++ b/lib/src/features/profile/ui/pages/profile_page.dart @@ -122,10 +122,7 @@ class _ProfilePageState extends ConsumerState { ); case 2: // Third tab - likes (only shown for current user) - tabWidget = ProfileLikesTab( - profileUri: profileUri, - bsky: widget.bsky, - ); + tabWidget = ProfileLikesTab(profileUri: profileUri, bsky: widget.bsky); default: // Fallback to first tab tabWidget = ProfileGridTab(profileUri: profileUri, bsky: widget.bsky); @@ -169,10 +166,7 @@ class _ProfilePageState extends ConsumerState { Future _handleAddStory(BuildContext context) async { context.router.push( - RecordingRoute( - storyMode: true, - captureMode: CaptureMode.hybrid, - ), + RecordingRoute(storyMode: true, captureMode: CaptureMode.hybrid), ); } @@ -340,9 +334,7 @@ class _ProfilePageState extends ConsumerState { splashColor: Colors.transparent, highlightColor: Colors.transparent, onPressed: () => _showCreateMenu(context), - icon: AppIcons.addPostFilled( - size: 28, - ), + icon: AppIcons.addPostFilled(size: 28), ), ) : null, @@ -387,9 +379,7 @@ class _ProfilePageState extends ConsumerState { final confirmed = await showDialog( context: context, builder: (context) => AlertDialog( - title: Text( - wasBlocked ? 'Unblock User' : 'Block User', - ), + title: Text(wasBlocked ? 'Unblock User' : 'Block User'), content: Text( wasBlocked ? 'Are you sure you want to unblock this user?' @@ -417,10 +407,7 @@ class _ProfilePageState extends ConsumerState { try { await notifier.toggleBlock(); } catch (e) { - _logger.e( - 'Error blocking/unblocking profile', - error: e, - ); + _logger.e('Error blocking/unblocking profile', error: e); } }, isBlocked: isBlocking(profile.viewer), @@ -483,10 +470,7 @@ class _ProfilePageState extends ConsumerState { constraints: const BoxConstraints(), splashColor: Colors.transparent, highlightColor: Colors.transparent, - icon: AppIcons.moreHoriz( - color: colorScheme.onSurface, - size: 28, - ), + icon: AppIcons.moreHoriz(color: colorScheme.onSurface, size: 28), ), ], tabsWidget: ProfileTabBar( diff --git a/lib/src/features/profile/ui/pages/standalone_likes_feed_page.dart b/lib/src/features/profile/ui/pages/standalone_likes_feed_page.dart index a3b9196..9ee8814 100644 --- a/lib/src/features/profile/ui/pages/standalone_likes_feed_page.dart +++ b/lib/src/features/profile/ui/pages/standalone_likes_feed_page.dart @@ -65,9 +65,7 @@ class _StandaloneLikesFeedPageState }); } - final likesState = ref.watch( - profileLikesProvider(widget.did, widget.bsky), - ); + final likesState = ref.watch(profileLikesProvider(widget.did, widget.bsky)); final bottomPadding = MediaQuery.of(context).padding.bottom; return Scaffold( @@ -173,11 +171,7 @@ class _StandaloneLikesFeedPageState ), ), // Back button overlay - const Positioned( - top: 0, - left: 0, - child: AppOverlayBackButton(), - ), + const Positioned(top: 0, left: 0, child: AppOverlayBackButton()), ], ), bottomNavigationBar: _CommentBar( @@ -204,10 +198,7 @@ class _StandaloneLikesFeedPageState } class _CommentBar extends StatelessWidget { - const _CommentBar({ - required this.bottomPadding, - required this.onTap, - }); + const _CommentBar({required this.bottomPadding, required this.onTap}); final double bottomPadding; final VoidCallback onTap; @@ -251,10 +242,7 @@ class _CommentBar extends StatelessWidget { ), child: const Text( 'Add comment...', - style: TextStyle( - color: Colors.white54, - fontSize: 14, - ), + style: TextStyle(color: Colors.white54, fontSize: 14), ), ), ), diff --git a/lib/src/features/profile/ui/pages/standalone_profile_feed_page.dart b/lib/src/features/profile/ui/pages/standalone_profile_feed_page.dart index 2242641..cfd0b3d 100644 --- a/lib/src/features/profile/ui/pages/standalone_profile_feed_page.dart +++ b/lib/src/features/profile/ui/pages/standalone_profile_feed_page.dart @@ -177,11 +177,7 @@ class _StandaloneProfileFeedPageState ), ), // Back button overlay - const Positioned( - top: 0, - left: 0, - child: AppOverlayBackButton(), - ), + const Positioned(top: 0, left: 0, child: AppOverlayBackButton()), ], ), bottomNavigationBar: _CommentBar( @@ -208,10 +204,7 @@ class _StandaloneProfileFeedPageState } class _CommentBar extends StatelessWidget { - const _CommentBar({ - required this.bottomPadding, - required this.onTap, - }); + const _CommentBar({required this.bottomPadding, required this.onTap}); final double bottomPadding; final VoidCallback onTap; @@ -255,10 +248,7 @@ class _CommentBar extends StatelessWidget { ), child: const Text( 'Add comment...', - style: TextStyle( - color: Colors.white54, - fontSize: 14, - ), + style: TextStyle(color: Colors.white54, fontSize: 14), ), ), ), diff --git a/lib/src/features/profile/ui/pages/standalone_reposts_feed_page.dart b/lib/src/features/profile/ui/pages/standalone_reposts_feed_page.dart index 3ded0a3..89aad41 100644 --- a/lib/src/features/profile/ui/pages/standalone_reposts_feed_page.dart +++ b/lib/src/features/profile/ui/pages/standalone_reposts_feed_page.dart @@ -173,11 +173,7 @@ class _StandaloneRepostsFeedPageState ), ), // Back button overlay - const Positioned( - top: 0, - left: 0, - child: AppOverlayBackButton(), - ), + const Positioned(top: 0, left: 0, child: AppOverlayBackButton()), ], ), bottomNavigationBar: _CommentBar( @@ -204,10 +200,7 @@ class _StandaloneRepostsFeedPageState } class _CommentBar extends StatelessWidget { - const _CommentBar({ - required this.bottomPadding, - required this.onTap, - }); + const _CommentBar({required this.bottomPadding, required this.onTap}); final double bottomPadding; final VoidCallback onTap; @@ -251,10 +244,7 @@ class _CommentBar extends StatelessWidget { ), child: const Text( 'Add comment...', - style: TextStyle( - color: Colors.white54, - fontSize: 14, - ), + style: TextStyle(color: Colors.white54, fontSize: 14), ), ), ), diff --git a/lib/src/features/profile/ui/widgets/blocks_list_view.dart b/lib/src/features/profile/ui/widgets/blocks_list_view.dart index 54deb11..1929516 100644 --- a/lib/src/features/profile/ui/widgets/blocks_list_view.dart +++ b/lib/src/features/profile/ui/widgets/blocks_list_view.dart @@ -23,9 +23,7 @@ class BlocksListView extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { if (users.isEmpty) { - return const Center( - child: Text('No blocked users.'), - ); + return const Center(child: Text('No blocked users.')); } return ListView.builder( diff --git a/lib/src/features/profile/ui/widgets/early_supporter_sheet.dart b/lib/src/features/profile/ui/widgets/early_supporter_sheet.dart index 88709f1..f37e011 100644 --- a/lib/src/features/profile/ui/widgets/early_supporter_sheet.dart +++ b/lib/src/features/profile/ui/widgets/early_supporter_sheet.dart @@ -67,9 +67,7 @@ class EarlySupporterSheet extends StatelessWidget { fontWeight: FontWeight.bold, ), ), - TextSpan( - text: 'Thanks to them for supporting us.', - ), + TextSpan(text: 'Thanks to them for supporting us.'), ], ), textAlign: TextAlign.center, diff --git a/lib/src/features/profile/ui/widgets/profile_feed_post_widget.dart b/lib/src/features/profile/ui/widgets/profile_feed_post_widget.dart index 9fbf8ba..6297cf7 100644 --- a/lib/src/features/profile/ui/widgets/profile_feed_post_widget.dart +++ b/lib/src/features/profile/ui/widgets/profile_feed_post_widget.dart @@ -285,9 +285,7 @@ class _ProfileFeedPostWidgetState extends ConsumerState { // Check if post is from Bluesky final isBskyPost = post.uri.collection .toString() - .startsWith( - 'app.bsky', - ); + .startsWith('app.bsky'); // Otherwise, navigate to the new profile context.router.push( ProfileRoute( diff --git a/lib/src/features/profile/ui/widgets/profile_grid_tab.dart b/lib/src/features/profile/ui/widgets/profile_grid_tab.dart index 6910ac8..d68e630 100644 --- a/lib/src/features/profile/ui/widgets/profile_grid_tab.dart +++ b/lib/src/features/profile/ui/widgets/profile_grid_tab.dart @@ -39,9 +39,7 @@ class ProfileGridTab extends ProfileTabBase { ), ); } else { - context.router.push( - StandalonePostRoute(postUri: postUri.toString()), - ); + context.router.push(StandalonePostRoute(postUri: postUri.toString())); } }); } diff --git a/lib/src/features/profile/ui/widgets/profile_grid_widget.dart b/lib/src/features/profile/ui/widgets/profile_grid_widget.dart index 738bb23..cf751d8 100644 --- a/lib/src/features/profile/ui/widgets/profile_grid_widget.dart +++ b/lib/src/features/profile/ui/widgets/profile_grid_widget.dart @@ -73,24 +73,21 @@ List buildProfileGridSlivers({ mainAxisSpacing: 5, childAspectRatio: 9 / 16, ), - delegate: SliverChildBuilderDelegate( - (context, index) { - final postUri = filteredUris[index]; - final postView = state.postViews[postUri]; - final postSource = state.postSources[postUri]; + delegate: SliverChildBuilderDelegate((context, index) { + final postUri = filteredUris[index]; + final postView = state.postViews[postUri]; + final postSource = state.postSources[postUri]; - if (postView == null) { - return const SizedBox.shrink(); - } + if (postView == null) { + return const SizedBox.shrink(); + } - return ProfileGridTile( - postView: postView, - postSource: postSource, - onTap: () => onPostTap(context, ref, postUri), - ); - }, - childCount: filteredUris.length, - ), + return ProfileGridTile( + postView: postView, + postSource: postSource, + onTap: () => onPostTap(context, ref, postUri), + ); + }, childCount: filteredUris.length), ), ), // Bottom padding for tab bar diff --git a/lib/src/features/profile/ui/widgets/profile_likes_tab.dart b/lib/src/features/profile/ui/widgets/profile_likes_tab.dart index 906cbac..2e90054 100644 --- a/lib/src/features/profile/ui/widgets/profile_likes_tab.dart +++ b/lib/src/features/profile/ui/widgets/profile_likes_tab.dart @@ -40,9 +40,7 @@ class ProfileLikesTab extends ProfileTabBase { ), ); } else { - context.router.push( - StandalonePostRoute(postUri: postUri.toString()), - ); + context.router.push(StandalonePostRoute(postUri: postUri.toString())); } }); } @@ -115,24 +113,21 @@ class ProfileLikesTab extends ProfileTabBase { mainAxisSpacing: 5, childAspectRatio: 9 / 16, ), - delegate: SliverChildBuilderDelegate( - (context, index) { - final postUri = filteredUris[index]; - final postView = state.postViews[postUri]; - final postSource = state.postSources[postUri]; + delegate: SliverChildBuilderDelegate((context, index) { + final postUri = filteredUris[index]; + final postView = state.postViews[postUri]; + final postSource = state.postSources[postUri]; - if (postView == null) { - return const SizedBox.shrink(); - } + if (postView == null) { + return const SizedBox.shrink(); + } - return ProfileGridTile( - postView: postView, - postSource: postSource, - onTap: () => onPostTap(context, ref, postUri), - ); - }, - childCount: filteredUris.length, - ), + return ProfileGridTile( + postView: postView, + postSource: postSource, + onTap: () => onPostTap(context, ref, postUri), + ); + }, childCount: filteredUris.length), ), ), // Bottom padding for tab bar diff --git a/lib/src/features/profile/ui/widgets/profile_reposts_tab.dart b/lib/src/features/profile/ui/widgets/profile_reposts_tab.dart index 6ffc4c1..0852b42 100644 --- a/lib/src/features/profile/ui/widgets/profile_reposts_tab.dart +++ b/lib/src/features/profile/ui/widgets/profile_reposts_tab.dart @@ -40,9 +40,7 @@ class ProfileRepostsTab extends ProfileTabBase { ), ); } else { - context.router.push( - StandalonePostRoute(postUri: postUri.toString()), - ); + context.router.push(StandalonePostRoute(postUri: postUri.toString())); } }); } @@ -115,24 +113,21 @@ class ProfileRepostsTab extends ProfileTabBase { mainAxisSpacing: 5, childAspectRatio: 9 / 16, ), - delegate: SliverChildBuilderDelegate( - (context, index) { - final postUri = filteredUris[index]; - final postView = state.postViews[postUri]; - final postSource = state.postSources[postUri]; + delegate: SliverChildBuilderDelegate((context, index) { + final postUri = filteredUris[index]; + final postView = state.postViews[postUri]; + final postSource = state.postSources[postUri]; - if (postView == null) { - return const SizedBox.shrink(); - } + if (postView == null) { + return const SizedBox.shrink(); + } - return ProfileGridTile( - postView: postView, - postSource: postSource, - onTap: () => onPostTap(context, ref, postUri), - ); - }, - childCount: filteredUris.length, - ), + return ProfileGridTile( + postView: postView, + postSource: postSource, + onTap: () => onPostTap(context, ref, postUri), + ); + }, childCount: filteredUris.length), ), ), // Bottom padding for tab bar diff --git a/lib/src/features/search/ui/pages/post_results.dart b/lib/src/features/search/ui/pages/post_results.dart index 878c514..34c18ec 100644 --- a/lib/src/features/search/ui/pages/post_results.dart +++ b/lib/src/features/search/ui/pages/post_results.dart @@ -175,37 +175,34 @@ class _PostResultsState extends ConsumerState mainAxisSpacing: 12, childAspectRatio: 0.45, // Adjust this to control card height ), - delegate: SliverChildBuilderDelegate( - (context, index) { - if (index >= state.searchResults.length) { - return const Center(child: CircularProgressIndicator()); - } - - final post = state.searchResults[index]; - final preferences = ref - .read(userPreferencesProvider) - .asData - ?.value; - final labels = post.labels ?? []; - final shouldBlur = - preferences != null && - labels.isNotEmpty && - LabelUtils.shouldBlurContent(preferences, labels); - - return PostTile( - thumbnailUrl: post.thumbnailUrl, - likes: post.likeCount ?? 0, - seen: false, - nsfwBlur: shouldBlur, - onTap: () { - context.router.push( - StandalonePostRoute(postUri: post.uri.toString()), - ); - }, - ); - }, - childCount: state.searchResults.length, - ), + delegate: SliverChildBuilderDelegate((context, index) { + if (index >= state.searchResults.length) { + return const Center(child: CircularProgressIndicator()); + } + + final post = state.searchResults[index]; + final preferences = ref + .read(userPreferencesProvider) + .asData + ?.value; + final labels = post.labels ?? []; + final shouldBlur = + preferences != null && + labels.isNotEmpty && + LabelUtils.shouldBlurContent(preferences, labels); + + return PostTile( + thumbnailUrl: post.thumbnailUrl, + likes: post.likeCount ?? 0, + seen: false, + nsfwBlur: shouldBlur, + onTap: () { + context.router.push( + StandalonePostRoute(postUri: post.uri.toString()), + ); + }, + ); + }, childCount: state.searchResults.length), ), ), @@ -219,9 +216,7 @@ class _PostResultsState extends ConsumerState ), // Bottom padding - const SliverToBoxAdapter( - child: SizedBox(height: 24), - ), + const SliverToBoxAdapter(child: SizedBox(height: 24)), ], ); } diff --git a/lib/src/features/search/ui/pages/search_page.dart b/lib/src/features/search/ui/pages/search_page.dart index ef7e329..194becb 100644 --- a/lib/src/features/search/ui/pages/search_page.dart +++ b/lib/src/features/search/ui/pages/search_page.dart @@ -90,9 +90,7 @@ class _SearchPageState extends ConsumerState { } void _onSuggestionSelected(ProfileViewBasic actor) { - context.router.push( - ProfileRoute(did: actor.did, initialProfile: actor), - ); + context.router.push(ProfileRoute(did: actor.did, initialProfile: actor)); } void _onSubmitted(String _) { @@ -118,20 +116,12 @@ class _SearchPageState extends ConsumerState { hintText: 'Search users, posts...', onSubmitted: _onSubmitted, textInputAction: TextInputAction.search, - leadingWidgets: const [ - Icon( - FluentIcons.search_24_regular, - size: 20, - ), - ], + leadingWidgets: const [Icon(FluentIcons.search_24_regular, size: 20)], actionWidgets: _searchController.text.isNotEmpty ? [ GestureDetector( onTap: _searchController.clear, - child: const Icon( - FluentIcons.dismiss_24_regular, - size: 20, - ), + child: const Icon(FluentIcons.dismiss_24_regular, size: 20), ), ] : null, @@ -144,10 +134,7 @@ class _SearchPageState extends ConsumerState { ], ), contentWidget: const TabBarView( - children: [ - PostResults(), - UserResults(), - ], + children: [PostResults(), UserResults()], ), emptyStateWidget: hasQuery ? _ActorTypeaheadSuggestions( @@ -166,9 +153,7 @@ class _SearchPageState extends ConsumerState { SliverToBoxAdapter(child: SuggestedFeedsList()), SliverFillRemaining( hasScrollBody: false, - child: Center( - child: Text('Discover new content'), - ), + child: Center(child: Text('Discover new content')), ), ], ), diff --git a/lib/src/features/settings/providers/settings_provider.dart b/lib/src/features/settings/providers/settings_provider.dart index 956445f..bdfeb62 100644 --- a/lib/src/features/settings/providers/settings_provider.dart +++ b/lib/src/features/settings/providers/settings_provider.dart @@ -86,9 +86,7 @@ class Settings extends _$Settings { Future _updatePreferences(Preferences preferences) async { await ref .read(userPreferencesProvider.notifier) - .updatePreferences( - preferences, - ); + .updatePreferences(preferences); } /// Loads the last active feed from local storage @@ -145,9 +143,7 @@ class Settings extends _$Settings { } // Return temporary default state that will be replaced by loadSettings() - return SettingsState( - activeFeed: defaultFeed, - ); + return SettingsState(activeFeed: defaultFeed); } /// Loads all settings from the preferences provider @@ -304,10 +300,7 @@ class Settings extends _$Settings { likedFeeds.add(updatedFeed); } - state = state.copyWith( - feeds: updatedFeeds, - likedFeeds: likedFeeds, - ); + state = state.copyWith(feeds: updatedFeeds, likedFeeds: likedFeeds); await _updateFeedsInPreferences(updatedFeeds); } @@ -337,10 +330,7 @@ class Settings extends _$Settings { .where((f) => f.config.id != updatedFeed.config.id) .toList(); - state = state.copyWith( - feeds: updatedFeeds, - likedFeeds: likedFeeds, - ); + state = state.copyWith(feeds: updatedFeeds, likedFeeds: likedFeeds); await _updateFeedsInPreferences(updatedFeeds); } @@ -478,10 +468,7 @@ class Settings extends _$Settings { return feeds.firstWhere((feed) => feed.config.id == activeSavedFeed!.id); } catch (e) { // Fallback to creating feed without view if not found - return Feed( - type: activeSavedFeed.type, - config: activeSavedFeed, - ); + return Feed(type: activeSavedFeed.type, config: activeSavedFeed); } } @@ -511,9 +498,7 @@ class Settings extends _$Settings { preferences.preferences .where((pref) => !pref.isLabelersPref(pref)) .toList() - ..add( - Preference.labelersPref(labelers: updatedLabelers), - ); + ..add(Preference.labelersPref(labelers: updatedLabelers)); await _updatePreferences( Preferences(preferences: updatedPreferencesList), @@ -571,9 +556,7 @@ class Settings extends _$Settings { preferences.preferences .where((pref) => !pref.isLabelersPref(pref)) .toList() - ..add( - Preference.labelersPref(labelers: updatedLabelers), - ); + ..add(Preference.labelersPref(labelers: updatedLabelers)); await _updatePreferences( Preferences(preferences: updatedPreferencesList), @@ -615,9 +598,7 @@ class Settings extends _$Settings { preferences.preferences .where((pref) => !pref.isLabelersPref(pref)) .toList() - ..add( - Preference.labelersPref(labelers: updatedLabelers), - ); + ..add(Preference.labelersPref(labelers: updatedLabelers)); await _updatePreferences( Preferences(preferences: updatedPreferencesList), @@ -656,9 +637,7 @@ class Settings extends _$Settings { preferences.preferences .where((pref) => !pref.isLabelersPref(pref)) .toList() - ..add( - Preference.labelersPref(labelers: updatedLabelers), - ); + ..add(Preference.labelersPref(labelers: updatedLabelers)); await _updatePreferences( Preferences(preferences: updatedPreferencesList), ); @@ -911,11 +890,7 @@ class Settings extends _$Settings { } bool _isAdultOnlyLabel(String label) { - const adultOnlyLabels = { - 'porn', - 'sexual', - 'nsfl', - }; + const adultOnlyLabels = {'porn', 'sexual', 'nsfl'}; return adultOnlyLabels.contains(label); } diff --git a/lib/src/features/settings/ui/pages/feed_list_page.dart b/lib/src/features/settings/ui/pages/feed_list_page.dart index 21bb297..d495c81 100644 --- a/lib/src/features/settings/ui/pages/feed_list_page.dart +++ b/lib/src/features/settings/ui/pages/feed_list_page.dart @@ -55,10 +55,7 @@ class _FeedListPageState extends ConsumerState ), style: TextButton.styleFrom( foregroundColor: colorScheme.primary, - padding: const EdgeInsets.symmetric( - horizontal: 12, - vertical: 8, - ), + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), ), ), ], diff --git a/lib/src/features/settings/ui/pages/labeler_label_settings_page.dart b/lib/src/features/settings/ui/pages/labeler_label_settings_page.dart index 1da7b26..8d18d66 100644 --- a/lib/src/features/settings/ui/pages/labeler_label_settings_page.dart +++ b/lib/src/features/settings/ui/pages/labeler_label_settings_page.dart @@ -19,10 +19,7 @@ import 'package:spark/src/features/settings/ui/widgets/widgets.dart'; class LabelerLabelSettingsPage extends ConsumerStatefulWidget { final String did; - const LabelerLabelSettingsPage({ - required this.did, - super.key, - }); + const LabelerLabelSettingsPage({required this.did, super.key}); @override ConsumerState createState() => @@ -248,11 +245,7 @@ class _LabelerLabelSettingsPageState } bool _isAdultOnlyLabel(String label) { - const adultOnlyLabels = { - 'porn', - 'sexual', - 'nsfl', - }; + const adultOnlyLabels = {'porn', 'sexual', 'nsfl'}; return adultOnlyLabels.contains(label); } diff --git a/lib/src/features/settings/ui/pages/labeler_management_page.dart b/lib/src/features/settings/ui/pages/labeler_management_page.dart index 3c3f932..3e6425f 100644 --- a/lib/src/features/settings/ui/pages/labeler_management_page.dart +++ b/lib/src/features/settings/ui/pages/labeler_management_page.dart @@ -77,9 +77,7 @@ class _LabelerManagementPageState extends ConsumerState for (final did in dids) { try { - final profile = profiles.firstWhere( - (p) => p.did == did, - ); + final profile = profiles.firstWhere((p) => p.did == did); profileMap[did] = profile; } catch (_) { profileMap[did] = null; @@ -306,76 +304,73 @@ class _LabelerManagementPageState extends ConsumerState ) else SliverList( - delegate: SliverChildBuilderDelegate( - (context, index) { - final did = _labelerDids[index]; - final profile = _labelerProfiles[did]; - final isDefault = did == _defaultModServiceDid; - - return Padding( - padding: const EdgeInsets.symmetric( - horizontal: 16, - vertical: 4, - ), - child: Card( - child: InkWell( - onTap: () { - context.router.push( - LabelerLabelSettingsRoute(did: did), - ); - }, - borderRadius: BorderRadius.circular(12), - child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: 8, - vertical: 4, - ), - child: Row( - children: [ - Expanded( - child: profile != null - ? _buildProfileCardWithoutBorder( - profile: profile, - colorScheme: colorScheme, - isDefault: isDefault, - ) - : _buildFallbackLabelerCard( - did, - colorScheme, - isDefault: isDefault, - ), + delegate: SliverChildBuilderDelegate((context, index) { + final did = _labelerDids[index]; + final profile = _labelerProfiles[did]; + final isDefault = did == _defaultModServiceDid; + + return Padding( + padding: const EdgeInsets.symmetric( + horizontal: 16, + vertical: 4, + ), + child: Card( + child: InkWell( + onTap: () { + context.router.push( + LabelerLabelSettingsRoute(did: did), + ); + }, + borderRadius: BorderRadius.circular(12), + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 8, + vertical: 4, + ), + child: Row( + children: [ + Expanded( + child: profile != null + ? _buildProfileCardWithoutBorder( + profile: profile, + colorScheme: colorScheme, + isDefault: isDefault, + ) + : _buildFallbackLabelerCard( + did, + colorScheme, + isDefault: isDefault, + ), + ), + IconButton( + padding: EdgeInsets.zero, + constraints: const BoxConstraints(), + icon: AppIcons.gear( + color: colorScheme.onSurface, ), + onPressed: () { + context.router.push( + LabelerLabelSettingsRoute(did: did), + ); + }, + tooltip: 'Label settings', + ), + if (!isDefault) IconButton( padding: EdgeInsets.zero, constraints: const BoxConstraints(), - icon: AppIcons.gear( - color: colorScheme.onSurface, - ), - onPressed: () { - context.router.push( - LabelerLabelSettingsRoute(did: did), - ); - }, - tooltip: 'Label settings', + icon: const Icon(Icons.delete_outline), + color: colorScheme.error, + onPressed: () => _removeLabeler(did), + tooltip: 'Remove labeler', ), - if (!isDefault) - IconButton( - padding: EdgeInsets.zero, - constraints: const BoxConstraints(), - icon: const Icon(Icons.delete_outline), - color: colorScheme.error, - onPressed: () => _removeLabeler(did), - tooltip: 'Remove labeler', - ), - ], - ), + ], ), ), ), - ); - }, - childCount: _labelerDids.length, - ), + ), + ); + }, childCount: _labelerDids.length), ), ], ), diff --git a/lib/src/features/settings/ui/pages/settings_page.dart b/lib/src/features/settings/ui/pages/settings_page.dart index 9a106f5..8834685 100644 --- a/lib/src/features/settings/ui/pages/settings_page.dart +++ b/lib/src/features/settings/ui/pages/settings_page.dart @@ -25,9 +25,7 @@ class _SettingsPageState extends ConsumerState { showDialog( context: context, barrierDismissible: false, - builder: (context) => const Center( - child: CircularProgressIndicator(), - ), + builder: (context) => const Center(child: CircularProgressIndicator()), ); // Call logout on the auth provider @@ -56,9 +54,7 @@ class _SettingsPageState extends ConsumerState { showDialog( context: context, barrierDismissible: false, - builder: (context) => const Center( - child: CircularProgressIndicator(), - ), + builder: (context) => const Center(child: CircularProgressIndicator()), ); final authRepository = GetIt.instance(); @@ -199,9 +195,7 @@ class _SettingsPageState extends ConsumerState { backgroundColor: Theme.of(context).colorScheme.surface, elevation: 0, leading: const AppLeadingButton(), - title: const Text( - 'Settings', - ), + title: const Text('Settings'), centerTitle: true, ), body: ListView( diff --git a/lib/src/features/sound/ui/pages/sound_page.dart b/lib/src/features/sound/ui/pages/sound_page.dart index adaf1c6..24eaa0d 100644 --- a/lib/src/features/sound/ui/pages/sound_page.dart +++ b/lib/src/features/sound/ui/pages/sound_page.dart @@ -169,10 +169,7 @@ class _SoundPageState extends ConsumerState { } class _SoundPostTile extends StatelessWidget { - const _SoundPostTile({ - required this.post, - required this.onTap, - }); + const _SoundPostTile({required this.post, required this.onTap}); final PostView post; final VoidCallback onTap; diff --git a/lib/src/features/sound/ui/widgets/sound_header_card.dart b/lib/src/features/sound/ui/widgets/sound_header_card.dart index 61d1c8c..32bffe7 100644 --- a/lib/src/features/sound/ui/widgets/sound_header_card.dart +++ b/lib/src/features/sound/ui/widgets/sound_header_card.dart @@ -72,10 +72,7 @@ class _SoundHeaderCardState extends State { // Title with music icon Row( children: [ - AppIcons.music( - size: 16, - color: colorScheme.primary, - ), + AppIcons.music(size: 16, color: colorScheme.primary), const SizedBox(width: 8), Expanded( child: Text( @@ -144,10 +141,7 @@ class _SoundHeaderCardState extends State { } class _CoverArtWithPlayer extends StatefulWidget { - const _CoverArtWithPlayer({ - required this.coverArtUrl, - this.audioUrl, - }); + const _CoverArtWithPlayer({required this.coverArtUrl, this.audioUrl}); final String coverArtUrl; final String? audioUrl; @@ -286,10 +280,7 @@ class _CoverArtWithPlayerState extends State<_CoverArtWithPlayer> { ), errorWidget: (context, url, error) => ColoredBox( color: AppColors.grey700, - child: AppIcons.music( - size: 32, - color: AppColors.grey400, - ), + child: AppIcons.music(size: 32, color: AppColors.grey400), ), ), ), diff --git a/lib/src/features/stories/providers/stories_by_author.dart b/lib/src/features/stories/providers/stories_by_author.dart index 7d2e9fd..64e46e4 100644 --- a/lib/src/features/stories/providers/stories_by_author.dart +++ b/lib/src/features/stories/providers/stories_by_author.dart @@ -8,11 +8,7 @@ part 'stories_by_author.g.dart'; FutureOr< ({Map> storiesByAuthor, String? cursor}) > -storiesByAuthor( - Ref ref, { - int limit = 30, - String? cursor, -}) async { +storiesByAuthor(Ref ref, {int limit = 30, String? cursor}) async { final storyRepository = GetIt.instance(); final result = await storyRepository.getStoriesTimeline( limit: limit, diff --git a/lib/src/features/stories/ui/pages/author_stories_page.dart b/lib/src/features/stories/ui/pages/author_stories_page.dart index c0cb0c3..99cddd1 100644 --- a/lib/src/features/stories/ui/pages/author_stories_page.dart +++ b/lib/src/features/stories/ui/pages/author_stories_page.dart @@ -72,10 +72,7 @@ class _AuthorStoriesPageState extends ConsumerState void _initializeProgressControllers() { _progressControllers = List.generate( widget.stories.length, - (_) => AnimationController( - duration: _defaultStoryDuration, - vsync: this, - ), + (_) => AnimationController(duration: _defaultStoryDuration, vsync: this), ); _storyLoadingStates = List.filled(widget.stories.length, true); } diff --git a/lib/src/features/stories/ui/pages/story_manager_page.dart b/lib/src/features/stories/ui/pages/story_manager_page.dart index 871537a..f71f550 100644 --- a/lib/src/features/stories/ui/pages/story_manager_page.dart +++ b/lib/src/features/stories/ui/pages/story_manager_page.dart @@ -66,9 +66,7 @@ class StoryManagerPage extends ConsumerWidget { final autoDeletePref = ref.watch(storyAutoDeletePrefProvider); return Scaffold( - appBar: AppBar( - title: const Text('Story Manager'), - ), + appBar: AppBar(title: const Text('Story Manager')), body: asyncState.when( data: (data) { return RefreshIndicator( diff --git a/lib/src/features/stories/ui/widgets/stories_list.dart b/lib/src/features/stories/ui/widgets/stories_list.dart index 272a953..973c6c4 100644 --- a/lib/src/features/stories/ui/widgets/stories_list.dart +++ b/lib/src/features/stories/ui/widgets/stories_list.dart @@ -20,10 +20,7 @@ class _StoriesListState extends ConsumerState { void _openStoryRecorder(BuildContext context) { context.router.push( - RecordingRoute( - storyMode: true, - captureMode: CaptureMode.hybrid, - ), + RecordingRoute(storyMode: true, captureMode: CaptureMode.hybrid), ); } diff --git a/pubspec.lock b/pubspec.lock index 5bb5a8b..42f8b87 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1073,10 +1073,10 @@ packages: dependency: transitive description: name: matcher - sha256: "12956d0ad8390bbcc63ca2e1469c0619946ccb52809807067a7020d57e647aa6" + sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861 url: "https://pub.dev" source: hosted - version: "0.12.18" + version: "0.12.19" material_color_utilities: dependency: transitive description: @@ -1313,10 +1313,10 @@ packages: dependency: "direct main" description: name: posthog_flutter - sha256: "04f95017238189fdc57146591a5a665398165dc7add86304345bbc2a7175194f" + sha256: "470eb55c5265e61bdcac7d720fa9de1306746a6086fe59dc06d2254d794705ed" url: "https://pub.dev" source: hosted - version: "5.19.0" + version: "5.20.0" pro_image_editor: dependency: "direct main" description: @@ -1663,26 +1663,26 @@ packages: dependency: transitive description: name: test - sha256: "54c516bbb7cee2754d327ad4fca637f78abfc3cbcc5ace83b3eda117e42cd71a" + sha256: "280d6d890011ca966ad08df7e8a4ddfab0fb3aa49f96ed6de56e3521347a9ae7" url: "https://pub.dev" source: hosted - version: "1.29.0" + version: "1.30.0" test_api: dependency: transitive description: name: test_api - sha256: "93167629bfc610f71560ab9312acdda4959de4df6fac7492c89ff0d3886f6636" + sha256: "8161c84903fd860b26bfdefb7963b3f0b68fee7adea0f59ef805ecca346f0c7a" url: "https://pub.dev" source: hosted - version: "0.7.9" + version: "0.7.10" test_core: dependency: transitive description: name: test_core - sha256: "394f07d21f0f2255ec9e3989f21e54d3c7dc0e6e9dbce160e5a9c1a6be0e2943" + sha256: "0381bd1585d1a924763c308100f2138205252fb90c9d4eeaf28489ee65ccde51" url: "https://pub.dev" source: hosted - version: "0.6.15" + version: "0.6.16" typed_data: dependency: transitive description: @@ -1795,14 +1795,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.0" - very_good_analysis: - dependency: "direct dev" - description: - name: very_good_analysis - sha256: d1cb1d66a5aae2c702d68caca6c8347306d35e728fd94555fa21fa0448a972e0 - url: "https://pub.dev" - source: hosted - version: "10.2.0" video_player: dependency: "direct main" description: @@ -1863,18 +1855,18 @@ packages: dependency: transitive description: name: wakelock_plus - sha256: "9296d40c9adbedaba95d1e704f4e0b434be446e2792948d0e4aa977048104228" + sha256: e4e125b7c1a2f0e491e5452afdc0e25ab77b2d2775a7caa231fcc1c1f2162c47 url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.5.0" wakelock_plus_platform_interface: dependency: transitive description: name: wakelock_plus_platform_interface - sha256: "036deb14cd62f558ca3b73006d52ce049fabcdcb2eddfe0bf0fe4e8a943b5cf2" + sha256: "24b84143787220a403491c2e5de0877fbbb87baf3f0b18a2a988973863db4b03" url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.0" watcher: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 91a2525..4347741 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -80,7 +80,6 @@ dev_dependencies: sdk: flutter json_serializable: ^6.11.2 riverpod_generator: ^4.0.3 - very_good_analysis: ^10.2.0 flutter_launcher_icons: android: true -- 2.51.2