v1.0.3
bottom_navigation_badge
BottomNavigationBadge 는 westdabestdb 가 개발한 Flutter 위젯으로, 개발자가 하단 탐색 바 항목에 알림 배지를 추가할 수 있게 해줍니다.
63좋아요 25430일 다운로드40Pub 점수
플랫폼 정보 없음
westdabestdb/bottom_navigation_badge open-source repository details.
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
BottomNavigationBadge is a Flutter class developed by westdabestdb.
Add this to your package's pubspec.yaml file:
...
dependencies:
bottom_navigation_badge: ^1.0.3
Now in your Dart code, you can use:
import 'package:bottom_navigation_badge/bottom_navigation_badge.dart';
Initialize the badger. Isn't it a nice variable name lol 😁
BottomNavigationBadge badger = new BottomNavigationBadge(
backgroundColor: Colors.red,
badgeShape: BottomNavigationBadgeShape.circle,
textColor: Colors.white,
position: BottomNavigationBadgePosition.topRight,
textSize: 8);
Create a list of BottomNavigationBarItems
List<BottomNavigationBarItem> items = [
BottomNavigationBarItem(icon: Icon(Icons.home), title: Text("Home")),
BottomNavigationBarItem(icon: Icon(Icons.notifications), title: Text("Notifications")),
BottomNavigationBarItem(icon: Icon(Icons.face), title: Text("Profile"))
];
Add badge to index with content "1"
setState(() {
items = badger.setBadge(items, "1", index);
});
Remove the badge at index
setState(() {
items = badger.removeBadge(items, index);
});
Remove all the badges
setState(() {
items = badger.removeAll(items);
});
의존성 목록 2 개
{"sdk":"flutter"}{"sdk":"flutter"}사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗