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

settings page

+61 -47
+4 -3
lib/src/core/routing/app_router.dart
··· 84 84 85 85 AutoRoute(page: EditProfileRoute.page, path: '/profile-editor'), 86 86 87 - AutoRoute(page: ProfileSettingsRoute.page, path: '/profile-settings'), 88 - AutoRoute(page: BlocksRoute.page, path: '/blocks'), 87 + AutoRoute(page: SettingsRoute.page, path: '/settings'), 88 + AutoRoute(page: LabelerManagementRoute.page, path: '/settings/labelers'), 89 + AutoRoute(page: BlocksRoute.page, path: '/settings/blocks'), 89 90 90 91 // Messages/DMs routes 91 92 AutoRoute(page: ChatRoute.page, path: '/chat/:conversationId'), ··· 105 106 ), 106 107 CustomRoute( 107 108 page: FeedSettingsRoute.page, 108 - path: '/settings', 109 + path: '/feed-settings', 109 110 customRouteBuilder: feedSettingsBuilder, 110 111 ), 111 112 CustomRoute(
+1 -1
lib/src/core/routing/pages.dart
··· 27 27 export 'package:spark/src/features/settings/ui/pages/feed_settings_page.dart'; 28 28 export 'package:spark/src/features/settings/ui/pages/labeler_label_settings_page.dart'; 29 29 export 'package:spark/src/features/settings/ui/pages/labeler_management_page.dart'; 30 - export 'package:spark/src/features/settings/ui/pages/profile_settings_page.dart'; 30 + export 'package:spark/src/features/settings/ui/pages/settings_page.dart'; 31 31 export 'package:spark/src/features/sound/ui/pages/sound_page.dart'; 32 32 export 'package:spark/src/features/stories/ui/pages/all_stories_page.dart'; 33 33 export 'package:spark/src/features/stories/ui/pages/author_stories_page.dart';
+3 -4
lib/src/features/profile/ui/pages/profile_page.dart
··· 215 215 child: IconButton( 216 216 padding: EdgeInsets.zero, 217 217 onPressed: () => 218 - context.router.push(const ProfileSettingsRoute()), 218 + context.router.push(const SettingsRoute()), 219 219 icon: AppIcons.gear(color: colorScheme.onSurface), 220 220 ), 221 221 ), ··· 291 291 padding: const EdgeInsets.only(right: 8), 292 292 child: IconButton( 293 293 padding: EdgeInsets.zero, 294 - onPressed: () => 295 - context.router.push(const ProfileSettingsRoute()), 294 + onPressed: () => context.router.push(const SettingsRoute()), 296 295 icon: AppIcons.gear(color: colorScheme.onSurface), 297 296 ), 298 297 ) ··· 447 446 child: IconButton( 448 447 padding: EdgeInsets.zero, 449 448 onPressed: () => 450 - context.router.push(const ProfileSettingsRoute()), 449 + context.router.push(const SettingsRoute()), 451 450 icon: AppIcons.gear(color: colorScheme.onSurface), 452 451 ), 453 452 ),
+23 -22
lib/src/features/settings/ui/pages/labeler_management_page.dart
··· 3 3 import 'package:flutter/material.dart'; 4 4 import 'package:flutter_riverpod/flutter_riverpod.dart'; 5 5 import 'package:get_it/get_it.dart'; 6 + import 'package:spark/src/core/design_system/components/atoms/buttons/app_leading_button.dart'; 6 7 import 'package:spark/src/core/design_system/components/atoms/icons.dart'; 7 8 import 'package:spark/src/core/l10n/app_localizations.dart'; 8 9 import 'package:spark/src/core/network/atproto/data/models/actor_models.dart'; ··· 214 215 if (_isLoading) { 215 216 return Scaffold( 216 217 backgroundColor: colorScheme.surface, 218 + appBar: AppBar( 219 + backgroundColor: colorScheme.surface, 220 + elevation: 0, 221 + leading: const AppLeadingButton(), 222 + title: const Text('Labelers'), 223 + centerTitle: true, 224 + ), 217 225 body: const Center(child: CircularProgressIndicator()), 218 226 ); 219 227 } 220 228 221 229 return Scaffold( 222 230 backgroundColor: colorScheme.surface, 231 + appBar: AppBar( 232 + backgroundColor: colorScheme.surface, 233 + elevation: 0, 234 + leading: const AppLeadingButton(), 235 + title: const Text('Labelers'), 236 + centerTitle: true, 237 + ), 223 238 body: RefreshIndicator( 224 239 onRefresh: _loadLabelers, 225 240 child: CustomScrollView( 226 241 slivers: [ 227 - // Header section 242 + // Description section 228 243 SliverToBoxAdapter( 229 244 child: Padding( 230 245 padding: const EdgeInsets.all(16), 231 - child: Column( 232 - crossAxisAlignment: CrossAxisAlignment.start, 233 - children: [ 234 - Text( 235 - 'Labelers', 236 - style: TextStyle( 237 - fontSize: 20, 238 - fontWeight: FontWeight.bold, 239 - color: colorScheme.onSurface, 240 - ), 241 - ), 242 - const SizedBox(height: 8), 243 - Text( 244 - 'Manage the labelers that provide content moderation ' 245 - 'labels for your feeds.', 246 - style: TextStyle( 247 - color: colorScheme.onSurface.withAlpha(178), 248 - fontSize: 14, 249 - ), 250 - ), 251 - ], 246 + child: Text( 247 + 'Manage the labelers that provide content moderation ' 248 + 'labels for your feeds.', 249 + style: TextStyle( 250 + color: colorScheme.onSurface.withAlpha(178), 251 + fontSize: 14, 252 + ), 252 253 ), 253 254 ), 254 255 ),
+29 -7
lib/src/features/settings/ui/pages/profile_settings_page.dart lib/src/features/settings/ui/pages/settings_page.dart
··· 11 11 import 'package:spark/src/features/auth/providers/auth_providers.dart'; 12 12 13 13 @RoutePage() 14 - class ProfileSettingsPage extends ConsumerStatefulWidget { 15 - const ProfileSettingsPage({super.key}); 14 + class SettingsPage extends ConsumerStatefulWidget { 15 + const SettingsPage({super.key}); 16 16 17 17 @override 18 - ConsumerState<ProfileSettingsPage> createState() => 19 - _ProfileSettingsPageState(); 18 + ConsumerState<SettingsPage> createState() => _SettingsPageState(); 20 19 } 21 20 22 - class _ProfileSettingsPageState extends ConsumerState<ProfileSettingsPage> { 21 + class _SettingsPageState extends ConsumerState<SettingsPage> { 23 22 Future<void> _handleLogout() async { 24 23 try { 25 24 // Show loading indicator ··· 50 49 } 51 50 52 51 Future<void> _handleUpdateSparkPosts() async { 53 - final logger = GetIt.instance<LogService>().getLogger('ProfileSettings'); 52 + final logger = GetIt.instance<LogService>().getLogger('Settings'); 54 53 55 54 try { 56 55 // Show loading indicator ··· 201 200 elevation: 0, 202 201 leading: const AppLeadingButton(), 203 202 title: const Text( 204 - 'Profile Settings', 203 + 'Settings', 205 204 ), 206 205 centerTitle: true, 207 206 ), 208 207 body: ListView( 209 208 padding: const EdgeInsets.symmetric(horizontal: 16), 210 209 children: [ 210 + Padding( 211 + padding: const EdgeInsets.symmetric(vertical: 8), 212 + child: Container( 213 + decoration: BoxDecoration( 214 + color: Theme.of( 215 + context, 216 + ).colorScheme.surfaceContainerHighest.withValues(alpha: 0.5), 217 + borderRadius: BorderRadius.circular(12), 218 + ), 219 + child: ListTile( 220 + title: const Text( 221 + 'Labelers', 222 + style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold), 223 + ), 224 + trailing: const Icon(FluentIcons.tag_24_regular), 225 + onTap: () => context.router.push(const LabelerManagementRoute()), 226 + contentPadding: const EdgeInsets.symmetric( 227 + horizontal: 16, 228 + vertical: 4, 229 + ), 230 + ), 231 + ), 232 + ), 211 233 Padding( 212 234 padding: const EdgeInsets.symmetric(vertical: 8), 213 235 child: Container(
-8
pubspec.lock
··· 459 459 url: "https://pub.dev" 460 460 source: hosted 461 461 version: "1.0.2" 462 - cupertino_icons: 463 - dependency: "direct main" 464 - description: 465 - name: cupertino_icons 466 - sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 467 - url: "https://pub.dev" 468 - source: hosted 469 - version: "1.0.8" 470 462 custom_lint_core: 471 463 dependency: transitive 472 464 description:
+1 -2
pubspec.yaml
··· 22 22 better_player_plus: ^1.1.5 23 23 bluesky: ^1.3.0 24 24 cached_network_image: ^3.3.1 25 - camera: ^0.11.1 25 + camera: ^0.11.3 26 26 collection: ^1.19.1 27 - cupertino_icons: ^1.0.8 28 27 fluentui_system_icons: ^1.1.273 29 28 flutter: 30 29 sdk: flutter