Skip to content

Commit

Permalink
Merge pull request #116 from takenet/release/0.0.40
Browse files Browse the repository at this point in the history
Release/0.0.40
  • Loading branch information
githubdoandre authored Mar 30, 2023
2 parents 2eafc83 + c99c6e6 commit f77ed71
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.0.40

* [DSProgressBar] Created the widget.

## 0.0.39

* New Widgets:
Expand Down
1 change: 1 addition & 0 deletions lib/blip_ds.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,5 @@ export 'src/widgets/utils/ds_file_extension_icon.util.dart'
show DSFileExtensionIcon;
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_user_avatar.widget.dart' show DSUserAvatar;
23 changes: 21 additions & 2 deletions lib/src/services/ds_bottom_sheet.service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class DSBottomSheetService {
this.fixedHeader,
});

Widget _buildBottomSheet({ScrollController? controller}) {
Widget _buildBottomSheet(
{ScrollController? controller, final bool hideGrabbler = false}) {
final window = WidgetsBinding.instance.window;

return Container(
Expand All @@ -23,7 +24,10 @@ class DSBottomSheetService {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
_grabber(),
Visibility(
visible: !hideGrabbler,
child: _grabber(),
),
fixedHeader ?? const SizedBox.shrink(),
_buildChild(controller),
],
Expand Down Expand Up @@ -98,4 +102,19 @@ class DSBottomSheetService {
builder: (_) => _buildBottomSheet(),
);
}

Future<void> showUndisposable() {
return showModalBottomSheet<void>(
backgroundColor: Colors.transparent,
isScrollControlled: true,
context: context,
builder: (_) => WillPopScope(
onWillPop: () async => false,
child: _buildBottomSheet(
hideGrabbler: true,
),
),
enableDrag: false,
);
}
}
44 changes: 44 additions & 0 deletions lib/src/widgets/utils/ds_progress_bar.widget.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import 'package:flutter/material.dart';

import '../../themes/colors/ds_colors.theme.dart';

class DSProgressBar extends StatelessWidget {
final double width;
final double value;

const DSProgressBar({
super.key,
required this.width,
required this.value,
});

@override
Widget build(BuildContext context) {
return Container(
width: width,
padding: const EdgeInsets.all(1.5),
height: 18.0,
decoration: BoxDecoration(
color: Colors.transparent,
border: Border.all(
color: DSColors.neutralDarkEclipse,
),
borderRadius: BorderRadius.circular(10.0),
),
child: Stack(
children: [
Container(
width: width * value / 100,
height: 18.0,
decoration: const BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
color: DSColors.primaryMain,
),
),
],
),
);
}
}
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.0.39
version: 0.0.40
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/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.37"
version: "0.0.38"
boolean_selector:
dependency: transitive
description:
Expand Down

0 comments on commit f77ed71

Please sign in to comment.