Last updated:
0 purchases
animated nav sheet
Install Package #
animated_nav_sheet: 1.1.0
copied to clipboard
Animation #
final _navController = NavController();
///animation forward
_navController.forward();
///animation reverse
_navController.reverse();
copied to clipboard
Preview #
Usage #
Example
class AnimatedNavbarScreen extends StatefulWidget {
const AnimatedNavbarScreen({super.key});
@override
State<AnimatedNavbarScreen> createState() => _AnimatedNavbarScreenState();
}
class _AnimatedNavbarScreenState extends State<AnimatedNavbarScreen> {
final _navController = NavController();
@override
void dispose() {
_navController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
Size size = MediaQuery.of(context).size;
return Scaffold(
body: AnimationNavSheet(
color: Colors.primaries[3 % Colors.primaries.length],
maxHeight: size.height * .5,
navWidget: GestureDetector(
onTap: () {
_navController.forward();
},
child: buildContainerMin(),
),
expendedWidget: GestureDetector(
onTap: () {},
child: buildContainerMax(),
),
navController: _navController,
child: Center(
child: Text(
"Example Animation Nav Sheet",
style: Theme.of(context).textTheme.displaySmall,
textAlign: TextAlign.center,
),
),
),
);
}
Widget buildContainerMax() {
return SingleChildScrollView(
child: Column(
children: [
ElevatedButton(
onPressed: () {
_navController.reverse();
},
child: const Text('Open sheet')),
ElevatedButton(onPressed: () {}, child: const Text('Open sheet')),
ElevatedButton(onPressed: () {}, child: const Text('Open sheet')),
],
),
);
}
Row buildContainerMin() {
return const Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Icon(
Icons.home_max,
color: Colors.white,
),
Icon(
Icons.people_alt_outlined,
color: Colors.white,
),
Icon(
Icons.settings,
color: Colors.white,
)
],
);
}
}
copied to clipboard
animated_nav_sheet #
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.