Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions gallery/gallery/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ PODS:
- Flutter (1.0.0)
- package_info (0.0.1):
- Flutter
- path_provider (0.0.1):
- Flutter
- shared_preferences (0.0.1):
- Flutter
- shared_preferences_macos (0.0.1):
Expand All @@ -18,6 +20,7 @@ PODS:
DEPENDENCIES:
- Flutter (from `Flutter`)
- package_info (from `.symlinks/plugins/package_info/ios`)
- path_provider (from `.symlinks/plugins/path_provider/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`)
- shared_preferences_web (from `.symlinks/plugins/shared_preferences_web/ios`)
Expand All @@ -30,6 +33,8 @@ EXTERNAL SOURCES:
:path: Flutter
package_info:
:path: ".symlinks/plugins/package_info/ios"
path_provider:
:path: ".symlinks/plugins/path_provider/ios"
shared_preferences:
:path: ".symlinks/plugins/shared_preferences/ios"
shared_preferences_macos:
Expand All @@ -46,6 +51,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
package_info: 48b108e75b8802c2d5e126f208ef540561c98aef
path_provider: fb74bd0465e96b594bb3b5088ee4a4e7bb1f2a9d
shared_preferences: 430726339841afefe5142b9c1f50cb6bd7793e01
shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087
shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9
Expand Down
4 changes: 2 additions & 2 deletions gallery/gallery/lib/pages/demo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import 'package:gallery/l10n/gallery_localizations.dart';
import 'package:gallery/layout/adaptive.dart';
import 'package:gallery/pages/splash.dart';
import 'package:gallery/themes/gallery_theme_data.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:url_launcher/url_launcher.dart';

Expand Down Expand Up @@ -289,9 +290,8 @@ class _DemoPageState extends State<DemoPage> with TickerProviderStateMixin {
);
break;
case _DemoState.code:
final TextStyle codeTheme = TextStyle(
final TextStyle codeTheme = GoogleFonts.robotoMono(
fontSize: 12 * GalleryOptions.of(context).textScaleFactor(context),
fontFamily: 'Roboto Mono',
);
section = CodeStyle(
baseStyle: codeTheme.copyWith(color: Color(0xFFFAFBFB)),
Expand Down
123 changes: 61 additions & 62 deletions gallery/gallery/lib/studies/crane/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// found in the LICENSE file.

import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';

import 'package:gallery/studies/crane/colors.dart';

Expand Down Expand Up @@ -42,66 +43,64 @@ ThemeData _buildCraneTheme() {
}

TextTheme _buildCraneTextTheme(TextTheme base) {
return base
.copyWith(
display4: base.display4.copyWith(
fontWeight: FontWeight.w300,
fontSize: 96,
),
display3: base.display3.copyWith(
fontWeight: FontWeight.w400,
fontSize: 60,
),
display2: base.display2.copyWith(
fontWeight: FontWeight.w600,
fontSize: 48,
),
display1: base.display1.copyWith(
fontWeight: FontWeight.w600,
fontSize: 34,
),
headline: base.headline.copyWith(
fontWeight: FontWeight.w600,
fontSize: 24,
),
title: base.title.copyWith(
fontWeight: FontWeight.w600,
fontSize: 20,
),
subhead: base.subhead.copyWith(
fontWeight: FontWeight.w500,
fontSize: 16,
letterSpacing: 0.5,
),
subtitle: base.subtitle.copyWith(
fontWeight: FontWeight.w600,
fontSize: 12,
color: craneGrey,
),
body2: base.body2.copyWith(
fontWeight: FontWeight.w500,
fontSize: 16,
),
body1: base.body1.copyWith(
fontWeight: FontWeight.w400,
fontSize: 14,
),
button: base.button.copyWith(
fontWeight: FontWeight.w600,
fontSize: 13,
letterSpacing: 0.8,
),
caption: base.caption.copyWith(
fontWeight: FontWeight.w500,
fontSize: 12,
color: craneGrey,
),
overline: base.overline.copyWith(
fontWeight: FontWeight.w600,
fontSize: 12,
),
)
.apply(
fontFamily: 'Raleway',
);
return GoogleFonts.ralewayTextTheme(
base.copyWith(
display4: base.display4.copyWith(
fontWeight: FontWeight.w300,
fontSize: 96,
),
display3: base.display3.copyWith(
fontWeight: FontWeight.w400,
fontSize: 60,
),
display2: base.display2.copyWith(
fontWeight: FontWeight.w600,
fontSize: 48,
),
display1: base.display1.copyWith(
fontWeight: FontWeight.w600,
fontSize: 34,
),
headline: base.headline.copyWith(
fontWeight: FontWeight.w600,
fontSize: 24,
),
title: base.title.copyWith(
fontWeight: FontWeight.w600,
fontSize: 20,
),
subhead: base.subhead.copyWith(
fontWeight: FontWeight.w500,
fontSize: 16,
letterSpacing: 0.5,
),
subtitle: base.subtitle.copyWith(
fontWeight: FontWeight.w600,
fontSize: 12,
color: craneGrey,
),
body2: base.body2.copyWith(
fontWeight: FontWeight.w500,
fontSize: 16,
),
body1: base.body1.copyWith(
fontWeight: FontWeight.w400,
fontSize: 14,
),
button: base.button.copyWith(
fontWeight: FontWeight.w600,
fontSize: 13,
letterSpacing: 0.8,
),
caption: base.caption.copyWith(
fontWeight: FontWeight.w500,
fontSize: 12,
color: craneGrey,
),
overline: base.overline.copyWith(
fontWeight: FontWeight.w600,
fontSize: 12,
),
),
);
}
11 changes: 7 additions & 4 deletions gallery/gallery/lib/studies/rally/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// found in the LICENSE file.

import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:gallery/data/gallery_options.dart';
import 'package:gallery/l10n/gallery_localizations.dart';

Expand Down Expand Up @@ -61,27 +62,29 @@ class RallyApp extends StatelessWidget {
TextTheme _buildRallyTextTheme(TextTheme base) {
return base
.copyWith(
// TODO: Use GoogleFonts.robotoCondensed when available
body1: base.body1.copyWith(
fontFamily: 'Roboto Condensed',
fontSize: 14,
fontWeight: FontWeight.w400,
),
body2: base.body2.copyWith(
fontFamily: 'Eczar',
body2: GoogleFonts.eczar(
fontSize: 40,
fontWeight: FontWeight.w400,
letterSpacing: 1.4,
textStyle: base.body2,
),
// TODO: Use GoogleFonts.robotoCondensed when available
button: base.button.copyWith(
fontFamily: 'Roboto Condensed',
fontWeight: FontWeight.w700,
letterSpacing: 2.8,
),
headline: base.body2.copyWith(
fontFamily: 'Eczar',
headline: GoogleFonts.eczar(
fontSize: 40,
fontWeight: FontWeight.w600,
letterSpacing: 1.4,
textStyle: base.body2,
),
)
.apply(
Expand Down
6 changes: 3 additions & 3 deletions gallery/gallery/lib/studies/shrine/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// found in the LICENSE file.

import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:gallery/studies/shrine/colors.dart';
import 'package:gallery/studies/shrine/supplemental/cut_corners_border.dart';

Expand Down Expand Up @@ -46,7 +47,7 @@ ThemeData _buildShrineTheme() {
}

TextTheme _buildShrineTextTheme(TextTheme base) {
return base
return GoogleFonts.rubikTextTheme(base
.copyWith(
headline: base.headline.copyWith(
fontWeight: FontWeight.w500,
Expand Down Expand Up @@ -82,10 +83,9 @@ TextTheme _buildShrineTextTheme(TextTheme base) {
),
)
.apply(
fontFamily: 'Rubik',
displayColor: shrineBrown900,
bodyColor: shrineBrown900,
);
));
}

const ColorScheme _shrineColorScheme = ColorScheme(
Expand Down
88 changes: 12 additions & 76 deletions gallery/gallery/lib/themes/gallery_theme_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// found in the LICENSE file.

import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';

class GalleryThemeData {
static const _lightFillColor = Colors.black;
Expand Down Expand Up @@ -75,86 +76,21 @@ class GalleryThemeData {
brightness: Brightness.dark,
);

static TextTheme _textTheme = TextTheme(
display1: _GalleryTextStyles.heading,
caption: _GalleryTextStyles.studyTitle,
headline: _GalleryTextStyles.categoryTitle,
subhead: _GalleryTextStyles.listTitle,
overline: _GalleryTextStyles.listDescription,
body2: _GalleryTextStyles.sliderTitle,
subtitle: _GalleryTextStyles.settingsFooter,
body1: _GalleryTextStyles.options,
title: _GalleryTextStyles.title,
button: _GalleryTextStyles.button,
);
}

class _GalleryTextStyles {
static const _regular = FontWeight.w400;
static const _medium = FontWeight.w500;
static const _semiBold = FontWeight.w600;
static const _bold = FontWeight.w700;

static const _montserrat = 'Montserrat';
static const _oswald = 'Oswald';

static const heading = TextStyle(
fontFamily: _montserrat,
fontWeight: _bold,
fontSize: 20.0,
);

static const studyTitle = TextStyle(
fontFamily: _oswald,
fontWeight: _semiBold,
fontSize: 16.0,
);

static const categoryTitle = TextStyle(
fontFamily: _oswald,
fontWeight: _medium,
fontSize: 16.0,
);

static const listTitle = TextStyle(
fontFamily: _montserrat,
fontWeight: _medium,
fontSize: 16.0,
);

static const listDescription = TextStyle(
fontFamily: _montserrat,
fontWeight: _medium,
fontSize: 12.0,
);

static const sliderTitle = TextStyle(
fontFamily: _montserrat,
fontWeight: _regular,
fontSize: 14.0,
);

static const settingsFooter = TextStyle(
fontFamily: _montserrat,
fontWeight: _medium,
fontSize: 14.0,
);

static const options = TextStyle(
fontFamily: _montserrat,
fontWeight: _regular,
fontSize: 16.0,
);

static const title = TextStyle(
fontFamily: _montserrat,
fontWeight: _bold,
fontSize: 16.0,
);

static const button = TextStyle(
fontFamily: _montserrat,
fontWeight: _semiBold,
fontSize: 14.0,
static TextTheme _textTheme = TextTheme(
display1: GoogleFonts.montserrat(fontWeight: _bold, fontSize: 20.0),
caption: GoogleFonts.oswald(fontWeight: _semiBold, fontSize: 16.0),
headline: GoogleFonts.oswald(fontWeight: _medium, fontSize: 16.0),
subhead: GoogleFonts.montserrat(fontWeight: _medium, fontSize: 16.0),
overline: GoogleFonts.montserrat(fontWeight: _medium, fontSize: 12.0),
body2: GoogleFonts.montserrat(fontWeight: _regular, fontSize: 14.0),
subtitle: GoogleFonts.montserrat(fontWeight: _medium, fontSize: 14.0),
body1: GoogleFonts.montserrat(fontWeight: _regular, fontSize: 16.0),
title: GoogleFonts.montserrat(fontWeight: _bold, fontSize: 16.0),
button: GoogleFonts.montserrat(fontWeight: _semiBold, fontSize: 14.0),
);
}
Loading