2019-05-10 17:15:11 +00:00
|
|
|
import 'package:comunic/helpers/posts_helper.dart';
|
2019-05-11 13:35:07 +00:00
|
|
|
import 'package:comunic/ui/widgets/posts_list_widget.dart';
|
2019-05-04 18:01:17 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
/// Newest posts screen
|
|
|
|
///
|
|
|
|
/// @author Pierre HUBERT
|
|
|
|
|
|
|
|
class NewestPostsScreen extends StatefulWidget {
|
|
|
|
@override
|
|
|
|
State<StatefulWidget> createState() => _NewestPostsScreenState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _NewestPostsScreenState extends State<NewestPostsScreen> {
|
2019-05-10 17:15:11 +00:00
|
|
|
// Helpers
|
|
|
|
final PostsHelper _postsHelper = PostsHelper();
|
|
|
|
|
|
|
|
|
2019-05-11 13:35:07 +00:00
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return PostsListWidget(
|
|
|
|
getPostsList: _postsHelper.getLatest,
|
2019-06-15 14:25:06 +00:00
|
|
|
getOlder: (f) => _postsHelper.getLatest(from: f - 1),
|
2019-05-23 16:37:56 +00:00
|
|
|
showPostsTarget: true,
|
2019-05-10 17:15:11 +00:00
|
|
|
);
|
2019-05-04 18:01:17 +00:00
|
|
|
}
|
|
|
|
|
2019-05-10 17:15:11 +00:00
|
|
|
}
|