relatica/lib/screens/user_posts_screen.dart
2022-11-29 15:33:16 +00:00

35 lines
861 B
Dart

import 'package:flutter/material.dart';
import '../controls/timeline/timeline_panel.dart';
import '../models/TimelineIdentifiers.dart';
import '../routes.dart';
class UserPostsScreen extends StatelessWidget {
final String userId;
const UserPostsScreen({super.key, required this.userId});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('User Posts'),
actions: [
IconButton(
onPressed: () {
Navigator.of(context).popUntil((route) {
return route.settings.name == ScreenPaths.home;
});
},
icon: const Icon(Icons.home),
),
],
),
body: Center(
child: TimelinePanel(
timeline: TimelineIdentifiers.profile(userId),
),
),
);
}
}