Skip to content

Commit

Permalink
Merge branch 'main' into feat/gesture-events
Browse files Browse the repository at this point in the history
  • Loading branch information
leoafarias authored Sep 3, 2024
2 parents 666619e + 1e9ff63 commit 4f821d8
Show file tree
Hide file tree
Showing 247 changed files with 7,675 additions and 4,804 deletions.
2 changes: 1 addition & 1 deletion .fvmrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"flutter": "3.19.0",
"flutter": "stable",
"flavors": {
"prod": "stable",
"mincompat": "3.19.0"
Expand Down
12 changes: 2 additions & 10 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,8 @@ runs:
folders: packages/*/lib

- name: Run DCM
if: ${{ inputs.run-dcm }}
uses: CQLabs/dcm-action@v1
with:
github_token: ${{ inputs.token }}
ci_key: oss
email: oss
folders: .
fatal_style: true
fatal_performance: true
fatal_warnings: true
run: dcm analyze .
shell: bash

- name: Run melos fix
run: melos run fix
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"source.fixAll": "explicit",
"source.dcm.fixAll": "explicit"
},
"dart.flutterSdkPath": ".fvm/versions/3.19.0",
"dart.flutterSdkPath": ".fvm/versions/stable",
"dart.lineLength": 80,
"search.exclude": {
"**/.fvm/versions": true
},
Expand Down
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,51 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 2024-08-22

### Changes

---

Packages with breaking changes:

- There are no breaking changes in this release.

Packages with other changes:

- [`mix` - `v1.4.6`](#mix---v146)
- [`mix_annotations` - `v0.3.0`](#mix_annotations---v030)
- [`mix_generator` - `v0.3.0`](#mix_generator---v030)
- [`remix` - `v0.0.2+6`](#remix---v0026)

Packages with dependency updates only:

> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
- `remix` - `v0.0.2+6`

---

#### `mix` - `v1.4.6`

- **FIX**(docs): fix fn level docs for Style::applyVariants (#460).
- **FIX**: Shadow list animation (#445).
- **FIX**: SpecModifiers were taking a long time to animate. (#457).
- **FEAT**: Create mouse cursor Decorator (#263).
- **FEAT**: Add parameter onEnd for AnimatedStyle (#458).
- **FEAT**: `SingleChildScrollView` widget modifier (#427).
- **FEAT**: Remix improvements and further improvements (#410).

#### `mix_annotations` - `v0.3.0`

- **FIX**: SpecModifiers were taking a long time to animate. (#457).

#### `mix_generator` - `v0.3.0`

- **FIX**: SpecModifiers were taking a long time to animate. (#457).
- **FIX**: Shadow list animation (#445).


## 2024-08-08

### Changes
Expand Down
48 changes: 2 additions & 46 deletions lints.yaml
Original file line number Diff line number Diff line change
@@ -1,53 +1,9 @@
include: package:flutter_lints/flutter.yaml

analyzer:
exclude:
linter:
rules:
# TODO: Turn this to true when all public apis are documented
public_member_api_docs: false
prefer_relative_imports: true

dart_code_metrics:
extends:
- package:dart_code_metrics_presets/recommended.yaml
- package:dart_code_metrics_presets/metrics_recommended.yaml
metrics-exclude:
- test/**
rules-exclude:
- test/**
rules:
# avoid-collection-mutating-methods: true
newline-before-return: true
avoid-importing-entrypoint-exports:
only-in-src: true
prefer-match-file-name: false
prefer-overriding-parent-equality: false
prefer-correct-callback-field-name: false
prefer-single-widget-per-file: false
match-getter-setter-field-names: false
prefer-dedicated-media-query-methods: false
avoid-shadowing: false
enum-constants-ordering: false
avoid-unsafe-collection-methods: false
prefer-prefixed-global-constants: false
avoid-returning-widgets: false
arguments-ordering:
child-last: true
avoid-nested-conditional-expressions:
acceptable-level: 3
member-ordering:
order:
- public-fields
- private-fields
- constructors
- static-methods
- private-methods
- private-getters
- private-setters
- public-getters
- public-setters
- public-methods
- overridden-public-methods
- overridden-public-getters
- build-method
prefer-named-boolean-parameters:
ignore-single: true
47 changes: 47 additions & 0 deletions lints_with_dcm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
include: lints.yaml

dart_code_metrics:
extends:
- package:dart_code_metrics_presets/recommended.yaml
- package:dart_code_metrics_presets/metrics_recommended.yaml
metrics-exclude:
- test/**
rules-exclude:
- test/**
rules:
# avoid-collection-mutating-methods: true
newline-before-return: true
avoid-importing-entrypoint-exports:
only-in-src: true
prefer-match-file-name: false
prefer-overriding-parent-equality: false
prefer-correct-callback-field-name: false
prefer-single-widget-per-file: false
match-getter-setter-field-names: false
prefer-dedicated-media-query-methods: false
avoid-shadowing: false
enum-constants-ordering: false
avoid-unsafe-collection-methods: false
prefer-prefixed-global-constants: false
avoid-returning-widgets: false
arguments-ordering:
child-last: true
avoid-nested-conditional-expressions:
acceptable-level: 3
member-ordering:
order:
- public-fields
- private-fields
- constructors
- static-methods
- private-methods
- private-getters
- private-setters
- public-getters
- public-setters
- public-methods
- overridden-public-methods
- overridden-public-getters
- build-method
prefer-named-boolean-parameters:
ignore-single: true
4 changes: 2 additions & 2 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ scripts:
custom_lint_analyze:
run: melos exec --depends-on="mix_lint" dart pub run custom_lint

mix_exports:
run: melos exec --scope="packages/mix" dart run ./scripts/exports.dart
exports:
run: melos exec --scope="mix" --scope="remix" dart run ../../scripts/exports.dart .
description: Generate exports for the mix package

verify_version_pubspec_changelog:
Expand Down
50 changes: 25 additions & 25 deletions mix.code-workspace
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
{
"folders": [
{
"name": "mix",
"path": "packages/mix"
},
{
"name": "root",
"path": "."
},
{
"name": "mix_generator",
"path": "packages/mix_generator"
},
{
"name": "mix_annotations",
"path": "packages/mix_annotations"
},
{
"name": "remix",
"path": "packages/remix"
},
{
"name": "mix_animate",
"path": "packages/mix_animate"
}
],
{
"name": "root",
"path": "."
},
{
"name": "mix",
"path": "packages/mix"
},
{
"name": "mix_generator",
"path": "packages/mix_generator"
},
{
"name": "mix_annotations",
"path": "packages/mix_annotations"
},
{
"name": "remix",
"path": "packages/remix"
},
{
"name": "mix_animate",
"path": "packages/mix_animate"
}
],
"settings": {
"search.exclude": {
".fvm/**": true,
Expand Down
10 changes: 10 additions & 0 deletions packages/mix/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 1.4.6

- **FIX**(docs): fix fn level docs for Style::applyVariants (#460).
- **FIX**: Shadow list animation (#445).
- **FIX**: SpecModifiers were taking a long time to animate. (#457).
- **FEAT**: Create mouse cursor Decorator (#263).
- **FEAT**: Add parameter onEnd for AnimatedStyle (#458).
- **FEAT**: `SingleChildScrollView` widget modifier (#427).
- **FEAT**: Remix improvements and further improvements (#410).

## 1.4.5

- **FIX**: HitTestBehavior when there is an Interectable in the tree (#437).
Expand Down
5 changes: 1 addition & 4 deletions packages/mix/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@

includes:
- ../../lints.yaml
- package:flutter_lints/flutter.yaml
include: ../../lints_with_dcm.yaml
2 changes: 2 additions & 0 deletions packages/mix/lib/mix.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ export 'src/modifiers/clip_widget_modifier.dart';
export 'src/modifiers/flexible_widget_modifier.dart';
export 'src/modifiers/fractionally_sized_box_widget_modifier.dart';
export 'src/modifiers/intrinsic_widget_modifier.dart';
export 'src/modifiers/mouse_cursor_modifier.dart';
export 'src/modifiers/opacity_widget_modifier.dart';
export 'src/modifiers/padding_widget_modifier.dart';
export 'src/modifiers/rotated_box_widget_modifier.dart';
export 'src/modifiers/scroll_view_widget_modifier.dart';
export 'src/modifiers/sized_box_widget_modifier.dart';
export 'src/modifiers/transform_widget_modifier.dart';
export 'src/modifiers/visibility_widget_modifier.dart';
Expand Down
19 changes: 14 additions & 5 deletions packages/mix/lib/src/attributes/animated/animated_data.dart
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
import 'package:flutter/animation.dart';
import 'package:flutter/widgets.dart';

import '../../internal/constants.dart';
import 'animated_data_dto.dart';

class AnimatedData {
final VoidCallback? _onEnd;
final Curve? _curve;
final Duration? _duration;
const AnimatedData({required Duration? duration, required Curve? curve})
: _curve = curve,
_duration = duration;
const AnimatedData({
required Duration? duration,
required Curve? curve,
VoidCallback? onEnd,
}) : _curve = curve,
_duration = duration,
_onEnd = onEnd;

const AnimatedData.withDefaults()
: _duration = kDefaultAnimationDuration,
_curve = Curves.linear;
_curve = Curves.linear,
_onEnd = null;

// Se default in case is not set
Duration get duration => _duration ?? kDefaultAnimationDuration;

// set default in case its not set
Curve get curve => _curve ?? Curves.linear;

VoidCallback? get onEnd => _onEnd;

AnimatedDataDto toDto() {
return AnimatedDataDto(duration: duration, curve: curve);
return AnimatedDataDto(duration: duration, curve: curve, onEnd: _onEnd);
}

@override
Expand Down
12 changes: 9 additions & 3 deletions packages/mix/lib/src/attributes/animated/animated_data_dto.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,22 @@ import 'animated_data.dart';
class AnimatedDataDto extends Dto<AnimatedData> {
final Duration? duration;
final Curve? curve;
final VoidCallback? onEnd;

const AnimatedDataDto({required this.duration, required this.curve});
const AnimatedDataDto({
required this.duration,
required this.curve,
this.onEnd,
});

const AnimatedDataDto.withDefaults()
: duration = kDefaultAnimationDuration,
curve = Curves.linear;
curve = Curves.linear,
onEnd = null;

@override
AnimatedData resolve(MixData mix) {
return AnimatedData(duration: duration, curve: curve);
return AnimatedData(duration: duration, curve: curve, onEnd: onEnd);
}

@override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ignore_for_file: avoid-importing-entrypoint-exports, avoid-unused-ignores, prefer_relative_imports

import 'package:flutter/material.dart';
import 'package:mix/mix.dart';
import '../../../mix.dart';
import 'package:mix_annotations/mix_annotations.dart';

part 'strut_style_dto.g.dart';
Expand Down
Loading

0 comments on commit 4f821d8

Please sign in to comment.