mirror of
https://github.com/Iconica-Development/flutter_timeline.git
synced 2025-05-18 18:13:46 +02:00
feat: use adaptive elements
This commit is contained in:
parent
035f795130
commit
bca15b6307
4 changed files with 11 additions and 5 deletions
|
@ -8,6 +8,7 @@
|
|||
- Add a postCreationFloatingActionButtonColor to the timeline theme to set the color of the floating action button
|
||||
- Add a post and a category to the postViewOpenPageBuilder function
|
||||
- Add a refresh functionality to the timeline with a pull to refresh callback to allow additional functionality when refreshing the timeline
|
||||
- Use the adaptive variants of the material elements in the timeline
|
||||
|
||||
## 3.0.1
|
||||
|
||||
|
|
|
@ -166,7 +166,12 @@ List<GoRoute> getTimelineStoryRoutes({
|
|||
context: context,
|
||||
state: state,
|
||||
child: config.postViewOpenPageBuilder?.call(
|
||||
context, timelinePostWidget, backButton, post, category) ??
|
||||
context,
|
||||
timelinePostWidget,
|
||||
backButton,
|
||||
post,
|
||||
category,
|
||||
) ??
|
||||
Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: backButton,
|
||||
|
|
|
@ -146,7 +146,7 @@ class _TimelinePostScreenState extends State<_TimelinePostScreen> {
|
|||
|
||||
if (isLoading) {
|
||||
const Center(
|
||||
child: CircularProgressIndicator(),
|
||||
child: CircularProgressIndicator.adaptive(),
|
||||
);
|
||||
}
|
||||
if (this.post == null) {
|
||||
|
@ -166,7 +166,7 @@ class _TimelinePostScreenState extends State<_TimelinePostScreen> {
|
|||
|
||||
return Stack(
|
||||
children: [
|
||||
RefreshIndicator(
|
||||
RefreshIndicator.adaptive(
|
||||
onRefresh: () async {
|
||||
updatePost(
|
||||
await widget.service.postService.fetchPostDetails(
|
||||
|
|
|
@ -108,7 +108,7 @@ class _TimelineScreenState extends State<TimelineScreen> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (isLoading && widget.posts == null) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
return const Center(child: CircularProgressIndicator.adaptive());
|
||||
}
|
||||
|
||||
// Build the list of posts
|
||||
|
@ -222,7 +222,7 @@ class _TimelineScreenState extends State<TimelineScreen> {
|
|||
height: 12,
|
||||
),
|
||||
Expanded(
|
||||
child: RefreshIndicator(
|
||||
child: RefreshIndicator.adaptive(
|
||||
onRefresh: () async {
|
||||
await widget.onRefresh?.call(context, category);
|
||||
await loadPosts();
|
||||
|
|
Loading…
Reference in a new issue