Skip to content

Instantly share code, notes, and snippets.

@RabiRoshan
Created April 28, 2020 12:43
Show Gist options
  • Select an option

  • Save RabiRoshan/6ac289c26c2c726b145a69fa521e3c3d to your computer and use it in GitHub Desktop.

Select an option

Save RabiRoshan/6ac289c26c2c726b145a69fa521e3c3d to your computer and use it in GitHub Desktop.
Refresh Indicator between SliverAppBar and SliverList (Like Instagram refresh) in Flutter
CustomScrollView(
physics:
const BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
slivers: <Widget>[
SliverAppBar(
title: Text(
"Example",
style: heading1,
),
floating: true,
elevation: 3,
forceElevated: true,
backgroundColor: backgroundWhite,
),
CupertinoSliverRefreshControl(
onRefresh: () async {
await Future.delayed(Duration(seconds: 2));
},
),
SliverList(
delegate: SliverChildBuilderDelegate(
(BuildContext context, int index) {
return Container(
color: Colors
.primaries[Random().nextInt(Colors.primaries.length)],
height: 150.0);
},
),
)
],
);
@RabiRoshan
Copy link
Copy Markdown
Author

gifone

@KLD
Copy link
Copy Markdown

KLD commented Oct 20, 2024

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment