forge
login
or
join now
sprk.so
/
client
star
10
fork
atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
[READ ONLY MIRROR] Open Source TikTok alternative built on AT Protocol
github.com/sprksocial/client
flutter
atproto
video
dart
star
10
fork
atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
overview
issues
1
pulls
pipelines
blur
C3B
1 year ago
783ba0aa
074e25ae
+31
-1
1 changed file
expand all
collapse all
unified
split
lib
screens
home_screen.dart
+31
-1
lib/screens/home_screen.dart
reviewed
···
1
1
import 'package:flutter/cupertino.dart';
2
2
-
import 'package:flutter/material.dart' show Colors;
2
2
+
import 'package:flutter/material.dart' show Colors, BackdropFilter;
3
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
188
+
// Blurred video background (only if video is initialized)
189
189
+
if (widget.videoUrl != null && _controller != null && _isInitialized)
190
190
+
_buildBlurredBackground(),
191
191
+
187
192
// Video content
188
193
Center(
189
194
child: _buildVideoContent(),
···
266
271
],
267
272
),
268
273
),
274
274
+
);
275
275
+
}
276
276
+
277
277
+
// New method to build the blurred background
278
278
+
Widget _buildBlurredBackground() {
279
279
+
return Stack(
280
280
+
fit: StackFit.expand,
281
281
+
children: [
282
282
+
// Scaled version of the video that fills the entire background
283
283
+
FittedBox(
284
284
+
fit: BoxFit.cover,
285
285
+
child: SizedBox(
286
286
+
width: _controller!.value.size.width,
287
287
+
height: _controller!.value.size.height,
288
288
+
child: VideoPlayer(_controller!),
289
289
+
),
290
290
+
),
291
291
+
// Blur filter overlay
292
292
+
BackdropFilter(
293
293
+
filter: ImageFilter.blur(sigmaX: 25.0, sigmaY: 25.0),
294
294
+
child: Container(
295
295
+
color: CupertinoColors.black.withOpacity(0.3), // Darkens the blur slightly
296
296
+
),
297
297
+
),
298
298
+
],
269
299
);
270
300
}
271
301