Skip to content

Commit

Permalink
Merge pull request #101 from Prime-Holding/feat/theme-improvements
Browse files Browse the repository at this point in the history
Feat/theme improvements
  • Loading branch information
DavidDWiser authored May 10, 2024
2 parents d2ba292 + 4500f20 commit 0984e22
Show file tree
Hide file tree
Showing 154 changed files with 7,136 additions and 7,534 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,5 @@ coverage/
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
!/dev/ci/**/Gemfile.lock
!**/example/ios/Podfile.lock
!**/example/pubspec.lock
6 changes: 6 additions & 0 deletions packages/widget_toolkit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [0.0.2]
- Upgrade major versions of dependencies: `theme_tailor`, `theme_tailor_annotation`
### Breaking changes:
- Added `light()` and `dark()` constructors for each theme that previously has static `light` and `dark` fields
- Removed static fields `light` and `dark` for each of the themes

## [0.0.2-dev.3]
- Fixes and improvements

Expand Down
6 changes: 3 additions & 3 deletions packages/widget_toolkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ Step 2: Pass the Theme extensions you needed to the ThemeData of your app
MaterialApp(
theme: ThemeData.light().copyWith(
extensions: <ThemeExtension<dynamic>>[
ItemPickerTheme.light,
ItemPickerTheme.light(),
],
),
darkTheme: ThemeData.dark().copyWith(
extensions: <ThemeExtension<dynamic>>[
ItemPickerTheme.dark,
ItemPickerTheme.dark(),
],
),
// other parameters...
Expand All @@ -91,7 +91,7 @@ Change the theme properties in order to change the visual outcome
```
...
extensions: [
ItemPickerTheme.light.copyWith(
ItemPickerTheme.light().copyWith(
backgroundColor: Colors.orange,
iconColor: Colors.red,
icon: Icons.ac_unit_outlined,
Expand Down
64 changes: 53 additions & 11 deletions packages/widget_toolkit/example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,79 @@
.buildlog/
.history
.svn/
migrate_working_dir/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
.fvm/

# Generated code
lib/generated_plugin_registrant.dart
lib/assets.dart

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
# Exceptions to above rules.
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

# local env
env.json
lib/env_variable.g.dart

# Android related
**/android/**/gradle-wrapper.jar
**/android/.gradle
**/android/captures/
**/android/gradlew
**/android/gradlew.bat
**/android/local.properties
**/android/key.properties
**/android/**/GeneratedPluginRegistrant.java

# iOS/XCode related
**/ios/**/*.mode1v3
**/ios/**/*.mode2v3
**/ios/**/*.moved-aside
**/ios/**/*.pbxuser
**/ios/**/*.perspectivev3
**/ios/**/*sync/
**/ios/**/.sconsign.dblite
**/ios/**/.tags*
**/ios/**/.vagrant/
**/ios/**/DerivedData/
**/ios/**/Icon?
**/ios/**/Pods/
**/ios/**/.symlinks/
**/ios/**/profile
**/ios/**/xcuserdata
**/ios/.generated/
**/ios/Flutter/App.framework
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*

# Exceptions to above rules.
!**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion packages/widget_toolkit/example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'
# platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
8 changes: 4 additions & 4 deletions packages/widget_toolkit/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/url_launcher_ios/ios"

SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
url_launcher_ios: 6116280ddcfe98ab8820085d8d76ae7449447586

PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
PODFILE CHECKSUM: c4c93c5f6502fe2754f48404d3594bf779584011

COCOAPODS: 1.12.1
COCOAPODS: 1.14.3
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -343,7 +343,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -420,7 +420,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -469,7 +469,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
20 changes: 10 additions & 10 deletions packages/widget_toolkit/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ class MyApp extends StatelessWidget {
title: 'Widget Toolkit Demo',
theme: ThemeData.light()
.copyWith(colorScheme: ColorScheme.fromSwatch(), extensions: [
WidgetToolkitTheme.light,
ItemPickerTheme.light,
SearchPickerTheme.light,
TextFieldDialogTheme.light,
EditAddressTheme.light,
WidgetToolkitTheme.light(),
ItemPickerTheme.light(),
SearchPickerTheme.light(),
TextFieldDialogTheme.light(),
EditAddressTheme.light(),
]),
darkTheme: ThemeData.dark()
.copyWith(colorScheme: ColorScheme.fromSwatch(), extensions: [
WidgetToolkitTheme.dark,
ItemPickerTheme.dark,
SearchPickerTheme.dark,
TextFieldDialogTheme.dark,
EditAddressTheme.dark,
WidgetToolkitTheme.dark(),
ItemPickerTheme.dark(),
SearchPickerTheme.dark(),
TextFieldDialogTheme.dark(),
EditAddressTheme.dark(),
]),
home: const MyHomePage(),
);
Expand Down
34 changes: 17 additions & 17 deletions packages/widget_toolkit/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ packages:
dependency: "direct dev"
description:
name: build_runner
sha256: "581bacf68f89ec8792f5e5a0b2c4decd1c948e97ce659dc783688c8a88fbec21"
sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22"
url: "https://pub.dev"
source: hosted
version: "2.4.8"
version: "2.4.9"
build_runner_core:
dependency: transitive
description:
Expand Down Expand Up @@ -173,10 +173,10 @@ packages:
dependency: transitive
description:
name: dart_style
sha256: "40ae61a5d43feea6d24bd22c0537a6629db858963b99b4bc1c3db80676f32368"
sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9"
url: "https://pub.dev"
source: hosted
version: "2.3.4"
version: "2.3.6"
equatable:
dependency: transitive
description:
Expand Down Expand Up @@ -257,10 +257,10 @@ packages:
dependency: transitive
description:
name: frontend_server_client
sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612"
sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694
url: "https://pub.dev"
source: hosted
version: "3.2.0"
version: "4.0.0"
glob:
dependency: transitive
description:
Expand Down Expand Up @@ -465,10 +465,10 @@ packages:
dependency: transitive
description:
name: provider
sha256: "9a96a0a19b594dbc5bf0f1f27d2bc67d5f95957359b461cd9feb44ed6ae75096"
sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c
url: "https://pub.dev"
source: hosted
version: "6.1.1"
version: "6.1.2"
pub_semver:
dependency: transitive
description:
Expand All @@ -489,10 +489,10 @@ packages:
dependency: transitive
description:
name: rx_bloc
sha256: c049e8f9a65f873740f641642d8eb1cee387567e822a26b74d88fff502efb772
sha256: "268e9116233bfccf4ab4c7dfcb3933c08c5bf119d70b99e4fc4d96222500363c"
url: "https://pub.dev"
source: hosted
version: "5.0.1"
version: "5.0.3"
rxdart:
dependency: "direct main"
description:
Expand Down Expand Up @@ -590,10 +590,10 @@ packages:
dependency: transitive
description:
name: theme_tailor_annotation
sha256: "539f609455376e4a13def409aa36e8c983c0efcbd398a7b8e3103a4162ff8ca6"
sha256: "2990264653b700c7eece3557a5fe5f999cdcd32981aed67023a66004943db08d"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "3.0.1"
timing:
dependency: transitive
description:
Expand Down Expand Up @@ -630,10 +630,10 @@ packages:
dependency: transitive
description:
name: url_launcher_ios
sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03"
sha256: "9149d493b075ed740901f3ee844a38a00b33116c7c5c10d7fb27df8987fb51d5"
url: "https://pub.dev"
source: hosted
version: "6.2.4"
version: "6.2.5"
url_launcher_linux:
dependency: transitive
description:
Expand Down Expand Up @@ -726,10 +726,10 @@ packages:
dependency: transitive
description:
name: web
sha256: "1d9158c616048c38f712a6646e317a3426da10e884447626167240d45209cbad"
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
url: "https://pub.dev"
source: hosted
version: "0.5.0"
version: "0.5.1"
web_socket_channel:
dependency: transitive
description:
Expand All @@ -744,7 +744,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.2-dev.2"
version: "0.0.2"
xml:
dependency: transitive
description:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import '../models/errors/error_model.dart';

extension ExceptionToErrorModel on Exception {
ErrorModel asErrorModel() =>
this is ErrorModel ? this as ErrorModel : UnknownErrorModel(exception: this);
ErrorModel asErrorModel() => this is ErrorModel
? this as ErrorModel
: UnknownErrorModel(exception: this);
}

extension StreamExceptionToErrorModel on Stream<Exception> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,24 +104,24 @@ class DesignSystemTypography {

final titleBold = const TextStyle(
fontWeight: FontWeight.w600,
fontFamily: 'Meta',
fontFamily: 'Roboto',
fontStyle: FontStyle.normal,
height: 1.6,
fontSize: 20.0);
final descriptionThin = const TextStyle(
fontWeight: FontWeight.w400,
fontFamily: 'Meta',
fontFamily: 'Roboto',
fontStyle: FontStyle.normal,
fontSize: 14.0);
final smallThin = const TextStyle(
fontWeight: FontWeight.w400,
fontFamily: 'Meta',
fontFamily: 'Roboto',
fontStyle: FontStyle.normal,
fontSize: 12.0,
height: 1.8);
final captionBold = const TextStyle(
fontWeight: FontWeight.w600,
fontFamily: 'Meta',
fontFamily: 'Roboto',
fontStyle: FontStyle.normal,
letterSpacing: 0.8,
fontSize: 10.0);
Expand Down
Loading

0 comments on commit 0984e22

Please sign in to comment.