Skip to content

Commit

Permalink
Merge pull request #164 from takenet/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
leonardogbr authored Jul 12, 2023
2 parents 6a2067c + aebe560 commit 25951f6
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 28 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.0.62

- [DSInputChip] Changed remove button icon from leading to trailing.
- [DSTextField] Removed Row CrossAxisAlignment
- [TagEditor] Formated file

## 0.0.61

- [DSToast] Fixed rendering of toast when action type was 'none'.
Expand Down
1 change: 0 additions & 1 deletion lib/src/widgets/fields/ds_text_field.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ class _DSTextFieldState extends State<DSTextField> {
right: 6.0,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisSize: MainAxisSize.min,
children: [
_buildTextField(),
Expand Down
19 changes: 10 additions & 9 deletions lib/src/widgets/tags/ds_input_chip.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import '/src/themes/texts/styles/ds_body_text_style.theme.dart';
import '/src/widgets/tags/tag_editor/tag_editor.dart';
import '/src/widgets/texts/ds_headline_small_text.widget.dart';
import '/src/widgets/utils/ds_chip.widget.dart';
import '../buttons/ds_icon_button.widget.dart';

class DSInputChip extends StatefulWidget {
final RxList<String> values;
Expand All @@ -19,9 +20,9 @@ class DSInputChip extends StatefulWidget {
const DSInputChip({
Key? key,
required this.values,
required this.controller,
this.hintText,
this.onTextChanged,
required this.controller,
this.onDeleted,
this.scrollController,
}) : super(key: key);
Expand Down Expand Up @@ -88,22 +89,22 @@ class _DSInputChipState extends State<DSInputChip> {
child: SizedBox(
height: 32.0,
child: DSChip(
textPadding: const EdgeInsets.symmetric(
horizontal: 12.0,
padding: const EdgeInsets.symmetric(horizontal: 4.0),
textPadding: const EdgeInsets.only(
left: 12.0,
right: 8.0,
),
borderRadius: const BorderRadius.all(
Radius.circular(16.0),
),
text: DSHeadlineSmallText(widget.values[index]),
background: DSColors.primaryLight,
leadingIcon: SizedBox(
width: 35.0,
child: IconButton(
padding: EdgeInsets.zero,
iconSize: 20,
trailingIcon: SizedBox(
child: DSIconButton(
size: 32.0,
icon: Icon(
DSIcons.error_solid,
color: DSColors.neutralDarkCity.withOpacity(0.7),
color: DSColors.neutralDarkCity.withOpacity(0.6),
),
onPressed: () => widget.onDeleted?.call(index),
),
Expand Down
36 changes: 20 additions & 16 deletions lib/src/widgets/tags/tag_editor/tag_editor.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import 'dart:async';
import 'dart:math';
import 'dart:developer' as developer;
import 'dart:math';

import 'package:debounce_throttle/debounce_throttle.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:pointer_interceptor/pointer_interceptor.dart';
import 'package:debounce_throttle/debounce_throttle.dart';

import '/src/widgets/tags/tag_editor/suggestions_box_controller.dart';
import './tag_editor_layout_delegate.dart';
Expand Down Expand Up @@ -446,26 +447,29 @@ class TagsEditorState<T> extends State<TagEditor<T>> {
final decoration = widget.hasAddButton
? widget.inputDecoration.copyWith(
suffixIcon: CupertinoButton(
padding: EdgeInsets.zero,
onPressed: () {
_onTagChanged(_textFieldController.text);
},
child: const Icon(Icons.add),
))
padding: EdgeInsets.zero,
onPressed: () {
_onTagChanged(_textFieldController.text);
},
child: const Icon(Icons.add),
),
)
: widget.inputDecoration;

final tagEditorArea = Container(
constraints: const BoxConstraints(maxHeight: 200.0),
padding: widget.padding ?? EdgeInsets.zero,
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(widget.borderRadius ?? 0)),
border: Border.all(
width: widget.borderSize ?? (_isFocused ? 1 : 0.5),
color: _isFocused
? widget.focusedBorderColor ?? Colors.transparent
: widget.enableBorderColor ?? Colors.transparent),
color: widget.backgroundColor ?? Colors.transparent),
borderRadius:
BorderRadius.all(Radius.circular(widget.borderRadius ?? 0)),
border: Border.all(
width: widget.borderSize ?? (_isFocused ? 1 : 0.5),
color: _isFocused
? widget.focusedBorderColor ?? Colors.transparent
: widget.enableBorderColor ?? Colors.transparent,
),
color: widget.backgroundColor ?? Colors.transparent,
),
child: SingleChildScrollView(
controller: widget.scrollController,
padding: const EdgeInsets.only(
Expand Down
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.61
version: 0.0.62
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 @@ -31,7 +31,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.60"
version: "0.0.62"
boolean_selector:
dependency: transitive
description:
Expand Down

0 comments on commit 25951f6

Please sign in to comment.