@ -1,2 +0,0 @@
|
||||
export 'app_colors.dart';
|
||||
export 'app_text_style.dart';
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 156 KiB |
@ -1,10 +1,8 @@
|
||||
// ignore_for_file: public_member_api_docs
|
||||
|
||||
part of 'sparky_bumper_cubit.dart';
|
||||
|
||||
/// Indicates the [SparkyBumperCubit]'s current state.
|
||||
enum SparkyBumperState {
|
||||
/// A lit up bumper.
|
||||
active,
|
||||
|
||||
/// A dimmed bumper.
|
||||
inactive,
|
||||
lit,
|
||||
dimmed,
|
||||
}
|
||||
|
@ -1,11 +0,0 @@
|
||||
import 'package:dashbook/dashbook.dart';
|
||||
import 'package:sandbox/common/common.dart';
|
||||
import 'package:sandbox/stories/sparky_bumper/sparky_bumper_game.dart';
|
||||
|
||||
void addSparkyBumperStories(Dashbook dashbook) {
|
||||
dashbook.storiesOf('Sparky Bumpers').addGame(
|
||||
title: 'Traced',
|
||||
description: SparkyBumperGame.description,
|
||||
gameBuilder: (_) => SparkyBumperGame(),
|
||||
);
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flame/input.dart';
|
||||
import 'package:pinball_components/pinball_components.dart';
|
||||
import 'package:pinball_flame/pinball_flame.dart';
|
||||
import 'package:sandbox/stories/ball/basic_ball_game.dart';
|
||||
|
||||
class SparkyComputerGame extends BallGame {
|
||||
static const description = '''
|
||||
Shows how the SparkyComputer is rendered.
|
||||
|
||||
- Activate the "trace" parameter to overlay the body.
|
||||
- Tap anywhere on the screen to spawn a ball into the game.
|
||||
''';
|
||||
|
||||
@override
|
||||
Future<void> onLoad() async {
|
||||
await super.onLoad();
|
||||
|
||||
await images.loadAll([
|
||||
Assets.images.sparky.computer.base.keyName,
|
||||
Assets.images.sparky.computer.top.keyName,
|
||||
Assets.images.sparky.computer.glow.keyName,
|
||||
]);
|
||||
|
||||
camera.followVector2(Vector2(-10, -40));
|
||||
await addFromBlueprint(SparkyComputer());
|
||||
await ready();
|
||||
await traceAllBodies();
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
import 'package:dashbook/dashbook.dart';
|
||||
import 'package:sandbox/common/common.dart';
|
||||
import 'package:sandbox/stories/sparky_scorch/sparky_bumper_game.dart';
|
||||
import 'package:sandbox/stories/sparky_scorch/sparky_computer_game.dart';
|
||||
|
||||
void addSparkyScorchStories(Dashbook dashbook) {
|
||||
dashbook.storiesOf('Sparky Scorch')
|
||||
..addGame(
|
||||
title: 'Sparky Computer',
|
||||
description: SparkyComputerGame.description,
|
||||
gameBuilder: (_) => SparkyComputerGame(),
|
||||
)
|
||||
..addGame(
|
||||
title: 'Sparky Bumper',
|
||||
description: SparkyBumperGame.description,
|
||||
gameBuilder: (_) => SparkyBumperGame(),
|
||||
);
|
||||
}
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 209 KiB |
@ -0,0 +1,16 @@
|
||||
/// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
/// *****************************************************
|
||||
/// FlutterGen
|
||||
/// *****************************************************
|
||||
|
||||
// ignore_for_file: directives_ordering,unnecessary_import
|
||||
|
||||
class FontFamily {
|
||||
FontFamily._();
|
||||
|
||||
/// Font family: PixeloidMono
|
||||
static const String pixeloidMono = 'PixeloidMono';
|
||||
|
||||
/// Font family: PixeloidSans
|
||||
static const String pixeloidSans = 'PixeloidSans';
|
||||
}
|
@ -1,17 +1,11 @@
|
||||
// ignore_for_file: public_member_api_docs
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
abstract class AppColors {
|
||||
abstract class PinballColors {
|
||||
static const Color white = Color(0xFFFFFFFF);
|
||||
|
||||
static const Color darkBlue = Color(0xFF0C32A4);
|
||||
|
||||
static const Color yellow = Color(0xFFFFEE02);
|
||||
|
||||
static const Color orange = Color(0xFFE5AB05);
|
||||
|
||||
static const Color blue = Color(0xFF4B94F6);
|
||||
|
||||
static const Color transparent = Color(0x00000000);
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:pinball_ui/pinball_ui.dart';
|
||||
|
||||
/// Pinball theme
|
||||
class PinballTheme {
|
||||
/// Standard [ThemeData] for Pinball UI
|
||||
static ThemeData get standard {
|
||||
return ThemeData(
|
||||
textTheme: _textTheme,
|
||||
);
|
||||
}
|
||||
|
||||
static TextTheme get _textTheme {
|
||||
return const TextTheme(
|
||||
headline1: PinballTextStyle.headline1,
|
||||
headline2: PinballTextStyle.headline2,
|
||||
headline3: PinballTextStyle.headline3,
|
||||
headline4: PinballTextStyle.headline4,
|
||||
subtitle1: PinballTextStyle.subtitle1,
|
||||
subtitle2: PinballTextStyle.subtitle2,
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
export 'pinball_colors.dart';
|
||||
export 'pinball_text_style.dart';
|
||||
export 'pinball_theme.dart';
|
@ -0,0 +1,31 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pinball_ui/pinball_ui.dart';
|
||||
|
||||
void main() {
|
||||
group('PinballColors', () {
|
||||
test('white is 0xFFFFFFFF', () {
|
||||
expect(PinballColors.white, const Color(0xFFFFFFFF));
|
||||
});
|
||||
|
||||
test('darkBlue is 0xFF0C32A4', () {
|
||||
expect(PinballColors.darkBlue, const Color(0xFF0C32A4));
|
||||
});
|
||||
|
||||
test('yellow is 0xFFFFEE02', () {
|
||||
expect(PinballColors.yellow, const Color(0xFFFFEE02));
|
||||
});
|
||||
|
||||
test('orange is 0xFFE5AB05', () {
|
||||
expect(PinballColors.orange, const Color(0xFFE5AB05));
|
||||
});
|
||||
|
||||
test('blue is 0xFF4B94F6', () {
|
||||
expect(PinballColors.blue, const Color(0xFF4B94F6));
|
||||
});
|
||||
|
||||
test('transparent is 0x00000000', () {
|
||||
expect(PinballColors.transparent, const Color(0x00000000));
|
||||
});
|
||||
});
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pinball_ui/pinball_ui.dart';
|
||||
|
||||
void main() {
|
||||
group('PinballTextStyle', () {
|
||||
test('headline1 has fontSize 28 and white color', () {
|
||||
const style = PinballTextStyle.headline1;
|
||||
expect(style.fontSize, 28);
|
||||
expect(style.color, PinballColors.white);
|
||||
});
|
||||
|
||||
test('headline2 has fontSize 24', () {
|
||||
const style = PinballTextStyle.headline2;
|
||||
expect(style.fontSize, 24);
|
||||
});
|
||||
|
||||
test('headline3 has fontSize 20 and white color', () {
|
||||
const style = PinballTextStyle.headline3;
|
||||
expect(style.fontSize, 20);
|
||||
expect(style.color, PinballColors.white);
|
||||
});
|
||||
|
||||
test('headline4 has fontSize 16 and white color', () {
|
||||
const style = PinballTextStyle.headline4;
|
||||
expect(style.fontSize, 16);
|
||||
expect(style.color, PinballColors.white);
|
||||
});
|
||||
|
||||
test('subtitle1 has fontSize 10 and yellow color', () {
|
||||
const style = PinballTextStyle.subtitle1;
|
||||
expect(style.fontSize, 10);
|
||||
expect(style.color, PinballColors.yellow);
|
||||
});
|
||||
|
||||
test('subtitle2 has fontSize 16 and white color', () {
|
||||
const style = PinballTextStyle.subtitle2;
|
||||
expect(style.fontSize, 16);
|
||||
expect(style.color, PinballColors.white);
|
||||
});
|
||||
});
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pinball_ui/pinball_ui.dart';
|
||||
|
||||
void main() {
|
||||
group('PinballTheme', () {
|
||||
group('standard', () {
|
||||
test('headline1 matches PinballTextStyle#headline1', () {
|
||||
expect(
|
||||
PinballTheme.standard.textTheme.headline1!.fontSize,
|
||||
PinballTextStyle.headline1.fontSize,
|
||||
);
|
||||
expect(
|
||||
PinballTheme.standard.textTheme.headline1!.color,
|
||||
PinballTextStyle.headline1.color,
|
||||
);
|
||||
expect(
|
||||
PinballTheme.standard.textTheme.headline1!.fontFamily,
|
||||
PinballTextStyle.headline1.fontFamily,
|
||||
);
|
||||
});
|
||||
|
||||
test('headline2 matches PinballTextStyle#headline2', () {
|
||||
expect(
|
||||
PinballTheme.standard.textTheme.headline2!.fontSize,
|
||||
PinballTextStyle.headline2.fontSize,
|
||||
);
|
||||
expect(
|
||||
PinballTheme.standard.textTheme.headline2!.fontFamily,
|
||||
PinballTextStyle.headline2.fontFamily,
|
||||
);
|
||||
expect(
|
||||
PinballTheme.standard.textTheme.headline2!.fontWeight,
|
||||
PinballTextStyle.headline2.fontWeight,
|
||||
);
|
||||
});
|
||||
|
||||
test('headline3 matches PinballTextStyle#headline3', () {
|
||||
expect(
|
||||
PinballTheme.standard.textTheme.headline3!.fontSize,
|
||||
PinballTextStyle.headline3.fontSize,
|
||||
);
|
||||
expect(
|
||||
PinballTheme.standard.textTheme.headline3!.color,
|
||||
PinballTextStyle.headline3.color,
|
||||
);
|
||||
expect(
|
||||
PinballTheme.standard.textTheme.headline3!.fontFamily,
|
||||
PinballTextStyle.headline3.fontFamily,
|
||||
);
|
||||
});
|
||||
|
||||
test('headline4 matches PinballTextStyle#headline4', () {
|
||||
expect(
|
||||
PinballTheme.standard.textTheme.headline4!.fontSize,
|
||||
PinballTextStyle.headline4.fontSize,
|
||||
);
|
||||
expect(
|
||||
PinballTheme.standard.textTheme.headline4!.color,
|
||||
PinballTextStyle.headline4.color,
|
||||
);
|
||||
expect(
|
||||
PinballTheme.standard.textTheme.headline4!.fontFamily,
|
||||
PinballTextStyle.headline4.fontFamily,
|
||||
);
|
||||
});
|
||||
|
||||
test('subtitle1 matches PinballTextStyle#subtitle1', () {
|
||||
expect(
|
||||
PinballTheme.standard.textTheme.subtitle1!.fontSize,
|
||||
PinballTextStyle.subtitle1.fontSize,
|
||||
);
|
||||
expect(
|
||||
PinballTheme.standard.textTheme.subtitle1!.color,
|
||||
PinballTextStyle.subtitle1.color,
|
||||
);
|
||||
expect(
|
||||
PinballTheme.standard.textTheme.subtitle1!.fontFamily,
|
||||
PinballTextStyle.subtitle1.fontFamily,
|
||||
);
|
||||
});
|
||||
|
||||
test('subtitle2 matches PinballTextStyle#subtitle2', () {
|
||||
expect(
|
||||
PinballTheme.standard.textTheme.subtitle2!.fontSize,
|
||||
PinballTextStyle.subtitle2.fontSize,
|
||||
);
|
||||
expect(
|
||||
PinballTheme.standard.textTheme.subtitle2!.color,
|
||||
PinballTextStyle.subtitle2.color,
|
||||
);
|
||||
expect(
|
||||
PinballTheme.standard.textTheme.subtitle2!.fontFamily,
|
||||
PinballTextStyle.subtitle2.fontFamily,
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
if (typeof firebase === 'undefined') throw new Error('hosting/init-error: Firebase SDK not detected. You must include it before /__/firebase/init.js');
|
||||
firebase.initializeApp({
|
||||
"apiKey": "API_KEY",
|
||||
"appId": "APP_ID",
|
||||
"authDomain": "AUTH_DOMAIN",
|
||||
"apiKey": "AIzaSyBgMVAvYccjNypCDdpW0ol6syCcISU2yjM",
|
||||
"appId": "1:725488140557:web:7c61a0755fc23436fe7044",
|
||||
"authDomain": "pinball-dev.firebaseapp.com",
|
||||
"databaseURL": "",
|
||||
"measurementId": "MEASUREMENT_ID",
|
||||
"messagingSenderId": "MEASUREMENT_SENDER_ID",
|
||||
"projectId": "PROJECT_ID",
|
||||
"storageBucket": "STORAGE_BUCKET"
|
||||
"measurementId": "G-9NW8SZRFJR",
|
||||
"messagingSenderId": "725488140557",
|
||||
"projectId": "pinball-dev",
|
||||
"storageBucket": "pinball-dev.appspot.com"
|
||||
});
|