Skip to content

Commit 2219a36

Browse files
committed
Provide defaults for unnamed constructor
1 parent ab60cd5 commit 2219a36

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 2.0.1
2+
3+
* `PrototypeConstrainedBox` unnamed constructor now has default values for `constrain*` parameters
4+
* All `constrain` parameters default to `false`
5+
16
## 2.0.0+1
27

38
* Improved documentation

analysis_options.yaml

-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
11
include: package:flutter_lints/flutter.yaml
2-
3-
# Additional information about this file can be found at
4-
# https://dart.dev/guides/language/analysis-options

example/pubspec.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ packages:
113113
path: ".."
114114
relative: true
115115
source: path
116-
version: "1.0.0"
116+
version: "2.1.0"
117117
sky_engine:
118118
dependency: transitive
119119
description: flutter

lib/src/widget.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ final class PrototypeConstrainedBox extends RenderObjectWidget {
6060
/// to specify the constraint type for each axis independently.
6161
const PrototypeConstrainedBox({
6262
super.key,
63-
required this.constrainMinWidth,
64-
required this.constrainMaxWidth,
65-
required this.constrainMinHeight,
66-
required this.constrainMaxHeight,
6763
required this.prototype,
6864
required this.child,
65+
this.constrainMinWidth = false,
66+
this.constrainMaxWidth = false,
67+
this.constrainMinHeight = false,
68+
this.constrainMaxHeight = false,
6969
});
7070

7171
/// The widget whose constraints are going to be imposed in [child].

pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: prototype_constrained_box
22
description: A ConstrainedBox-like widget, but the constraints are given by another widget.
3-
version: 2.0.0+1
3+
version: 2.0.1
44
repository: https://github.com/mateusfccp/prototype_constrained_box
55
issue_tracker: https://github.com/mateusfccp/prototype_constrained_box/issues
66

@@ -12,6 +12,6 @@ dependencies:
1212
sdk: flutter
1313

1414
dev_dependencies:
15+
flutter_lints: ^3.0.0
1516
flutter_test:
1617
sdk: flutter
17-
flutter_lints: ^2.0.0

0 commit comments

Comments
 (0)