#sprint-1
BIN
assets/home-active.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
assets/home.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
assets/profile-active.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
assets/profile.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
assets/projects-active.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
assets/projects.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
assets/results-active.png
Normal file
After Width: | Height: | Size: 802 B |
BIN
assets/results.png
Normal file
After Width: | Height: | Size: 857 B |
BIN
example/assets/home-active.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
example/assets/home.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
example/assets/profile-active.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
example/assets/profile.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
example/assets/projects-active.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
example/assets/projects.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
example/assets/results-active.png
Normal file
After Width: | Height: | Size: 802 B |
BIN
example/assets/results.png
Normal file
After Width: | Height: | Size: 857 B |
@ -32,6 +32,7 @@ class MainApp extends StatelessWidget {
|
||||
SearchSection(),
|
||||
ButtonSection(),
|
||||
SmallButtonSection(),
|
||||
TabBarWidget(),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
16
example/lib/tabbar_section.dart
Normal file
@ -0,0 +1,16 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:ui_kit/ui_kit.dart';
|
||||
|
||||
class TabBarSection extends StatefulWidget {
|
||||
const TabBarSection({super.key});
|
||||
|
||||
@override
|
||||
State<TabBarSection> createState() => _TabBarSectionState();
|
||||
}
|
||||
|
||||
class _TabBarSectionState extends State<TabBarSection> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TabBarWidget();
|
||||
}
|
||||
}
|
@ -14,3 +14,4 @@ const placeholderColor = Color.fromRGBO(191, 199, 209, 1);
|
||||
const descColor = Color.fromRGBO(135, 135, 161, 1);
|
||||
const cardColor = Color.fromRGBO(135, 135, 161, 1);
|
||||
const captionColor = Color.fromRGBO(147, 147, 150, 1);
|
||||
const iconsColor = Color.fromRGBO(184, 193, 204, 1);
|
||||
|
72
lib/tabbar.dart
Normal file
@ -0,0 +1,72 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:ui_kit/colors.dart';
|
||||
import 'package:ui_kit/fonts.dart';
|
||||
|
||||
class TabBarWidget extends StatefulWidget {
|
||||
const TabBarWidget({super.key});
|
||||
|
||||
@override
|
||||
State<TabBarWidget> createState() => _TabBarWidgetState();
|
||||
}
|
||||
|
||||
class _TabBarWidgetState extends State<TabBarWidget> {
|
||||
int _selectedIndex = 0;
|
||||
void _onItemTapped(int index) {
|
||||
setState(() {
|
||||
_selectedIndex = index;
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BottomNavigationBar(
|
||||
showSelectedLabels: true,
|
||||
showUnselectedLabels: true,
|
||||
selectedLabelStyle: caption2Regular,
|
||||
unselectedLabelStyle: caption2Regular,
|
||||
type: BottomNavigationBarType.fixed,
|
||||
unselectedItemColor: iconsColor,
|
||||
items: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: Image.asset('assets/home.png', width: 18, height: 20),
|
||||
label: 'Главная',
|
||||
activeIcon: Image.asset(
|
||||
'assets/home-active.png',
|
||||
width: 18,
|
||||
height: 20,
|
||||
),
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Image.asset('assets/results.png', width: 18, height: 20),
|
||||
label: 'Каталог',
|
||||
activeIcon: Image.asset(
|
||||
'assets/results-active.png',
|
||||
width: 18,
|
||||
height: 20,
|
||||
),
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Image.asset('assets/projects.png', width: 18, height: 20),
|
||||
label: 'Проекты',
|
||||
activeIcon: Image.asset(
|
||||
'assets/projects-active.png',
|
||||
width: 18,
|
||||
height: 20,
|
||||
),
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Image.asset('assets/profile.png', width: 18, height: 20),
|
||||
label: 'Профиль',
|
||||
activeIcon: Image.asset(
|
||||
'assets/profile-active.png',
|
||||
width: 18,
|
||||
height: 20,
|
||||
),
|
||||
),
|
||||
],
|
||||
currentIndex: _selectedIndex,
|
||||
selectedItemColor: primaryColor,
|
||||
onTap: _onItemTapped,
|
||||
);
|
||||
}
|
||||
}
|
@ -7,3 +7,4 @@ export 'utils.dart';
|
||||
export 'input.dart';
|
||||
export "search.dart";
|
||||
export 'button.dart';
|
||||
export 'tabbar.dart';
|
||||
|