chore: Upgrade to flutter 3.7.0 & Upgrade firebase dependencies

pull/496/head
Hugo Walbecq 3 years ago
parent 75a5cf7537
commit 052544e906

@ -4,7 +4,9 @@ import 'dart:developer';
import 'package:bloc/bloc.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/widgets.dart';
import 'package:pinball/firebase_options.dart';
class AppBlocObserver extends BlocObserver {
@override
@ -30,6 +32,7 @@ Future<void> bootstrap(BootstrapBuilder builder) async {
FlutterError.onError = (details) {
log(details.exceptionAsString(), stackTrace: details.stack);
};
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
await runZonedGuarded(
() async {

@ -0,0 +1,64 @@
// File generated by FlutterFire CLI.
// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
import 'package:flutter/foundation.dart'
show defaultTargetPlatform, kIsWeb, TargetPlatform;
/// Default [FirebaseOptions] for use with your Firebase apps.
///
/// Example:
/// ```dart
/// import 'firebase_options.dart';
/// // ...
/// await Firebase.initializeApp(
/// options: DefaultFirebaseOptions.currentPlatform,
/// );
/// ```
class DefaultFirebaseOptions {
static FirebaseOptions get currentPlatform {
if (kIsWeb) {
return web;
}
switch (defaultTargetPlatform) {
case TargetPlatform.android:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for android - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
case TargetPlatform.iOS:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for ios - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
case TargetPlatform.macOS:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for macos - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
case TargetPlatform.windows:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for windows - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
case TargetPlatform.linux:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for linux - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
case TargetPlatform.fuchsia:
throw UnsupportedError(
'DefaultFirebaseOptions are not supported for this platform.',
);
}
}
static const FirebaseOptions web = FirebaseOptions(
apiKey: 'AIzaSyBgMVAvYccjNypCDdpW0ol6syCcISU2yjM',
appId: '1:725488140557:web:7c61a0755fc23436fe7044',
messagingSenderId: '725488140557',
projectId: 'pinball-dev',
authDomain: 'pinball-dev.firebaseapp.com',
storageBucket: 'pinball-dev.appspot.com',
measurementId: 'G-9NW8SZRFJR',
);
}

@ -72,7 +72,7 @@ class LeaderboardDisplay extends PositionComponent with HasGameRef {
duration: 0.5,
curve: Curves.easeIn,
),
)..onFinishCallback = () {
)..onComplete = () {
current.removeFromParent();
inactiveArrow.active = true;
firstChild<PositionComponent>()?.add(

@ -100,6 +100,7 @@ class PinballGame extends PinballForge2DGame
FlameProvider<PlatformHelper>.value(platformHelper),
],
children: [
FpsComponent(),
BonusNoiseBehavior(),
GameBlocStatusListener(),
BallSpawningBehavior(),
@ -213,7 +214,7 @@ class PinballGame extends PinballForge2DGame
}
}
class DebugPinballGame extends PinballGame with FPSCounter, PanDetector {
class DebugPinballGame extends PinballGame with PanDetector {
DebugPinballGame({
required CharacterThemeCubit characterThemeBloc,
required LeaderboardRepository leaderboardRepository,
@ -314,7 +315,7 @@ class _DebugInformation extends Component with HasGameRef<DebugPinballGame> {
@override
void render(Canvas canvas) {
final debugText = [
'FPS: ${gameRef.fps().toStringAsFixed(1)}',
'FPS: ${gameRef.descendants().whereType<FpsComponent>().first.fps}',
'BALLS: ${gameRef.descendants().whereType<Ball>().length}',
].join(' | ');

@ -7,7 +7,7 @@ environment:
sdk: ">=2.16.0 <3.0.0"
dependencies:
firebase_auth: ^3.3.16
firebase_auth: ^4.2.5
flutter:
sdk: flutter

@ -7,7 +7,7 @@ environment:
sdk: ">=2.16.0 <3.0.0"
dependencies:
cloud_firestore: ^3.1.10
cloud_firestore: ^4.3.1
equatable: ^2.0.3
flutter:
sdk: flutter

@ -1,6 +1,5 @@
import 'package:flame/components.dart';
import 'package:pinball_components/pinball_components.dart';
import 'package:pinball_flame/pinball_flame.dart';
/// {@template ball_impulsing_behavior}
/// Impulses the [Ball] in a given direction.
@ -17,6 +16,5 @@ class BallImpulsingBehavior extends Component with ParentIsA<Ball> {
Future<void> onLoad() async {
await super.onLoad();
parent.body.linearVelocity = _impulse;
shouldRemove = true;
}
}

@ -18,7 +18,6 @@ class GoogleWordAnimatingBehavior extends TimerComponent
} else {
timer.stop();
bloc.onReset();
shouldRemove = true;
}
}
}

@ -5,133 +5,152 @@ packages:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
sha256: "0bd9a99b6eb96f07af141f0eb53eace8983e8e5aa5de59777aca31684680ef22"
url: "https://pub.dev"
source: hosted
version: "2.3.0"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
url: "https://pub.dev"
source: hosted
version: "2.8.2"
version: "2.10.0"
audioplayers:
dependency: transitive
description:
name: audioplayers
url: "https://pub.dartlang.org"
sha256: a565e7e3e8a21a823b8cd7fed0bde1eb3796a96b373374be557adecfb511fa6b
url: "https://pub.dev"
source: hosted
version: "0.20.1"
bloc:
dependency: transitive
description:
name: bloc
url: "https://pub.dartlang.org"
sha256: "318e6cc6803d93b8d2de5f580e452ca565bcaa44f724d5156c71961426b88e03"
url: "https://pub.dev"
source: hosted
version: "8.0.3"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.1.1"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.2.1"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306
url: "https://pub.dev"
source: hosted
version: "1.3.1"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
url: "https://pub.dev"
source: hosted
version: "1.1.0"
version: "1.1.1"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
url: "https://pub.dev"
source: hosted
version: "1.15.0"
version: "1.17.0"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67
url: "https://pub.dev"
source: hosted
version: "3.0.2"
dashbook:
dependency: "direct main"
description:
name: dashbook
url: "https://pub.dartlang.org"
sha256: a022d40095694c7345cac93ade887de3b0a8935cc45602dc533ec75568f4ef74
url: "https://pub.dev"
source: hosted
version: "0.1.7"
device_frame:
dependency: transitive
description:
name: device_frame
url: "https://pub.dartlang.org"
sha256: d5b4541a8755a36ac50b6605200e51db6d264438a38f327aec2ce31870e49885
url: "https://pub.dev"
source: hosted
version: "1.0.0"
equatable:
dependency: transitive
description:
name: equatable
url: "https://pub.dartlang.org"
sha256: c6094fd1efad3046334a9c40bee022147e55c25401ccd89b94e373e3edadd375
url: "https://pub.dev"
source: hosted
version: "2.0.3"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.3.1"
ffi:
dependency: transitive
description:
name: ffi
url: "https://pub.dartlang.org"
sha256: "35d0f481d939de0d640b3db9a7aa36a52cd22054a798a73b4f50bdad5ce12678"
url: "https://pub.dev"
source: hosted
version: "1.1.2"
file:
dependency: transitive
description:
name: file
url: "https://pub.dartlang.org"
sha256: b69516f2c26a5bcac4eee2e32512e1a5205ab312b3536c1c1227b2b942b5f9ad
url: "https://pub.dev"
source: hosted
version: "6.1.2"
flame:
dependency: "direct main"
description:
name: flame
url: "https://pub.dartlang.org"
sha256: "400b10d146e0f6c88975087d7a52963937c8958789803161fad9ab39bfd16697"
url: "https://pub.dev"
source: hosted
version: "1.1.1"
flame_audio:
dependency: transitive
description:
name: flame_audio
url: "https://pub.dartlang.org"
sha256: c512d6a046a90b82133242779cfe92612c7d1328a1480042c09b34bcbfaac555
url: "https://pub.dev"
source: hosted
version: "1.0.2"
flame_bloc:
dependency: "direct main"
description:
name: flame_bloc
url: "https://pub.dartlang.org"
sha256: "161896160315dfd92c9578fa4fe27728b6ac085655fb55a70d7ff229f16fb91c"
url: "https://pub.dev"
source: hosted
version: "1.4.0"
flame_forge2d:
@ -152,21 +171,24 @@ packages:
dependency: transitive
description:
name: flutter_bloc
url: "https://pub.dartlang.org"
sha256: "7b84d9777db3e30a5051c6718331be57e4cfc0c2424be82ac1771392cad7dbe8"
url: "https://pub.dev"
source: hosted
version: "8.0.1"
flutter_colorpicker:
dependency: transitive
description:
name: flutter_colorpicker
url: "https://pub.dartlang.org"
sha256: "458a6ed8ea480eb16ff892aedb4b7092b2804affd7e046591fb03127e8d8ef8b"
url: "https://pub.dev"
source: hosted
version: "1.0.3"
flutter_markdown:
dependency: transitive
description:
name: flutter_markdown
url: "https://pub.dartlang.org"
sha256: "5a3ecbecfed294a464b952494daafc05cf97f6faf9441168f507e9c9400f50e0"
url: "https://pub.dev"
source: hosted
version: "0.6.9"
flutter_test:
@ -183,14 +205,16 @@ packages:
dependency: transitive
description:
name: forge2d
url: "https://pub.dartlang.org"
sha256: "82e6e89bd1224d87066e9b164d534c4977f4895f554f931608a182534fac6e5e"
url: "https://pub.dev"
source: hosted
version: "0.11.0"
freezed_annotation:
dependency: transitive
description:
name: freezed_annotation
url: "https://pub.dartlang.org"
sha256: "1be037f901137bf2b9a0c309e9bf2694d6ec77687645211218191ade4f41a4b8"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
geometry:
@ -204,133 +228,152 @@ packages:
dependency: transitive
description:
name: http
url: "https://pub.dartlang.org"
sha256: "2ed163531e071c2c6b7c659635112f24cb64ecbebf6af46b550d536c0b1aa112"
url: "https://pub.dev"
source: hosted
version: "0.13.4"
http_parser:
dependency: transitive
description:
name: http_parser
url: "https://pub.dartlang.org"
sha256: e362d639ba3bc07d5a71faebb98cde68c05bfbcfbbb444b60b6f60bb67719185
url: "https://pub.dev"
source: hosted
version: "4.0.0"
intl:
dependency: transitive
description:
name: intl
url: "https://pub.dartlang.org"
sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91"
url: "https://pub.dev"
source: hosted
version: "0.17.0"
js:
dependency: transitive
description:
name: js
url: "https://pub.dartlang.org"
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
url: "https://pub.dev"
source: hosted
version: "0.6.3"
version: "0.6.5"
json_annotation:
dependency: transitive
description:
name: json_annotation
url: "https://pub.dartlang.org"
sha256: "2639efc0237c7b71c6584696c0847ea4e4733ddaf571ae9c79d5295e8ae17272"
url: "https://pub.dev"
source: hosted
version: "4.4.0"
markdown:
dependency: transitive
description:
name: markdown
url: "https://pub.dartlang.org"
sha256: "01512006c8429f604eb10f9848717baeaedf99e991d14a50d540d9beff08e5c6"
url: "https://pub.dev"
source: hosted
version: "4.0.1"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
url: "https://pub.dev"
source: hosted
version: "0.12.11"
version: "0.12.13"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
url: "https://pub.dev"
source: hosted
version: "0.1.3"
version: "0.2.0"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
url: "https://pub.dev"
source: hosted
version: "1.7.0"
version: "1.8.0"
nested:
dependency: transitive
description:
name: nested
url: "https://pub.dartlang.org"
sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
ordered_set:
dependency: transitive
description:
name: ordered_set
url: "https://pub.dartlang.org"
sha256: "74b0454418f58c34c8e527d91fb1ef571297dbcd5d3b4e5f983dc884e39cdf85"
url: "https://pub.dev"
source: hosted
version: "5.0.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
url: "https://pub.dev"
source: hosted
version: "1.8.0"
version: "1.8.2"
path_provider:
dependency: transitive
description:
name: path_provider
url: "https://pub.dartlang.org"
sha256: e92dee4d38a9044605cb3fb253e9b46eb9375dfcad4515d0379b44ac90797568
url: "https://pub.dev"
source: hosted
version: "2.0.9"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
url: "https://pub.dartlang.org"
sha256: "32bbab16092df3bedab89ed9f2c1cfaedf25d96a5036f62f16d5e372890d068c"
url: "https://pub.dev"
source: hosted
version: "2.0.13"
path_provider_ios:
dependency: transitive
description:
name: path_provider_ios
url: "https://pub.dartlang.org"
sha256: "943b76e54056386432cdc2731cb303e2f580346b61a1fc73819721767be72309"
url: "https://pub.dev"
source: hosted
version: "2.0.8"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
url: "https://pub.dartlang.org"
sha256: "1e109f4df28bd95eab71e323008b53d19c4d633bc1ab05b577518773474e9621"
url: "https://pub.dev"
source: hosted
version: "2.1.5"
path_provider_macos:
dependency: transitive
description:
name: path_provider_macos
url: "https://pub.dartlang.org"
sha256: "0adeb313e1f2c3fc52baeeee59b0fe9c2d1f7da56fd96a9234e1702ec653a453"
url: "https://pub.dev"
source: hosted
version: "2.0.5"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
sha256: "3dc0d51b07f85fec3746d9f4e8d31c73bb173cafa2e763f03f8df2e8d1878882"
url: "https://pub.dev"
source: hosted
version: "2.0.3"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
url: "https://pub.dartlang.org"
sha256: "366ad4e3541ea707f859e7148d4d5aba67d589d7936cee04a05c464a277eeb27"
url: "https://pub.dev"
source: hosted
version: "2.0.5"
pinball_audio:
@ -372,84 +415,96 @@ packages:
dependency: transitive
description:
name: platform
url: "https://pub.dartlang.org"
sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76"
url: "https://pub.dev"
source: hosted
version: "3.1.0"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
sha256: "075f927ebbab4262ace8d0b283929ac5410c0ac4e7fc123c76429564facfb757"
url: "https://pub.dev"
source: hosted
version: "2.1.2"
process:
dependency: transitive
description:
name: process
url: "https://pub.dartlang.org"
sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09"
url: "https://pub.dev"
source: hosted
version: "4.2.4"
provider:
dependency: transitive
description:
name: provider
url: "https://pub.dartlang.org"
sha256: "7896193cf752c40ba7f7732a95264319a787871e5d628225357f5c909182bc06"
url: "https://pub.dev"
source: hosted
version: "6.0.2"
shared_preferences:
dependency: transitive
description:
name: shared_preferences
url: "https://pub.dartlang.org"
sha256: "1cd0c3c0be0826eb52362ab018a81eed13b616ad9a52548c6ceb1bb349e6b6eb"
url: "https://pub.dev"
source: hosted
version: "2.0.13"
shared_preferences_android:
dependency: transitive
description:
name: shared_preferences_android
url: "https://pub.dartlang.org"
sha256: bc236594233d10b7668dd90414fe0e09d906115aaa1dfe269e478e5f2af532a6
url: "https://pub.dev"
source: hosted
version: "2.0.11"
shared_preferences_ios:
dependency: transitive
description:
name: shared_preferences_ios
url: "https://pub.dartlang.org"
sha256: "69d593a80fee48b97c66787eb930cdd42941c1537e80a1ff88a8c12a926c47d4"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
url: "https://pub.dartlang.org"
sha256: ac361c65c4cf342dfc0a8b9e45eab66b9b3ad6eaff9785850d4ec0cf6b474422
url: "https://pub.dev"
source: hosted
version: "2.1.0"
shared_preferences_macos:
dependency: transitive
description:
name: shared_preferences_macos
url: "https://pub.dartlang.org"
sha256: f063907c3f678de8daa033d234b7c9e420df5fe3d499a97bfb82cc30cf171496
url: "https://pub.dev"
source: hosted
version: "2.0.3"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
url: "https://pub.dartlang.org"
sha256: "992f0fdc46d0a3c0ac2e5859f2de0e577bbe51f78a77ee8f357cbe626a2ad32d"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
url: "https://pub.dartlang.org"
sha256: "09da0185028a227d51721cade7a3cbd5cc5f163a19593266f2acba87f729bf9c"
url: "https://pub.dev"
source: hosted
version: "2.0.3"
shared_preferences_windows:
dependency: transitive
description:
name: shared_preferences_windows
url: "https://pub.dartlang.org"
sha256: ae68cf0df0910e38c95522dbd8a6082ce9715053c369750c5709d17de81d032e
url: "https://pub.dev"
source: hosted
version: "2.1.0"
sky_engine:
@ -461,149 +516,170 @@ packages:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
url: "https://pub.dev"
source: hosted
version: "1.8.1"
version: "1.9.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
url: "https://pub.dev"
source: hosted
version: "1.10.0"
version: "1.11.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.1.1"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
version: "1.2.0"
synchronized:
dependency: transitive
description:
name: synchronized
url: "https://pub.dartlang.org"
sha256: a7f0790927c0806ae0d5eb061c713748fa6070ef0037e391a2d53c3844c09dc2
url: "https://pub.dev"
source: hosted
version: "3.0.0+2"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.2.1"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
url: "https://pub.dev"
source: hosted
version: "0.4.8"
version: "0.4.16"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
sha256: "53bdf7e979cfbf3e28987552fd72f637e63f3c8724c9e56d9246942dc2fa36ee"
url: "https://pub.dev"
source: hosted
version: "1.3.0"
url_launcher:
dependency: transitive
description:
name: url_launcher
url: "https://pub.dartlang.org"
sha256: "2d9de5efddbd134ee68d73d0735e7477c00bcbf1ee91afa37514d6c876d38587"
url: "https://pub.dev"
source: hosted
version: "6.1.0"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
url: "https://pub.dartlang.org"
sha256: b693e6698f7e6985710d67a050e3acbdda3b9cfc4b43b9f1c40cdbe42c705b92
url: "https://pub.dev"
source: hosted
version: "6.0.15"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
url: "https://pub.dartlang.org"
sha256: e51a93f0da65733beb69fdbc43cea524d86ed8e524479e9faefc9304cec34a57
url: "https://pub.dev"
source: hosted
version: "6.0.15"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
url: "https://pub.dartlang.org"
sha256: c3ec89d52305ec647cf037eafe2be8d2f1149b5723d1f2ec716fc3d58469de5d
url: "https://pub.dev"
source: hosted
version: "3.0.0"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
url: "https://pub.dartlang.org"
sha256: c028c7f80fdb99cf48b94c471c0f8b9b855a188f4865df76e2a7663ae640e9d2
url: "https://pub.dev"
source: hosted
version: "3.0.0"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
url: "https://pub.dartlang.org"
sha256: "1b9c4dab07794498b83b5f938e26b20f68c3b460a3015b0307f9541cb34ef93d"
url: "https://pub.dev"
source: hosted
version: "2.0.5"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
url: "https://pub.dartlang.org"
sha256: "2b5494722d4eb0fe1a12ceb15a4b132ba7dfc92793089c243bf109bed828d97f"
url: "https://pub.dev"
source: hosted
version: "2.0.9"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
url: "https://pub.dartlang.org"
sha256: aa14bdb9265fa22416fc387b33e44eb37fd38768bf465fafcec73d283f3457b1
url: "https://pub.dev"
source: hosted
version: "3.0.0"
uuid:
dependency: transitive
description:
name: uuid
url: "https://pub.dartlang.org"
sha256: "2469694ad079893e3b434a627970c33f2fa5adc46dfe03c9617546969a9a8afc"
url: "https://pub.dev"
source: hosted
version: "3.0.6"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.4"
very_good_analysis:
dependency: "direct dev"
description:
name: very_good_analysis
url: "https://pub.dartlang.org"
sha256: cecd7a0e92978dbece97c255502c8965f2db3439cde5a11f4b2c65f1955911ee
url: "https://pub.dev"
source: hosted
version: "2.4.0"
win32:
dependency: transitive
description:
name: win32
url: "https://pub.dartlang.org"
sha256: "8dd0c450f748d553a8181c6cb9fdf12b987cebaeccdbc75032186b89ae93907b"
url: "https://pub.dev"
source: hosted
version: "2.4.4"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
url: "https://pub.dartlang.org"
sha256: "060b6e1c891d956f72b5ac9463466c37cce3fa962a921532fc001e86fe93438e"
url: "https://pub.dev"
source: hosted
version: "0.2.0+1"
sdks:
dart: ">=2.16.0 <3.0.0"
dart: ">=2.18.0 <3.0.0"
flutter: ">=2.10.0"

@ -5,7 +5,6 @@ export 'src/canvas/canvas.dart';
export 'src/flame_provider.dart';
export 'src/keyboard_input_controller.dart';
export 'src/layer.dart';
export 'src/parent_is_a.dart';
export 'src/pinball_forge2d_game.dart';
export 'src/shapes/shapes.dart';
export 'src/sprite_animation.dart';

@ -1,6 +1,5 @@
import 'package:flame/components.dart';
import 'package:flame_forge2d/flame_forge2d.dart';
import 'package:pinball_flame/pinball_flame.dart';
/// Appends a new [ContactCallbacks] to the parent.
///

@ -174,4 +174,16 @@ class CanvasWrapper implements Canvas {
@override
void translate(double dx, double dy) => canvas.translate(dx, dy);
@override
Rect getDestinationClipBounds() => canvas.getDestinationClipBounds();
@override
Rect getLocalClipBounds() => canvas.getLocalClipBounds();
@override
Float64List getTransform() => canvas.getTransform();
@override
void restoreToCount(int count) => canvas.restoreToCount(count);
}

@ -1,6 +1,6 @@
import 'dart:ui';
import 'package:collection/collection.dart' as collection;
import 'package:collection/collection.dart' as collection;
import 'package:flame/components.dart';
import 'package:pinball_flame/src/canvas/canvas_wrapper.dart';

@ -1,3 +1,5 @@
import 'dart:async';
import 'package:flame/components.dart';
/// A mixin that ensures a parent is of the given type [T].
@ -6,7 +8,7 @@ mixin ParentIsA<T extends Component> on Component {
T get parent => super.parent! as T;
@override
Future<void>? addToParent(covariant T parent) {
FutureOr<void> addToParent(covariant T parent) {
return super.addToParent(parent);
}
}

@ -349,7 +349,7 @@ void main() {
);
expect(
game.overlays.value,
game.overlays.activeOverlays,
contains(PinballGame.mobileControlsOverlay),
);
},
@ -378,7 +378,7 @@ void main() {
);
expect(
game.overlays.value,
game.overlays.activeOverlays,
isNot(contains(PinballGame.mobileControlsOverlay)),
);
},

@ -1,6 +1,6 @@
import 'dart:typed_data';
import 'package:flame/assets.dart';
import 'package:flame/cache.dart';
import 'package:flame/flame.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

Loading…
Cancel
Save