Skip to content

Commit

Permalink
minor bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
codegrue committed Sep 17, 2020
1 parent 2e05b05 commit 7f1aecc
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 16 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Releases

## [1.13.0] - 2020-09-16

- removed dependency on `cupertino_icons`
- fixed overflow error with file image thumbnails on smaller screens in iOS mode
- fixed overflow error on datetimepicker on smaller iOS Screens
- removed seconds from datetimepicker display

## [1.12.2] - 2020-08-31

- updated dependencies
Expand Down
28 changes: 18 additions & 10 deletions lib/widgets/picker_fields/card_settings_datetime_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,16 @@ class _CardSettingsDateTimePickerState extends FormFieldState<DateTime> {
style: ls,
),
),
contentWidget: Text(
value == null ? '' : DateFormat.yMd().add_jms().format(value),
style: contentStyle(context, value, widget.enabled),
textAlign: widget?.contentAlign ??
CardSettings.of(context).contentAlign,
contentWidget: Flexible(
child: Text(
value == null
? ''
: DateFormat.yMd().add_jm().format(value),
style: contentStyle(context, value, widget.enabled),
overflow: TextOverflow.ellipsis,
textAlign: widget?.contentAlign ??
CardSettings.of(context).contentAlign,
),
),
style: CSWidgetStyle(icon: widget?.icon),
),
Expand All @@ -261,11 +266,14 @@ class _CardSettingsDateTimePickerState extends FormFieldState<DateTime> {
requiredIndicator: widget?.requiredIndicator,
errorText: errorText,
fieldPadding: widget.fieldPadding,
content: Text(
value == null ? '' : DateFormat.yMd().add_jms().format(value),
style: contentStyle(context, value, widget.enabled),
textAlign:
widget?.contentAlign ?? CardSettings.of(context).contentAlign,
content: Flexible(
child: Text(
value == null ? '' : DateFormat.yMd().add_jm().format(value),
style: contentStyle(context, value, widget.enabled),
overflow: TextOverflow.ellipsis,
textAlign:
widget?.contentAlign ?? CardSettings.of(context).contentAlign,
),
),
pickerIcon: (widget.enabled) ? Icons.arrow_drop_down : null,
),
Expand Down
9 changes: 5 additions & 4 deletions lib/widgets/picker_fields/card_settings_file_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -259,17 +259,18 @@ class _CardSettingsFilePickerState extends FormFieldState<Uint8List> {
var contentAlign =
widget?.contentAlign ?? CardSettings.of(context).contentAlign;

var paddingAmt =
showCupertino(context, widget.showMaterialonIOS) ? 10.0 : 0.0;

if (widget.fileType == FileType.image && value != null) {
return ConstrainedBox(
constraints: BoxConstraints(
maxWidth: widget.maxThumbnailWidth,
maxWidth: widget.maxThumbnailWidth - paddingAmt,
maxHeight: widget.maxThumbnailHeight,
minHeight: 30,
),
child: Container(
padding: showCupertino(context, widget.showMaterialonIOS)
? EdgeInsets.symmetric(vertical: 10.0)
: null,
padding: EdgeInsets.symmetric(vertical: paddingAmt),
alignment: (contentAlign == TextAlign.right)
? Alignment.topRight
: Alignment.topLeft,
Expand Down
3 changes: 1 addition & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: card_settings
description: A flutter package for building card based settings forms. This includes a library of pre-built form field widgets.
version: 1.12.2
version: 1.13.0
homepage: https://github.com/codegrue/card_settings

dependencies:
Expand All @@ -9,7 +9,6 @@ dependencies:
flutter_masked_text: ^0.8.0
intl: ^0.16.0
meta: ^1.1.8
cupertino_icons: ^0.1.3
flutter_cupertino_settings: ^0.3.1
flutter_material_pickers: ^1.7.4
pattern_formatter: ^1.0.2 # used for localized doubles
Expand Down

0 comments on commit 7f1aecc

Please sign in to comment.