import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import '../controls/standard_appbar.dart'; import '../controls/status_and_refresh_button.dart'; import '../controls/timeline/timeline_panel.dart'; import '../globals.dart'; import '../models/TimelineIdentifiers.dart'; import '../services/network_status_service.dart'; import '../services/timeline_manager.dart'; import '../utils/active_profile_selector.dart'; class UserPostsScreen extends StatelessWidget { final String userId; const UserPostsScreen({super.key, required this.userId}); @override Widget build(BuildContext context) { final nss = getIt(); final manager = context .watch>() .activeEntry .value; final timeline = TimelineIdentifiers.profile(userId); return Scaffold( appBar: StandardAppBar.build( context, 'User Posts', actions: [ StatusAndRefreshButton( valueListenable: nss.timelineLoadingStatus, refreshFunction: () async => await manager.updateTimeline( timeline, TimelineRefreshType.refresh), busyColor: Theme.of(context).colorScheme.background, ), ], ), body: Center( child: TimelinePanel( timeline: timeline, ), ), ); } }