We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Video:
import 'package:example/src/common.dart'; import 'package:exprollable_page_view/exprollable_page_view.dart'; import 'package:flutter/material.dart'; class SimpleExample extends StatefulWidget { const SimpleExample({super.key}); @override State<SimpleExample> createState() => _SimpleExampleState(); } class _SimpleExampleState extends State<SimpleExample> { late final controller = ExprollablePageController( initialPage: 0, maxViewportOffset: ViewportOffset.shrunk, minViewportFraction: 0.8, snapViewportOffsets: [ ViewportOffset.expanded, ViewportOffset.shrunk, ], ); var expanded = false; var title = ""; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(title), actions: [ if (expanded) IconButton( onPressed: () { setState(() { title = "animate to shrunk"; }); controller.animateViewportOffsetTo(ViewportOffset.shrunk, curve: Curves.easeOut, duration: Duration(milliseconds: 150)); }, icon: Icon(Icons.keyboard_double_arrow_up)) else IconButton( onPressed: () { setState(() { title = "animate to expanded"; }); controller.animateViewportOffsetTo(ViewportOffset.expanded, curve: Curves.easeOut, duration: Duration(milliseconds: 150)); }, icon: Icon(Icons.keyboard_double_arrow_down)) ], ), bottomNavigationBar: const ExampleBottomAppBar(), body: ExprollablePageView( onViewportChanged: (metrics) => setState(() { expanded = metrics.isExpanded; }), controller: controller, itemCount: 5, itemBuilder: (context, page) { return ExampleListView( controller: PageContentScrollController.of(context), page: page, ); }, ), ); } }
The text was updated successfully, but these errors were encountered:
Seems like a bug related to floating point precision. I'll work on it.
Sorry, something went wrong.
485c75e
fujidaiti
No branches or pull requests
Video:
Screen.Recording.2023-05-04.at.22.40.56.mov
The text was updated successfully, but these errors were encountered: