mirror of https://github.com/flutter/pinball.git
chore: update common files, add text style & color files (#193)
parent
a7a0082831
commit
0203927c49
@ -0,0 +1 @@
|
||||
export 'assets.gen.dart';
|
@ -0,0 +1,15 @@
|
||||
// ignore_for_file: public_member_api_docs
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
abstract class AppColors {
|
||||
static const Color white = Color(0xFFFFFFFF);
|
||||
|
||||
static const Color darkBlue = Color(0xFF0C32A4);
|
||||
|
||||
static const Color orange = Color(0xFFFFEE02);
|
||||
|
||||
static const Color blue = Color(0xFF4B94F6);
|
||||
|
||||
static const Color transparent = Color(0x00000000);
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
// ignore_for_file: public_member_api_docs
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:pinball/theme/theme.dart';
|
||||
import 'package:pinball_components/pinball_components.dart';
|
||||
|
||||
const _fontPackage = 'pinball_components';
|
||||
const _primaryFontFamily = PinballFonts.pixeloidSans;
|
||||
|
||||
abstract class AppTextStyle {
|
||||
static const headline1 = TextStyle(
|
||||
fontSize: 28,
|
||||
package: _fontPackage,
|
||||
fontFamily: _primaryFontFamily,
|
||||
);
|
||||
|
||||
static const headline2 = TextStyle(
|
||||
fontSize: 24,
|
||||
package: _fontPackage,
|
||||
fontFamily: _primaryFontFamily,
|
||||
);
|
||||
|
||||
static const headline3 = TextStyle(
|
||||
color: AppColors.white,
|
||||
fontSize: 20,
|
||||
package: _fontPackage,
|
||||
fontFamily: _primaryFontFamily,
|
||||
);
|
||||
|
||||
static const subtitle1 = TextStyle(
|
||||
fontSize: 10,
|
||||
fontFamily: _primaryFontFamily,
|
||||
package: _fontPackage,
|
||||
);
|
||||
}
|
@ -1,2 +1,4 @@
|
||||
export 'app_colors.dart';
|
||||
export 'app_text_style.dart';
|
||||
export 'cubit/theme_cubit.dart';
|
||||
export 'view/view.dart';
|
||||
|
@ -0,0 +1,2 @@
|
||||
export 'assets.gen.dart';
|
||||
export 'pinball_fonts.dart';
|
@ -1,16 +1,14 @@
|
||||
import 'package:pinball_components/gen/fonts.gen.dart';
|
||||
|
||||
String _prefixFont(String font) {
|
||||
return 'packages/pinball_components/$font';
|
||||
}
|
||||
const String _fontPath = 'packages/pinball_components/';
|
||||
|
||||
/// Class with the fonts available on the pinball game
|
||||
class PinballFonts {
|
||||
PinballFonts._();
|
||||
|
||||
/// Mono variation of the Pixeloid font
|
||||
static final String pixeloidMono = _prefixFont(FontFamily.pixeloidMono);
|
||||
static const String pixeloidMono = '$_fontPath/${FontFamily.pixeloidMono}';
|
||||
|
||||
/// Sans variation of the Pixeloid font
|
||||
static final String pixeloidSans = _prefixFont(FontFamily.pixeloidMono);
|
||||
static const String pixeloidSans = '$_fontPath/${FontFamily.pixeloidSans}';
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
library pinball_components;
|
||||
|
||||
export 'gen/assets.gen.dart';
|
||||
export 'gen/pinball_fonts.dart';
|
||||
export 'gen/gen.dart';
|
||||
export 'src/pinball_components.dart';
|
||||
|
Loading…
Reference in new issue