happy ending
This commit is contained in:
@@ -4,7 +4,6 @@ import 'package:go_router/go_router.dart';
|
||||
|
||||
import '../../../../core/theme/app_colors.dart';
|
||||
import '../../../../core/widgets/riotz_scaffold.dart';
|
||||
import '../../../../core/widgets/riotz_button.dart';
|
||||
import '../../../music/domain/models/track_model.dart';
|
||||
import '../providers/admin_providers.dart';
|
||||
import '../../domain/models/admin_user_model.dart';
|
||||
@@ -15,7 +14,6 @@ class AdminScreen extends ConsumerWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final theme = Theme.of(context);
|
||||
final dataAsync = ref.watch(adminPanelDataProvider);
|
||||
|
||||
ref.listen(adminControllerProvider, (_, next) {
|
||||
@@ -163,7 +161,7 @@ class _AdminTrackCard extends ConsumerWidget {
|
||||
subtitle: Text('BY: ${track.username.toUpperCase()}', style: const TextStyle(fontSize: 10, color: AppColors.grey)),
|
||||
trailing: Switch(
|
||||
value: track.featured,
|
||||
activeColor: AppColors.success,
|
||||
activeThumbColor: AppColors.success,
|
||||
onChanged: (val) {
|
||||
ref.read(adminControllerProvider.notifier).setTrackFeatured(trackId: track.id, featured: val);
|
||||
},
|
||||
@@ -207,7 +205,7 @@ class _AdminPostCard extends ConsumerWidget {
|
||||
const Spacer(),
|
||||
Switch(
|
||||
value: post.featured,
|
||||
activeColor: AppColors.neonRed,
|
||||
activeThumbColor: AppColors.neonRed,
|
||||
onChanged: (val) {
|
||||
ref.read(adminControllerProvider.notifier).setPostFeatured(postId: post.id, featured: val);
|
||||
},
|
||||
|
||||
@@ -11,13 +11,13 @@ final authServiceProvider = Provider<AuthService>((ref) {
|
||||
|
||||
final authStateChangesProvider = StreamProvider<AuthState>((ref) {
|
||||
final service = ref.watch(authServiceProvider);
|
||||
return service.authStateChanges();
|
||||
return service.onAuthStateChange;
|
||||
});
|
||||
|
||||
final currentSessionProvider = StreamProvider<Session?>((ref) async* {
|
||||
final service = ref.watch(authServiceProvider);
|
||||
yield service.currentSession;
|
||||
await for (final event in service.authStateChanges()) {
|
||||
await for (final event in service.onAuthStateChange) {
|
||||
yield event.session;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -27,7 +27,6 @@ class _DiscoverPageState extends ConsumerState<DiscoverPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
final discoverAsync = ref.watch(discoverDataProvider);
|
||||
|
||||
return RiotzScaffold(
|
||||
@@ -225,7 +224,7 @@ class _DiscoveryGridTile extends StatelessWidget {
|
||||
right: 0,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
color: AppColors.black.withOpacity(0.7),
|
||||
color: AppColors.black.withValues(alpha: 0.7),
|
||||
child: Text(
|
||||
post.username.toUpperCase(),
|
||||
style: const TextStyle(fontSize: 10, fontWeight: FontWeight.bold),
|
||||
|
||||
@@ -15,7 +15,6 @@ class DiscoverScreen extends ConsumerStatefulWidget {
|
||||
|
||||
class _DiscoverScreenState extends ConsumerState<DiscoverScreen> {
|
||||
final _searchController = TextEditingController();
|
||||
String _query = '';
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
@@ -43,7 +42,7 @@ class _DiscoverScreenState extends ConsumerState<DiscoverScreen> {
|
||||
prefixIcon: Icon(Icons.search, color: AppColors.white),
|
||||
hintText: 'SEARCH THE VOID...',
|
||||
),
|
||||
onChanged: (value) => setState(() => _query = value.trim()),
|
||||
onChanged: (_) {},
|
||||
),
|
||||
const SizedBox(height: 32),
|
||||
discoverAsync.when(
|
||||
|
||||
@@ -45,7 +45,7 @@ class PostCard extends StatelessWidget {
|
||||
? CachedNetworkImage(
|
||||
imageUrl: post.avatarUrl,
|
||||
fit: BoxFit.cover,
|
||||
errorWidget: (_, __, ___) => const Icon(Icons.person, color: AppColors.grey),
|
||||
errorWidget: (_, _, _) => const Icon(Icons.person, color: AppColors.grey),
|
||||
)
|
||||
: const Icon(Icons.person, color: AppColors.grey),
|
||||
),
|
||||
|
||||
@@ -127,7 +127,7 @@ class _HomePageState extends ConsumerState<HomePage> {
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemCount: posts.length,
|
||||
separatorBuilder: (_, __) => const SizedBox(height: 24),
|
||||
separatorBuilder: (_, _) => const SizedBox(height: 24),
|
||||
itemBuilder: (context, index) {
|
||||
final post = posts[index];
|
||||
return _FeedPostCard(
|
||||
|
||||
Reference in New Issue
Block a user