[READ ONLY MIRROR] Open Source TikTok alternative built on AT Protocol github.com/sprksocial/client
flutter atproto video dart
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: format & fix analyzer issues

+22 -18
+2 -1
lib/src/core/network/atproto/data/repositories/feed_repository_impl.dart
··· 747 747 feeds.add(Feed(type: 'feed', config: savedFeed, view: view)); 748 748 } else { 749 749 _logger.w( 750 - 'Feed generator view not found for ${isBskyFeed ? 'Bluesky' : 'Spark'} feed: $feedUri', 750 + 'Feed generator view not found for ' 751 + '${isBskyFeed ? 'Bluesky' : 'Spark'} feed: $feedUri', 751 752 ); 752 753 // Fallback: create feed without view 753 754 feeds.add(Feed(type: 'feed', config: savedFeed));
+1 -2
lib/src/features/feed/ui/widgets/images/image_carousel.dart
··· 30 30 @override 31 31 void initState() { 32 32 super.initState(); 33 - _pageController = PageController(initialPage: 0); 33 + _pageController = PageController(); 34 34 currentIndex = 0; 35 35 // Create image providers for all images upfront 36 36 _imageProviders = widget.imageUrls ··· 61 61 } 62 62 }); 63 63 } 64 - 65 64 66 65 @override 67 66 void dispose() {
+19 -15
lib/src/features/feed/ui/widgets/images/moderate_page_scroll_physics.dart
··· 21 21 bool get allowImplicitScrolling => true; 22 22 23 23 @override 24 - double get minFlingVelocity => 200; // Between default (50) and feed snappy (400) 24 + double get minFlingVelocity => 200; // Between default 50 & feed snappy 400 25 25 26 26 @override 27 - double get minFlingDistance => 25; // Between default (0) and feed snappy (20) 27 + double get minFlingDistance => 25; // Between default 0 & feed snappy 20 28 28 29 29 @override 30 30 Tolerance get tolerance => const Tolerance( ··· 38 38 double velocity, 39 39 ) { 40 40 // Only snap if there's actual user interaction 41 - // Don't snap on initial load or when position is at boundaries with no velocity 41 + // Don't snap on initial load or when position at boundaries w/ no velocity 42 42 final hasVelocity = velocity.abs() >= tolerance.velocity; 43 - 44 - // Check if we're at a boundary - if so, only snap if there's significant velocity 45 - final isAtMinBoundary = (position.pixels - position.minScrollExtent).abs() < 1.0; 46 - final isAtMaxBoundary = (position.maxScrollExtent - position.pixels).abs() < 1.0; 47 - 43 + 44 + // Check if we're at a boundary - if so, only snap if significant velocity 45 + final isAtMinBoundary = 46 + (position.pixels - position.minScrollExtent).abs() < 1.0; 47 + final isAtMaxBoundary = 48 + (position.maxScrollExtent - position.pixels).abs() < 1.0; 49 + 48 50 // If at boundaries with no velocity, don't snap 49 51 if ((isAtMinBoundary || isAtMaxBoundary) && !hasVelocity) { 50 52 return super.createBallisticSimulation(position, velocity); 51 53 } 52 - 54 + 53 55 // Check for significant drag (user has actually moved the page) 54 - final hasSignificantDrag = (position.pixels - position.minScrollExtent).abs() > minFlingDistance && 55 - !isAtMinBoundary && !isAtMaxBoundary; 56 - 56 + final hasSignificantDrag = 57 + (position.pixels - position.minScrollExtent).abs() > minFlingDistance && 58 + !isAtMinBoundary && 59 + !isAtMaxBoundary; 60 + 57 61 if (hasVelocity || hasSignificantDrag) { 58 62 final targetPage = _getTargetPage(position, velocity); 59 63 final target = targetPage * position.viewportDimension; ··· 89 93 90 94 // If dragged past 50% threshold, snap to next page (less aggressive than feed's 30%/70%) 91 95 final progress = page - page.floor(); 92 - 96 + 93 97 // At first page (0), only snap forward if dragged significantly past 50% 94 98 if (currentPage == 0) { 95 99 if (progress > 0.6 && currentPage < maxPage) { ··· 97 101 } 98 102 return 0; // Stay on first page unless dragged significantly 99 103 } 100 - 104 + 101 105 // At last page, only snap backward if dragged significantly 102 106 if (currentPage >= maxPage) { 103 107 if (progress < 0.4 && currentPage > 0) { ··· 105 109 } 106 110 return maxPage; // Stay on last page unless dragged significantly 107 111 } 108 - 112 + 109 113 // Middle pages: use 50% threshold 110 114 if (progress > 0.5 && currentPage < maxPage) { 111 115 // Snap forward if dragged past 50%