From b649bfe41965794d3176a3435aa642bd4dfb4793 Mon Sep 17 00:00:00 2001 From: User3 Date: Tue, 27 May 2025 16:38:14 +0300 Subject: [PATCH] #sprint-3 --- example/lib/main.dart | 2 +- example/lib/tabbar_section.dart | 16 ---------------- lib/tabbar.dart | 6 +++++- 3 files changed, 6 insertions(+), 18 deletions(-) delete mode 100644 example/lib/tabbar_section.dart diff --git a/example/lib/main.dart b/example/lib/main.dart index 00f537b..1242c48 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -44,7 +44,7 @@ class MainApp extends StatelessWidget { SearchSection(), ButtonSection(), SmallButtonSection(), - TabBarWidget(), + TabBarWidget(onTap: (val) {}, selectedIndex: 0), BottomSheetSection(), HeaderSection(), CardSection(), diff --git a/example/lib/tabbar_section.dart b/example/lib/tabbar_section.dart deleted file mode 100644 index dfe3e8b..0000000 --- a/example/lib/tabbar_section.dart +++ /dev/null @@ -1,16 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:ui_kit/ui_kit.dart'; - -class TabBarSection extends StatefulWidget { - const TabBarSection({super.key}); - - @override - State createState() => _TabBarSectionState(); -} - -class _TabBarSectionState extends State { - @override - Widget build(BuildContext context) { - return TabBarWidget(); - } -} diff --git a/lib/tabbar.dart b/lib/tabbar.dart index cab9c86..dc0750c 100644 --- a/lib/tabbar.dart +++ b/lib/tabbar.dart @@ -1,9 +1,13 @@ +// ignore_for_file: must_be_immutable + 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}); + TabBarWidget({super.key, required this.onTap, required this.selectedIndex}); + int selectedIndex; + Function(int index) onTap; @override State createState() => _TabBarWidgetState();