From 26af7e0c2aeb57ad36108b54d9d7d87a37eaa366 Mon Sep 17 00:00:00 2001 From: "leonardo.gabriel" Date: Wed, 15 Mar 2023 16:25:30 -0300 Subject: [PATCH 1/2] Added default status bar color on DSHeader --- .../chat/ds_image_message_bubble.widget.dart | 55 +++++++++---------- lib/src/widgets/utils/ds_header.widget.dart | 8 ++- sample/ios/Podfile.lock | 2 +- 3 files changed, 32 insertions(+), 33 deletions(-) diff --git a/lib/src/widgets/chat/ds_image_message_bubble.widget.dart b/lib/src/widgets/chat/ds_image_message_bubble.widget.dart index 49767e32..5c27c2c0 100644 --- a/lib/src/widgets/chat/ds_image_message_bubble.widget.dart +++ b/lib/src/widgets/chat/ds_image_message_bubble.widget.dart @@ -194,37 +194,32 @@ class _DSImageMessageBubbleState extends State } Widget _buildPage(BuildContext context) { - return AnnotatedRegion( - value: SystemUiOverlayStyle.light.copyWith( - statusBarColor: Colors.transparent, - ), - child: Obx( - () => Scaffold( - backgroundColor: Colors.black, - extendBodyBehindAppBar: true, - appBar: DSHeader( - showBorder: false, - visible: _controller.appBarVisible.value, - title: widget.appBarText, - customerUri: widget.appBarPhotoUri, - customerName: widget.appBarText, - backgroundColor: Colors.black.withOpacity(.7), - systemUiOverlayStyle: SystemUiOverlayStyle.light.copyWith( - statusBarColor: Colors.transparent, - ), - onBackButtonPressed: Get.back, + return Obx( + () => Scaffold( + backgroundColor: Colors.black, + extendBodyBehindAppBar: true, + appBar: DSHeader( + showBorder: false, + visible: _controller.appBarVisible.value, + title: widget.appBarText, + customerUri: widget.appBarPhotoUri, + customerName: widget.appBarText, + backgroundColor: Colors.black.withOpacity(.7), + systemUiOverlayStyle: SystemUiOverlayStyle.light.copyWith( + statusBarColor: Colors.transparent, ), - body: GestureDetector( - onTap: () => _controller.showAppBar(), - child: Container( - padding: const EdgeInsets.all(8.0), - child: PinchZoom( - child: DSCachedNetworkImageView( - url: widget.url, - fit: BoxFit.contain, - align: widget.align, - style: widget.style, - ), + onBackButtonPressed: Get.back, + ), + body: GestureDetector( + onTap: () => _controller.showAppBar(), + child: Container( + padding: const EdgeInsets.all(8.0), + child: PinchZoom( + child: DSCachedNetworkImageView( + url: widget.url, + fit: BoxFit.contain, + align: widget.align, + style: widget.style, ), ), ), diff --git a/lib/src/widgets/utils/ds_header.widget.dart b/lib/src/widgets/utils/ds_header.widget.dart index 816da504..bea27637 100644 --- a/lib/src/widgets/utils/ds_header.widget.dart +++ b/lib/src/widgets/utils/ds_header.widget.dart @@ -41,7 +41,6 @@ class DSHeader extends StatelessWidget implements PreferredSizeWidget { this.canPop, this.onBackButtonPressed, this.titleTextStyle, - this.systemUiOverlayStyle, this.elevation = 0.0, this.bottomWidget, this.onTap, @@ -49,7 +48,12 @@ class DSHeader extends StatelessWidget implements PreferredSizeWidget { this.borderColor = DSColors.neutralMediumWave, this.showBorder = true, this.visible = true, - }) : super(key: key) { + final SystemUiOverlayStyle? systemUiOverlayStyle, + }) : systemUiOverlayStyle = systemUiOverlayStyle ?? + SystemUiOverlayStyle.dark.copyWith( + statusBarColor: Colors.transparent, + ), + super(key: key) { isBackgroundLight = backgroundColor.computeLuminance() > 0.5; } diff --git a/sample/ios/Podfile.lock b/sample/ios/Podfile.lock index 63b5a772..92a75084 100644 --- a/sample/ios/Podfile.lock +++ b/sample/ios/Podfile.lock @@ -84,4 +84,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 7adbc9d59f05e1b01f554ea99b6c79e97f2214a2 -COCOAPODS: 1.11.3 +COCOAPODS: 1.12.0 From 03636338538a3518f3bb3e9b970af193105a1a03 Mon Sep 17 00:00:00 2001 From: "leonardo.gabriel" Date: Thu, 16 Mar 2023 09:52:23 -0300 Subject: [PATCH 2/2] New version --- CHANGELOG.md | 4 ++++ pubspec.yaml | 2 +- sample/pubspec.lock | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8b85613..d1c8b05c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.35 + +* [DSHeader] Added default StatusBar color + ## 0.0.34 * [DSHeader] Adding bottom property on appbar diff --git a/pubspec.yaml b/pubspec.yaml index 192bb9f8..efc947a7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: blip_ds description: Blip Design System for Flutter. -version: 0.0.34 +version: 0.0.35 homepage: https://github.com/takenet/blip-ds-flutter#readme repository: https://github.com/takenet/blip-ds-flutter diff --git a/sample/pubspec.lock b/sample/pubspec.lock index 34426f20..05e83773 100644 --- a/sample/pubspec.lock +++ b/sample/pubspec.lock @@ -23,7 +23,7 @@ packages: path: ".." relative: true source: path - version: "0.0.32" + version: "0.0.35" boolean_selector: dependency: transitive description: