Skip to content

Commit

Permalink
v4.1.0 ready
Browse files Browse the repository at this point in the history
  • Loading branch information
iampawan committed May 29, 2023
1 parent 7b8085a commit aa5c581
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 30 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## [4.1.0] - May 29, 2023

- [New] VxAdaptive widget for responsive screen adaption and scaling.
- [New] VxFlip widget for flipping effect.
- [New] VxStat widget for common stats view.
- [New] New extension methods for context, color, duration, and function etc.
- [New] debounce() and throttle() extension methods added along with .foregroundColor().
- [New] More boolean for device and OS checks.
- [Breaking] VxDiscList and VxDecimalList are now VxUnorderedList and VxOrderedList with more options.
- VStack, HStack, VxTimeline, VxUniversal etc improved.
- Demo updated.
- Many Bug Fixes.

## [4.0.0] - May 22, 2023

- [New] VxFilter to support filters on your widgets.
Expand Down
1 change: 1 addition & 0 deletions example/lib/new/test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ packages:
path: ".."
relative: true
source: path
version: "4.0.0"
version: "4.1.0"
vxstate:
dependency: transitive
description:
Expand Down
3 changes: 2 additions & 1 deletion lib/src/flutter/animated/animated_height.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ class VxAnimatedHeightView<T extends Widget> extends StatefulWidget {
final int? currentPageIndex;

const VxAnimatedHeightView(
{super.key, required this.pageViewChild,
{super.key,
required this.pageViewChild,
required this.computeAspectRadio,
this.notifyScroll,
required this.itemCount,
Expand Down
3 changes: 2 additions & 1 deletion lib/src/flutter/badge.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ class VxBadge extends StatelessWidget {
/// To provide an optional widget like an Icon
final Widget? optionalWidget;

const VxBadge({super.key,
const VxBadge({
super.key,
required this.child,
this.type = VxBadgeType.round,
this.color,
Expand Down
3 changes: 2 additions & 1 deletion lib/src/flutter/common/velocity_round.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ class VxRound extends StatelessWidget {
final dynamic child;
final TextStyle? textStyle;

const VxRound({super.key,
const VxRound({
super.key,
this.type = VxRoundType.point,
this.size,
this.color,
Expand Down
3 changes: 2 additions & 1 deletion lib/src/flutter/divider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class VxDivider extends StatelessWidget {
final double? indent;
final double? endIndent;

const VxDivider({super.key,
const VxDivider({
super.key,
this.type = VxDividerType.horizontal,
this.color,
this.width = 1,
Expand Down
3 changes: 2 additions & 1 deletion lib/src/flutter/marquee.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ class VxMarquee extends StatefulWidget {
final Axis scrollAxis;
final double ratioOfBlankToScreen;

const VxMarquee({super.key,
const VxMarquee({
super.key,
required this.text,
this.textStyle,
this.scrollAxis = Axis.horizontal,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/flutter/pinview.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class VxPinView extends StatefulWidget {
this.onEditingComplete,
this.onSubmitted,
this.focusNode,
}) : assert(count > 0);
}) : assert(count > 0);

@override
VxPinViewState createState() => VxPinViewState();
Expand Down
6 changes: 5 additions & 1 deletion lib/src/flutter/random.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ class VxRandomBox extends StatefulWidget {
final bool changeOnRedraw;

const VxRandomBox(
{super.key, this.width, this.height, this.child, this.changeOnRedraw = true});
{super.key,
this.width,
this.height,
this.child,
this.changeOnRedraw = true});

@override
VxRandomBoxState createState() => VxRandomBoxState();
Expand Down
3 changes: 2 additions & 1 deletion lib/src/flutter/rating.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ class VxRating extends StatefulWidget {
/// Use onRatingUpdate to get the selected value.
final ValueChanged<String> onRatingUpdate;

const VxRating({super.key,
const VxRating({
super.key,
this.maxRating = 10.0,
this.count = 5,
this.value = 10.0,
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: velocity_x
description: A minimalist Flutter framework for rapidly building custom designs.
version: 4.0.0
version: 4.1.0
homepage: https://velocityx.dev
repository: https://github.com/iampawan/VelocityX
documentation: https://velocityx.dev
Expand Down
30 changes: 10 additions & 20 deletions test/flutter/text_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ void main() {
});

group("Group all text tests", () {
testWidgets('text used on String creates a Text Widget',
(tester) async {
testWidgets('text used on String creates a Text Widget', (tester) async {
await tester.pumpWidget(
getDirectionalityWidget(
child: 'VelocityX'.text.make(),
Expand All @@ -65,8 +64,7 @@ void main() {
);
});

testWidgets('Text widget responds to Font Scale',
(tester) async {
testWidgets('Text widget responds to Font Scale', (tester) async {
await tester.pumpWidget(
getDirectionalityWidget(
child: 'VelocityX'.text.xs.make(),
Expand All @@ -80,8 +78,7 @@ void main() {
);
});

testWidgets('Text widget responds to fontSize',
(tester) async {
testWidgets('Text widget responds to fontSize', (tester) async {
await tester.pumpWidget(
getDirectionalityWidget(
child: "VelocityX".text.size(24).make(),
Expand All @@ -94,8 +91,7 @@ void main() {
);
});

testWidgets('Text widget responds to FontWeight',
(tester) async {
testWidgets('Text widget responds to FontWeight', (tester) async {
await tester.pumpWidget(
getDirectionalityWidget(
child: 'VelocityX'.text.medium.make(),
Expand All @@ -112,8 +108,7 @@ void main() {
);
});

testWidgets('Text widget responds to FontStyle',
(tester) async {
testWidgets('Text widget responds to FontStyle', (tester) async {
await tester.pumpWidget(
getDirectionalityWidget(child: 'VelocityX'.text.italic.make()));

Expand All @@ -123,17 +118,15 @@ void main() {
);
});

testWidgets('Text widget responds to alignment',
(tester) async {
testWidgets('Text widget responds to alignment', (tester) async {
await tester.pumpWidget(
getDirectionalityWidget(child: 'VelocityX'.text.start.make()));

expect(tester.widget<AutoSizeText>(find.byType(AutoSizeText)).textAlign,
TextAlign.start);
});

testWidgets('Text widget responds to letter spacing',
(tester) async {
testWidgets('Text widget responds to letter spacing', (tester) async {
await tester.pumpWidget(
getDirectionalityWidget(child: 'VelocityX'.text.tightest.make()));

Expand All @@ -158,8 +151,7 @@ void main() {
4.0);
});

testWidgets('Text widget responds to TextDecoration',
(tester) async {
testWidgets('Text widget responds to TextDecoration', (tester) async {
await tester.pumpWidget(
getDirectionalityWidget(child: 'VelocityX'.text.underline.make()));

Expand All @@ -171,8 +163,7 @@ void main() {
TextDecoration.underline);
});

testWidgets('Text widget responds to line height',
(tester) async {
testWidgets('Text widget responds to line height', (tester) async {
await tester.pumpWidget(
getDirectionalityWidget(child: 'VelocityX'.text.heightSnug.make()));

Expand All @@ -182,8 +173,7 @@ void main() {
0.875);
});

testWidgets('Text widget responds to text utilities',
(tester) async {
testWidgets('Text widget responds to text utilities', (tester) async {
await tester.pumpWidget(
getDirectionalityWidget(child: 'VelocityX'.text.uppercase.make()));

Expand Down

0 comments on commit aa5c581

Please sign in to comment.