v0.0.8animated_botton_navigation
Flutter용 애니메이션 바텀 네비게이션 바로, 탭 간의 부드럽고 시각적으로 매력적인 전환을 제공하도록 설계되었습니다. 문서처럼 사용할 수 있습니다.
11좋아요 6930일 다운로드150Pub 점수
AndroidiOSWebmacOSWindowsLinux
탭 간에 부드럽고 시각적으로 매력적인 전환을 제공하도록 설계된, Flutter용 애니메이션 하단 탐색 바입니다.
{"sdk":"flutter"}{"sdk":"flutter"}^3.0.0아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
An animated bottom navigation bar for Flutter, designed to provide a smooth and visually appealing transition between tabs.
BoxDecoration for the bottom navigation bar and its items.Add the dependency to your pubspec.yaml file:
dependencies:
...
animated_bottom_navigation: [latest version]
import 'package:flutter/material.dart';
import 'package:animated_botton_navigation/animated_botton_navigation.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: HomeScreen(),
);
}
}
class HomeScreen extends StatefulWidget {
@override
_HomeScreenState createState() => _HomeScreenState();
}
class _HomeScreenState extends State<HomeScreen> {
int _currentIndex = 0;
final List<Widget> _pages = [
Center(child: Text('Home Page')),
Center(child: Text('Search Page')),
Center(child: Text('Profile Page')),
];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.black,
title: Text('Animated botton navigation'),
),
body: _pages[_currentIndex],
bottomNavigationBar: AnimatedBottomNavigation(
height: 70,
indicatorSpaceBotton: 25,
icons: [
Icons.home,
Icons.search,
Icons.person,
],
currentIndex: _currentIndex,
onTapChange: (index) {
setState(() {
_currentIndex = index;
});
},
),
);
}
}
icons: A list of icons to be displayed in the bottom navigation bar.onTapChange: This is required for change pages you can see example to better use of that.currentIndex: This parameter allows you to control the currently selected tab index.iconSize: The height of icon.backgroundColor: The background color of the bottom navigation bar.selectedColor: The color of the selected icon.unselectedColor: The color of unselected icons.animationDuration: The duration of the tab transition animation.animationIndicatorCurve: The curve used for the tab transition animation for indicator.animationIconCurve: The curve used for the tab transition animation for icons.indicatorDecoration: Decoration for the indicator that shows the selected tab.itemDecoration: Decoration for the individual navigation items.bottonNavigationDecoration: Decoration for the bottom navigation bar.height: The height of the bottom navigation bar.indicatorHeight: The height of the indicator.indicatorSpaceBotton: The space between the indicator and the bottom of the bar.Connect with me on LinkedIn