Skip to content

Commit

Permalink
feat: add DSTabBar widget
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcelo Amaro committed Jan 14, 2025
1 parent 80e6971 commit 0ba9862
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 51 deletions.
1 change: 1 addition & 0 deletions lib/blip_ds.dart
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ export 'src/widgets/utils/ds_file_extension_icon.util.dart'
export 'src/widgets/utils/ds_group_card.widget.dart' show DSGroupCard;
export 'src/widgets/utils/ds_header.widget.dart' show DSHeader;
export 'src/widgets/utils/ds_progress_bar.widget.dart' show DSProgressBar;
export 'src/widgets/utils/ds_tab_bar.widget.dart' show DSTabBar;
export 'src/widgets/utils/ds_user_avatar.widget.dart' show DSUserAvatar;
export 'src/widgets/utils/reply_content/ds_reply_preview.widget.dart'
show DSReplyPreview;
40 changes: 40 additions & 0 deletions lib/src/widgets/utils/ds_tab_bar.widget.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import 'package:flutter/material.dart';

import '../../themes/colors/ds_colors.theme.dart';
import '../../themes/texts/styles/ds_body_text_style.theme.dart';
import '../../themes/texts/styles/ds_headline_small_text_style.theme.dart';

class DSTabBar extends StatelessWidget {
final TabController? controller;
final Function(int)? onTap;
final List<Widget> tabs;

const DSTabBar({
required this.tabs,
super.key,
this.controller,
this.onTap,
});

@override
Widget build(BuildContext context) => TabBar(
tabs: tabs,
controller: controller,
onTap: onTap,
labelStyle: const DSHeadlineSmallTextStyle(
color: DSColors.primaryNight,
),
unselectedLabelStyle: const DSBodyTextStyle(
color: DSColors.neutralDarkCity,
),
dividerColor: DSColors.neutralMediumWave,
indicatorSize: TabBarIndicatorSize.tab,
indicatorWeight: 0.0,
indicator: const UnderlineTabIndicator(
borderSide: BorderSide(
width: 3.0,
color: DSColors.primaryDark,
),
),
);
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: blip_ds
description: Blip Design System for Flutter.
version: 0.3.2
version: 0.3.3
homepage: https://github.com/takenet/blip-ds-flutter#readme
repository: https://github.com/takenet/blip-ds-flutter

Expand Down
2 changes: 1 addition & 1 deletion sample/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import flutter_image_compress_macos
import just_audio
import package_info_plus
import path_provider_foundation
import sqflite
import sqflite_darwin
import url_launcher_macos
import video_compress
import video_player_avfoundation
Expand Down
90 changes: 41 additions & 49 deletions sample/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ packages:
dependency: transitive
description:
name: audio_session
sha256: "343e83bc7809fbda2591a49e525d6b63213ade10c76f15813be9aed6657b3261"
sha256: b2a26ba8b7efa1790d6460e82971fde3e398cfbe2295df9dea22f3499d2c12a7
url: "https://pub.dev"
source: hosted
version: "0.1.21"
version: "0.1.23"
blip_ds:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
version: "0.3.2"
version: "0.3.3"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -84,10 +84,10 @@ packages:
dependency: transitive
description:
name: chewie
sha256: "335df378c025588aef400c704bd71f0daea479d4cd57c471c88c056c1144e7cd"
sha256: "28d77bb89787b41430202fee9509289d75f3aa7fac408be1c0a74cb487e3bdba"
url: "https://pub.dev"
source: hosted
version: "1.8.5"
version: "1.9.0"
clock:
dependency: transitive
description:
Expand Down Expand Up @@ -249,10 +249,10 @@ packages:
dependency: transitive
description:
name: flutter_image_compress
sha256: "45a3071868092a61b11044c70422b04d39d4d9f2ef536f3c5b11fb65a1e7dd90"
sha256: "51d23be39efc2185e72e290042a0da41aed70b14ef97db362a6b5368d0523b27"
url: "https://pub.dev"
source: hosted
version: "2.3.0"
version: "2.4.0"
flutter_image_compress_common:
dependency: transitive
description:
Expand All @@ -265,10 +265,10 @@ packages:
dependency: transitive
description:
name: flutter_image_compress_macos
sha256: "26df6385512e92b3789dc76b613b54b55c457a7f1532e59078b04bf189782d47"
sha256: "20019719b71b743aba0ef874ed29c50747461e5e8438980dfa5c2031898f7337"
url: "https://pub.dev"
source: hosted
version: "1.0.2"
version: "1.0.3"
flutter_image_compress_ohos:
dependency: transitive
description:
Expand All @@ -289,10 +289,10 @@ packages:
dependency: transitive
description:
name: flutter_image_compress_web
sha256: f02fe352b17f82b72f481de45add240db062a2585850bea1667e82cc4cd6c311
sha256: b9b141ac7c686a2ce7bb9a98176321e1182c9074650e47bb140741a44b6f5a96
url: "https://pub.dev"
source: hosted
version: "0.1.4+1"
version: "0.1.5"
flutter_lints:
dependency: "direct dev"
description:
Expand Down Expand Up @@ -321,10 +321,10 @@ packages:
dependency: transitive
description:
name: flutter_svg
sha256: "54900a1a1243f3c4a5506d853a2b5c2dbc38d5f27e52a52618a8054401431123"
sha256: c200fd79c918a40c5cd50ea0877fa13f81bdaf6f0a5d3dbcc2a13e3285d6aa1b
url: "https://pub.dev"
source: hosted
version: "2.0.16"
version: "2.0.17"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -363,26 +363,18 @@ packages:
dependency: transitive
description:
name: http_parser
sha256: "76d306a1c3afb33fe82e2bbacad62a61f409b5634c915fceb0d799de1a913360"
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
url: "https://pub.dev"
source: hosted
version: "4.1.1"
js:
dependency: transitive
description:
name: js
sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf
url: "https://pub.dev"
source: hosted
version: "0.7.1"
version: "4.1.2"
just_audio:
dependency: transitive
description:
name: just_audio
sha256: a49e7120b95600bd357f37a2bb04cd1e88252f7cdea8f3368803779b925b1049
sha256: "1a1eb86e7d81e69a1d36943f2b3efd62dece3dad2cafd9ec2e62e6db7c04d9b7"
url: "https://pub.dev"
source: hosted
version: "0.9.42"
version: "0.9.43"
just_audio_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -515,18 +507,18 @@ packages:
dependency: transitive
description:
name: open_filex
sha256: ba425ea49affd0a98a234aa9344b9ea5d4c4f7625a1377961eae9fe194c3d523
sha256: dcb7bd3d32db8db5260253a62f1564c02c2c8df64bc0187cd213f65f827519bd
url: "https://pub.dev"
source: hosted
version: "4.5.0"
version: "4.6.0"
package_info_plus:
dependency: transitive
description:
name: package_info_plus
sha256: "70c421fe9d9cc1a9a7f3b05ae56befd469fe4f8daa3b484823141a55442d858d"
sha256: "739e0a5c3c4055152520fa321d0645ee98e932718b4c8efeeb51451968fe0790"
url: "https://pub.dev"
source: hosted
version: "8.1.2"
version: "8.1.3"
package_info_plus_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -776,10 +768,10 @@ packages:
dependency: transitive
description:
name: sqflite_darwin
sha256: "96a698e2bc82bd770a4d6aab00b42396a7c63d9e33513a56945cbccb594c2474"
sha256: "22adfd9a2c7d634041e96d6241e6e1c8138ca6817018afc5d443fef91dcefa9c"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
version: "2.4.1+1"
sqflite_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -928,18 +920,18 @@ packages:
dependency: transitive
description:
name: url_launcher_web
sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e"
sha256: "3ba963161bd0fe395917ba881d320b9c4f6dd3c4a233da62ab18a5025c85f1e9"
url: "https://pub.dev"
source: hosted
version: "2.3.3"
version: "2.4.0"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4"
sha256: "3284b6d2ac454cf34f114e1d3319866fdd1e19cdc329999057e44ffe936cfa77"
url: "https://pub.dev"
source: hosted
version: "3.1.3"
version: "3.1.4"
uuid:
dependency: transitive
description:
Expand All @@ -960,10 +952,10 @@ packages:
dependency: transitive
description:
name: vector_graphics_codec
sha256: "2430b973a4ca3c4dbc9999b62b8c719a160100dcbae5c819bae0cacce32c9cdb"
sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146"
url: "https://pub.dev"
source: hosted
version: "1.1.12"
version: "1.1.13"
vector_graphics_compiler:
dependency: transitive
description:
Expand Down Expand Up @@ -1000,18 +992,18 @@ packages:
dependency: transitive
description:
name: video_player_android
sha256: "391e092ba4abe2f93b3e625bd6b6a6ec7d7414279462c1c0ee42b5ab8d0a0898"
sha256: "7018dbcb395e2bca0b9a898e73989e67c0c4a5db269528e1b036ca38bcca0d0b"
url: "https://pub.dev"
source: hosted
version: "2.7.16"
version: "2.7.17"
video_player_avfoundation:
dependency: transitive
description:
name: video_player_avfoundation
sha256: "33224c19775fd244be2d6e3dbd8e1826ab162877bd61123bf71890772119a2b7"
sha256: "61c54fb08fee52861d819a9b3b8e30b92456dad43a875434c677c892eb7772de"
url: "https://pub.dev"
source: hosted
version: "2.6.5"
version: "2.6.6"
video_player_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -1040,18 +1032,18 @@ packages:
dependency: transitive
description:
name: wakelock_plus
sha256: bf4ee6f17a2fa373ed3753ad0e602b7603f8c75af006d5b9bdade263928c0484
sha256: "36c88af0b930121941345306d259ec4cc4ecca3b151c02e3a9e71aede83c615e"
url: "https://pub.dev"
source: hosted
version: "1.2.8"
version: "1.2.10"
wakelock_plus_platform_interface:
dependency: transitive
description:
name: wakelock_plus_platform_interface
sha256: "422d1cdbb448079a8a62a5a770b69baa489f8f7ca21aef47800c726d404f9d16"
sha256: "70e780bc99796e1db82fe764b1e7dcb89a86f1e5b3afb1db354de50f2e41eb7a"
url: "https://pub.dev"
source: hosted
version: "1.2.1"
version: "1.2.2"
web:
dependency: transitive
description:
Expand All @@ -1064,10 +1056,10 @@ packages:
dependency: transitive
description:
name: win32
sha256: "8b338d4486ab3fbc0ba0db9f9b4f5239b6697fcee427939a40e720cbb9ee0a69"
sha256: "154360849a56b7b67331c21f09a386562d88903f90a1099c5987afc1912e1f29"
url: "https://pub.dev"
source: hosted
version: "5.9.0"
version: "5.10.0"
xdg_directories:
dependency: transitive
description:
Expand All @@ -1085,5 +1077,5 @@ packages:
source: hosted
version: "6.5.0"
sdks:
dart: ">=3.5.4 <4.0.0"
flutter: ">=3.24.0"
dart: ">=3.6.0 <4.0.0"
flutter: ">=3.27.0"

0 comments on commit 0ba9862

Please sign in to comment.