Skip to content

Commit

Permalink
fix: Minor issues due Flutter 3.16 (#2856)
Browse files Browse the repository at this point in the history
With the last Flutter version, a few issues were introduced in Flame sourcebase. This PR solves that.
  • Loading branch information
erickzanardo committed Nov 16, 2023
1 parent 717363b commit d51cd58
Show file tree
Hide file tree
Showing 24 changed files with 40 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cicd.yml
Expand Up @@ -9,7 +9,7 @@ on:


env:
FLUTTER_MIN_VERSION: '3.13.0'
FLUTTER_MIN_VERSION: '3.16.0'

jobs:
# BEGIN LINTING STAGE
Expand Down
Expand Up @@ -127,7 +127,7 @@ class _BodyButtonState extends State<BodyButtonWidget> {
},
child: const Text(
'Flying button!',
textScaleFactor: 2.0,
textScaler: TextScaler.linear(2.0),
),
),
),
Expand Down
8 changes: 7 additions & 1 deletion examples/pubspec.yaml
Expand Up @@ -23,7 +23,7 @@ dependencies:
flutter:
sdk: flutter
google_fonts: ^4.0.4
meta: ^1.8.0
meta: ^1.9.1
padracing: ^1.0.0
provider: ^6.0.5
rogue_shooter: ^0.1.0
Expand All @@ -33,6 +33,12 @@ dev_dependencies:
flame_lint: ^1.1.1
test: any

dependency_overrides:
# https://github.com/EsotericSoftware/spine-runtimes/issues/2420
raw_image_provider:
git:
url: https://github.com/erickzanardo/flutter_raw_image_provider.git

flutter:
uses-material-design: true

Expand Down
Expand Up @@ -178,8 +178,8 @@ class RoundedRectangle extends Shape {
@override
Vector2 nearestPoint(Vector2 point) {
_tmpResult.setValues(
(point.x).clamp(_left, _right),
(point.y).clamp(_top, _bottom),
point.x.clamp(_left, _right),
point.y.clamp(_top, _bottom),
);
if (containsPoint(_tmpResult)) {
return _tmpResult;
Expand Down
4 changes: 2 additions & 2 deletions packages/flame/pubspec.yaml
Expand Up @@ -21,12 +21,12 @@ dependencies:

dev_dependencies:
canvas_test: ^0.2.0
dartdoc: ^6.2.2
dartdoc: ^6.3.0
flame_lint: ^1.1.1
flame_test: ^1.14.0
flutter_test:
sdk: flutter
mocktail: ^0.3.0
mocktail: ^1.0.1
test: any

screenshots:
Expand Down
Binary file modified packages/flame/test/_goldens/paint_decorator_blur.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion packages/flame/test/game/game_render_box_test.dart
Expand Up @@ -9,7 +9,12 @@ class _MockFlameGame extends Mock implements FlameGame {}

class _MockBuildContext extends Mock implements BuildContext {}

class _MockPipelineOwner extends Mock implements PipelineOwner {}
class _MockPipelineOwner extends Mock implements PipelineOwner {
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return '';
}
}

final nodesNeedingCompositingBitsUpdate = <RenderObject>[];

Expand Down
4 changes: 2 additions & 2 deletions packages/flame_audio/pubspec.yaml
Expand Up @@ -20,8 +20,8 @@ dependencies:
synchronized: ^3.1.0

dev_dependencies:
dartdoc: ^6.2.2
dartdoc: ^6.3.0
flame_lint: ^1.1.1
flutter_test:
sdk: flutter
mocktail: ^1.0.0
mocktail: ^1.0.1
4 changes: 2 additions & 2 deletions packages/flame_bloc/pubspec.yaml
Expand Up @@ -20,10 +20,10 @@ dependencies:
meta: ^1.9.1

dev_dependencies:
dartdoc: ^6.2.2
dartdoc: ^6.3.0
flame_lint: ^1.1.1
flame_test: ^1.14.0
flutter_lints: ^2.0.1
flutter_test:
sdk: flutter
mocktail: ^0.3.0
mocktail: ^1.0.1
2 changes: 1 addition & 1 deletion packages/flame_fire_atlas/pubspec.yaml
Expand Up @@ -23,4 +23,4 @@ dev_dependencies:
flame_lint: ^1.1.1
flutter_test:
sdk: flutter
mocktail: ^1.0.0
mocktail: ^1.0.1
2 changes: 1 addition & 1 deletion packages/flame_jenny/jenny/pubspec.yaml
Expand Up @@ -14,6 +14,6 @@ dependencies:
meta: ^1.9.1

dev_dependencies:
dartdoc: ^6.2.2
dartdoc: ^6.3.0
flame_lint: ^1.1.1
test: any
2 changes: 1 addition & 1 deletion packages/flame_jenny/pubspec.yaml
Expand Up @@ -21,6 +21,6 @@ dependencies:
meta: ^1.9.1

dev_dependencies:
dartdoc: ^6.2.2
dartdoc: ^6.3.0
flame_lint: ^1.1.1
test: any
2 changes: 1 addition & 1 deletion packages/flame_lint/pubspec.yaml
Expand Up @@ -11,4 +11,4 @@ environment:
sdk: ">=3.0.0 <4.0.0"

dev_dependencies:
dartdoc: ^6.2.2
dartdoc: ^6.3.0
2 changes: 1 addition & 1 deletion packages/flame_markdown/pubspec.yaml
Expand Up @@ -19,7 +19,7 @@ dependencies:
markdown: ^7.1.1

dev_dependencies:
dartdoc: ^6.2.2
dartdoc: ^6.3.0
flame_lint: ^1.1.1
flutter_test:
sdk: flutter
2 changes: 1 addition & 1 deletion packages/flame_network_assets/example/pubspec.yaml
Expand Up @@ -5,7 +5,7 @@ publish_to: 'none'
version: 1.0.0+1

environment:
sdk: '>=2.18.0 <4.0.0'
sdk: ">=3.0.0 <4.0.0"

dependencies:
flame: ^1.10.1
Expand Down
6 changes: 3 additions & 3 deletions packages/flame_network_assets/pubspec.yaml
Expand Up @@ -8,7 +8,7 @@ funding:
- https://patreon.com/bluefireoss

environment:
sdk: '>=2.18.0 <4.0.0'
sdk: ">=3.0.0 <4.0.0"
flutter: ">=1.17.0"

dependencies:
Expand All @@ -21,8 +21,8 @@ dependencies:
path_provider: ^2.0.15

dev_dependencies:
dartdoc: ^6.2.2
dartdoc: ^6.3.0
flame_lint: ^1.1.1
flutter_test:
sdk: flutter
mocktail: ^0.3.0
mocktail: ^1.0.1
2 changes: 1 addition & 1 deletion packages/flame_noise/pubspec.yaml
Expand Up @@ -18,7 +18,7 @@ dependencies:
sdk: flutter

dev_dependencies:
dartdoc: ^6.2.2
dartdoc: ^6.3.0
flame_lint: ^1.1.1
flame_test: ^1.14.0
test: any
2 changes: 1 addition & 1 deletion packages/flame_oxygen/pubspec.yaml
Expand Up @@ -18,5 +18,5 @@ dependencies:
oxygen: ^0.2.0

dev_dependencies:
dartdoc: ^6.2.2
dartdoc: ^6.3.0
flame_lint: ^1.1.1
2 changes: 1 addition & 1 deletion packages/flame_rive/pubspec.yaml
Expand Up @@ -18,7 +18,7 @@ dependencies:
rive: ^0.12.3

dev_dependencies:
dartdoc: ^6.2.2
dartdoc: ^6.3.0
flame_lint: ^1.1.1
flame_test: ^1.14.0
flutter_test:
Expand Down
2 changes: 1 addition & 1 deletion packages/flame_spine/pubspec.yaml
Expand Up @@ -16,7 +16,7 @@ dependencies:
flame: ^1.10.1
flutter:
sdk: flutter
spine_flutter: ^4.1.2
spine_flutter: ^4.2.17

dev_dependencies:
flame_lint: ^1.1.1
Expand Down
4 changes: 2 additions & 2 deletions packages/flame_svg/pubspec.yaml
Expand Up @@ -18,9 +18,9 @@ dependencies:
flutter_svg: ^2.0.5

dev_dependencies:
dartdoc: ^6.2.2
dartdoc: ^6.3.0
flame_lint: ^1.1.1
flutter_test:
sdk: flutter
mocktail: ^0.3.0
mocktail: ^1.0.1
test: any
Binary file modified packages/flame_svg/test/_goldens/render_sharply.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/flame_test/pubspec.yaml
Expand Up @@ -22,5 +22,5 @@ dependencies:
vector_math: ^2.1.4

dev_dependencies:
dartdoc: ^6.2.2
dartdoc: ^6.3.0
flame_lint: ^1.1.1
2 changes: 1 addition & 1 deletion packages/flame_tiled/pubspec.yaml
Expand Up @@ -21,7 +21,7 @@ dependencies:
xml: ^6.3.0

dev_dependencies:
dartdoc: ^6.2.2
dartdoc: ^6.3.0
flame_lint: ^1.1.1
flutter_test:
sdk: flutter
Expand Down

0 comments on commit d51cd58

Please sign in to comment.