-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add typography, theme, fix formatting
- Loading branch information
1 parent
f04b651
commit 6acb577
Showing
16 changed files
with
539 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" | ||
#include "Generated.xcconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" | ||
#include "Generated.xcconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Uncomment this line to define a global platform for your project | ||
# platform :ios, '12.0' | ||
|
||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. | ||
ENV['COCOAPODS_DISABLE_STATS'] = 'true' | ||
|
||
project 'Runner', { | ||
'Debug' => :debug, | ||
'Profile' => :release, | ||
'Release' => :release, | ||
} | ||
|
||
def flutter_root | ||
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) | ||
unless File.exist?(generated_xcode_build_settings_path) | ||
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" | ||
end | ||
|
||
File.foreach(generated_xcode_build_settings_path) do |line| | ||
matches = line.match(/FLUTTER_ROOT\=(.*)/) | ||
return matches[1].strip if matches | ||
end | ||
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" | ||
end | ||
|
||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) | ||
|
||
flutter_ios_podfile_setup | ||
|
||
target 'Runner' do | ||
use_frameworks! | ||
use_modular_headers! | ||
|
||
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) | ||
target 'RunnerTests' do | ||
inherit! :search_paths | ||
end | ||
end | ||
|
||
post_install do |installer| | ||
installer.pods_project.targets.each do |target| | ||
flutter_additional_ios_build_settings(target) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
PODS: | ||
- Flutter (1.0.0) | ||
- path_provider_foundation (0.0.1): | ||
- Flutter | ||
- FlutterMacOS | ||
|
||
DEPENDENCIES: | ||
- Flutter (from `Flutter`) | ||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) | ||
|
||
EXTERNAL SOURCES: | ||
Flutter: | ||
:path: Flutter | ||
path_provider_foundation: | ||
:path: ".symlinks/plugins/path_provider_foundation/darwin" | ||
|
||
SPEC CHECKSUMS: | ||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 | ||
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 | ||
|
||
PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796 | ||
|
||
COCOAPODS: 1.13.0 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
/// Defines [ThemeData] for Sudoku App UI. | ||
class SudokuTheme { | ||
/// Light theme with blue accent | ||
static ThemeData get light { | ||
return ThemeData( | ||
scaffoldBackgroundColor: const Color(0xFFF8F8F8), | ||
appBarTheme: const AppBarTheme( | ||
color: Color(0xFFF8F8F8), // Light background color | ||
), | ||
colorScheme: ColorScheme.fromSeed( | ||
seedColor: const Color(0xFF3F51B5), // Blue accent color | ||
), | ||
snackBarTheme: const SnackBarThemeData( | ||
behavior: SnackBarBehavior.floating, | ||
), | ||
elevatedButtonTheme: ElevatedButtonThemeData( | ||
style: ElevatedButton.styleFrom( | ||
backgroundColor: const Color(0xFF3F51B5), | ||
foregroundColor: Colors.white, | ||
elevation: 0, | ||
), | ||
), | ||
floatingActionButtonTheme: const FloatingActionButtonThemeData( | ||
backgroundColor: Color(0xFF3F51B5), | ||
foregroundColor: Colors.white, | ||
), | ||
); | ||
} | ||
|
||
/// Dark theme with same blue accent | ||
static ThemeData get dark { | ||
return ThemeData( | ||
scaffoldBackgroundColor: const Color(0xFF212121), | ||
appBarTheme: const AppBarTheme( | ||
color: Color(0xFF212121), // Dark background color | ||
), | ||
colorScheme: ColorScheme.fromSeed( | ||
brightness: Brightness.dark, | ||
seedColor: const Color(0xFF3F51B5), // Blue accent color | ||
), | ||
snackBarTheme: const SnackBarThemeData( | ||
behavior: SnackBarBehavior.floating, | ||
), | ||
elevatedButtonTheme: ElevatedButtonThemeData( | ||
style: ElevatedButton.styleFrom( | ||
backgroundColor: const Color(0xFF3F51B5), | ||
foregroundColor: Colors.white, | ||
elevation: 0, | ||
), | ||
), | ||
floatingActionButtonTheme: const FloatingActionButtonThemeData( | ||
backgroundColor: Color(0xFF3F51B5), | ||
foregroundColor: Colors.white, | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import 'package:flutter/widgets.dart'; | ||
|
||
/// Defines font weights for Sudoku App UI. | ||
abstract class SudokuFontWeight { | ||
/// [FontWeight] value of `w900` | ||
static const FontWeight black = FontWeight.w900; | ||
|
||
/// [FontWeight] value of `w800` | ||
static const FontWeight extraBold = FontWeight.w800; | ||
|
||
/// [FontWeight] value of `w700` | ||
static const FontWeight bold = FontWeight.w700; | ||
|
||
/// [FontWeight] value of `w600` | ||
static const FontWeight semiBold = FontWeight.w600; | ||
|
||
/// [FontWeight] value of `w500` | ||
static const FontWeight medium = FontWeight.w500; | ||
|
||
/// [FontWeight] value of `w400` | ||
static const FontWeight regular = FontWeight.w400; | ||
|
||
/// [FontWeight] value of `w300` | ||
static const FontWeight light = FontWeight.w300; | ||
|
||
/// [FontWeight] value of `w200` | ||
static const FontWeight extraLight = FontWeight.w200; | ||
|
||
/// [FontWeight] value of `w100` | ||
static const FontWeight thin = FontWeight.w100; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
import 'package:flutter/widgets.dart'; | ||
import 'package:google_fonts/google_fonts.dart'; | ||
import 'package:sudoku/typography/typography.dart'; | ||
|
||
/// Defines [TextStyle]s for Sudoku App UI. | ||
class SudokuTextStyle { | ||
/// Headline 1 Text Style | ||
static TextStyle get headline1 { | ||
return _baseTextStyle.copyWith( | ||
fontSize: 56, | ||
fontWeight: SudokuFontWeight.medium, | ||
); | ||
} | ||
|
||
/// Headline 2 Text Style | ||
static TextStyle get headline2 { | ||
return _baseTextStyle.copyWith( | ||
fontSize: 30, | ||
fontWeight: SudokuFontWeight.regular, | ||
); | ||
} | ||
|
||
/// Headline 3 Text Style | ||
static TextStyle get headline3 { | ||
return _baseTextStyle.copyWith( | ||
fontSize: 24, | ||
fontWeight: SudokuFontWeight.regular, | ||
); | ||
} | ||
|
||
/// Headline 4 Text Style | ||
static TextStyle get headline4 { | ||
return _baseTextStyle.copyWith( | ||
fontSize: 22, | ||
fontWeight: SudokuFontWeight.bold, | ||
); | ||
} | ||
|
||
/// Headline 5 Text Style | ||
static TextStyle get headline5 { | ||
return _baseTextStyle.copyWith( | ||
fontSize: 22, | ||
fontWeight: SudokuFontWeight.medium, | ||
); | ||
} | ||
|
||
/// Headline 6 Text Style | ||
static TextStyle get headline6 { | ||
return _baseTextStyle.copyWith( | ||
fontSize: 22, | ||
fontWeight: SudokuFontWeight.bold, | ||
); | ||
} | ||
|
||
/// Subtitle 1 Text Style | ||
static TextStyle get subtitle1 { | ||
return _baseTextStyle.copyWith( | ||
fontSize: 16, | ||
fontWeight: SudokuFontWeight.bold, | ||
); | ||
} | ||
|
||
/// Subtitle 2 Text Style | ||
static TextStyle get subtitle2 { | ||
return _baseTextStyle.copyWith( | ||
fontSize: 14, | ||
fontWeight: SudokuFontWeight.bold, | ||
); | ||
} | ||
|
||
/// Body Text 1 Text Style | ||
static TextStyle get bodyText1 { | ||
return _baseTextStyle.copyWith( | ||
fontSize: 18, | ||
fontWeight: SudokuFontWeight.medium, | ||
); | ||
} | ||
|
||
/// Body Text 2 Text Style (the default) | ||
static TextStyle get bodyText2 { | ||
return _baseTextStyle.copyWith( | ||
fontSize: 16, | ||
fontWeight: SudokuFontWeight.regular, | ||
); | ||
} | ||
|
||
/// Caption Text Style | ||
static TextStyle get caption { | ||
return _baseTextStyle.copyWith( | ||
fontSize: 14, | ||
fontWeight: SudokuFontWeight.regular, | ||
); | ||
} | ||
|
||
/// Button Text Style | ||
static TextStyle get button { | ||
return _baseTextStyle.copyWith( | ||
fontSize: 16, | ||
fontWeight: SudokuFontWeight.medium, | ||
); | ||
} | ||
|
||
static final _baseTextStyle = GoogleFonts.inter( | ||
fontWeight: SudokuFontWeight.regular, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export 'font_weights.dart'; | ||
export 'text_styles.dart'; |
Oops, something went wrong.