[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.

blur

C3B 783ba0aa 074e25ae

+31 -1
+31 -1
lib/screens/home_screen.dart
··· 1 1 import 'package:flutter/cupertino.dart'; 2 - import 'package:flutter/material.dart' show Colors; 2 + import 'package:flutter/material.dart' show Colors, BackdropFilter; 3 + import 'dart:ui'; // For ImageFilter 3 4 import 'package:ionicons/ionicons.dart'; 4 5 import '../widgets/video_side_action_bar.dart'; 5 6 import '../widgets/video_info/video_info_bar.dart'; ··· 184 185 child: Stack( 185 186 fit: StackFit.expand, 186 187 children: [ 188 + // Blurred video background (only if video is initialized) 189 + if (widget.videoUrl != null && _controller != null && _isInitialized) 190 + _buildBlurredBackground(), 191 + 187 192 // Video content 188 193 Center( 189 194 child: _buildVideoContent(), ··· 266 271 ], 267 272 ), 268 273 ), 274 + ); 275 + } 276 + 277 + // New method to build the blurred background 278 + Widget _buildBlurredBackground() { 279 + return Stack( 280 + fit: StackFit.expand, 281 + children: [ 282 + // Scaled version of the video that fills the entire background 283 + FittedBox( 284 + fit: BoxFit.cover, 285 + child: SizedBox( 286 + width: _controller!.value.size.width, 287 + height: _controller!.value.size.height, 288 + child: VideoPlayer(_controller!), 289 + ), 290 + ), 291 + // Blur filter overlay 292 + BackdropFilter( 293 + filter: ImageFilter.blur(sigmaX: 25.0, sigmaY: 25.0), 294 + child: Container( 295 + color: CupertinoColors.black.withOpacity(0.3), // Darkens the blur slightly 296 + ), 297 + ), 298 + ], 269 299 ); 270 300 } 271 301