Skip to content

Commit

Permalink
Fix widget_toolkit comments and publishing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
DDavidPrime committed Apr 3, 2024
1 parent 6609979 commit 642288c
Show file tree
Hide file tree
Showing 17 changed files with 2,340 additions and 278 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,6 @@ coverage/
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
!/dev/ci/**/Gemfile.lock
!**/example/ios/Podfile.lock
!**/example/pubspec.lock
!pubspec.lock
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
2 changes: 1 addition & 1 deletion packages/widget_toolkit/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
url_launcher_ios: bbd758c6e7f9fd7b5b1d4cde34d2b95fcce5e812
url_launcher_ios: 6116280ddcfe98ab8820085d8d76ae7449447586

PODFILE CHECKSUM: c4c93c5f6502fe2754f48404d3594bf779584011

Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion packages/widget_toolkit/lib/assets.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
class Fonts {
static const String roboto = "Roboto";
}

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
126 changes: 73 additions & 53 deletions packages/widget_toolkit/lib/src/base/theme/widget_toolkit_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ class WidgetToolkitTheme extends ThemeExtension<WidgetToolkitTheme>
required this.textButtonTextStyle,
required this.errorCardIconColor,
required this.errorCardBackgroundColor,
required this.lightRed,
required this.blueLight,
required this.greenLight,
required this.messagePanelBackgroundColorImportant,
required this.messagePanelBackgroundColorInformative,
required this.messagePanelBackgroundColorPositive,
required this.errorCardTextColor,
required this.bottomSheetBarrierColor,
required this.messagePanelBackgroundColor,
Expand All @@ -60,7 +60,7 @@ class WidgetToolkitTheme extends ThemeExtension<WidgetToolkitTheme>
required this.buttonTextColor,
required this.shimmerBaseColor,
required this.shimmerHighlightColor,
required this.white,
required this.messagePanelColorNeutral,
required this.buttonBlueGradientEnd,
required this.elevatedButtonBackgroundColor,
required this.textColorWhite,
Expand All @@ -70,15 +70,16 @@ class WidgetToolkitTheme extends ThemeExtension<WidgetToolkitTheme>
required this.activeButtonLanguageTextColor,
required this.activeButtonTextColor,
required this.disabledButtonTextColor,
required this.black,
required this.shimmerTextColor,
required this.activeGradientColorStart,
required this.activeGradientColorEnd,
required this.boxShadowColor,
required this.red,
required this.orange,
required this.orangeLight,
required this.darkBlue,
required this.darkGreen,
required this.messagePanelBackgroundColorNeutral,
required this.messagePanelColorLessImportant,
required this.messagePanelBackgroundColorLessImportant,
required this.messagePanelColorImportant,
required this.messagePanelColorInformative,
required this.messagePanelColorPositive,
required this.textButtonLoadingIndicatorColor,
required this.buttonShadowColor,
required this.buttonPressedColor,
Expand All @@ -97,9 +98,8 @@ class WidgetToolkitTheme extends ThemeExtension<WidgetToolkitTheme>
required this.bottomSheetContentPadding,
required this.messagePanelErrorEdgeInsets,
required this.errorModalContentTitleInsets,
required this.smallEdgeInsets,
required this.mediumEdgeInsets,
required this.largeEdgeInsets,
required this.smallButtonPadding,
required this.gradientFillButtonDefaultPadding,
required this.messagePanelEdgeInsets,
required this.spacingXS1,
required this.spacingXS,
Expand Down Expand Up @@ -180,9 +180,12 @@ class WidgetToolkitTheme extends ThemeExtension<WidgetToolkitTheme>
errorCardIconColor = WidgetToolkitDesignSystem.light().colors.black87,
errorCardBackgroundColor =
WidgetToolkitDesignSystem.light().colors.lightRed,
lightRed = WidgetToolkitDesignSystem.light().colors.lightRed,
blueLight = WidgetToolkitDesignSystem.light().colors.blueLight,
greenLight = WidgetToolkitDesignSystem.light().colors.greenLight,
messagePanelBackgroundColorImportant =
WidgetToolkitDesignSystem.light().colors.lightRed,
messagePanelBackgroundColorInformative =
WidgetToolkitDesignSystem.light().colors.blueLight,
messagePanelBackgroundColorPositive =
WidgetToolkitDesignSystem.light().colors.greenLight,
errorCardTextColor = WidgetToolkitDesignSystem.light().colors.black87,
bottomSheetBarrierColor =
WidgetToolkitDesignSystem.light().colors.bottomSheetBarrierColor,
Expand Down Expand Up @@ -222,7 +225,8 @@ class WidgetToolkitTheme extends ThemeExtension<WidgetToolkitTheme>
WidgetToolkitDesignSystem.light().colors.shimmerBaseColor,
shimmerHighlightColor =
WidgetToolkitDesignSystem.light().colors.shimmerHighlightColor,
white = WidgetToolkitDesignSystem.light().colors.textColorWhite,
messagePanelColorNeutral =
WidgetToolkitDesignSystem.light().colors.textColorWhite,
buttonBlueGradientEnd =
WidgetToolkitDesignSystem.light().colors.buttonBlueGradientEnd,
elevatedButtonBackgroundColor =
Expand All @@ -240,17 +244,24 @@ class WidgetToolkitTheme extends ThemeExtension<WidgetToolkitTheme>
activeButtonTextColor =
WidgetToolkitDesignSystem.light().colors.black87,
disabledButtonTextColor = WidgetToolkitDesignSystem.light().colors.gray,
black = WidgetToolkitDesignSystem.light().colors.black,
shimmerTextColor = WidgetToolkitDesignSystem.light().colors.black,
activeGradientColorStart =
WidgetToolkitDesignSystem.light().colors.blue,
activeGradientColorEnd =
WidgetToolkitDesignSystem.light().colors.lightGray,
boxShadowColor = WidgetToolkitDesignSystem.light().colors.red,
red = WidgetToolkitDesignSystem.light().colors.red,
orange = WidgetToolkitDesignSystem.light().colors.orange,
orangeLight = WidgetToolkitDesignSystem.light().colors.orangeLight,
darkBlue = WidgetToolkitDesignSystem.light().colors.darkBlue,
darkGreen = WidgetToolkitDesignSystem.light().colors.darkGreen,
messagePanelBackgroundColorNeutral =
WidgetToolkitDesignSystem.light().colors.red,
messagePanelColorLessImportant =
WidgetToolkitDesignSystem.light().colors.orange,
messagePanelBackgroundColorLessImportant =
WidgetToolkitDesignSystem.light().colors.orangeLight,
messagePanelColorInformative =
WidgetToolkitDesignSystem.light().colors.darkBlue,
messagePanelColorImportant =
WidgetToolkitDesignSystem.light().colors.red,
messagePanelColorPositive =
WidgetToolkitDesignSystem.light().colors.darkGreen,
textButtonLoadingIndicatorColor =
WidgetToolkitDesignSystem.light().colors.redDark,
buttonShadowColor = WidgetToolkitDesignSystem.light().colors.white,
Expand Down Expand Up @@ -280,9 +291,8 @@ class WidgetToolkitTheme extends ThemeExtension<WidgetToolkitTheme>
bottomSheetContentPadding = const EdgeInsets.fromLTRB(20, 20, 20, 0),
messagePanelErrorEdgeInsets = const EdgeInsets.only(bottom: 20),
errorModalContentTitleInsets = const EdgeInsets.only(bottom: 8),
smallEdgeInsets = const EdgeInsets.all(12),
mediumEdgeInsets = const EdgeInsets.all(16),
largeEdgeInsets = const EdgeInsets.all(22),
smallButtonPadding = const EdgeInsets.all(12),
gradientFillButtonDefaultPadding = const EdgeInsets.all(16),
messagePanelEdgeInsets =
const EdgeInsets.only(left: 20, top: 16, right: 16, bottom: 16),
spacingXS1 = WidgetToolkitDesignSystem.light().spacings.xs1,
Expand Down Expand Up @@ -365,9 +375,12 @@ class WidgetToolkitTheme extends ThemeExtension<WidgetToolkitTheme>
WidgetToolkitDesignSystem.dark().colors.mediumWhite,
errorCardBackgroundColor =
WidgetToolkitDesignSystem.dark().colors.redDark,
lightRed = WidgetToolkitDesignSystem.dark().colors.lightRed,
blueLight = WidgetToolkitDesignSystem.dark().colors.blueLight,
greenLight = WidgetToolkitDesignSystem.dark().colors.greenLight,
messagePanelBackgroundColorImportant =
WidgetToolkitDesignSystem.dark().colors.lightRed,
messagePanelBackgroundColorInformative =
WidgetToolkitDesignSystem.dark().colors.blueLight,
messagePanelBackgroundColorPositive =
WidgetToolkitDesignSystem.dark().colors.greenLight,
errorCardTextColor = WidgetToolkitDesignSystem.dark().colors.white,
bottomSheetBarrierColor =
WidgetToolkitDesignSystem.dark().colors.bottomSheetBarrierColor,
Expand Down Expand Up @@ -407,7 +420,8 @@ class WidgetToolkitTheme extends ThemeExtension<WidgetToolkitTheme>
WidgetToolkitDesignSystem.dark().colors.shimmerBaseColor,
shimmerHighlightColor =
WidgetToolkitDesignSystem.dark().colors.shimmerHighlightColor,
white = WidgetToolkitDesignSystem.dark().colors.textColorWhite,
messagePanelColorNeutral =
WidgetToolkitDesignSystem.dark().colors.textColorWhite,
buttonBlueGradientEnd =
WidgetToolkitDesignSystem.dark().colors.buttonBlueGradientEnd,
elevatedButtonBackgroundColor =
Expand All @@ -424,16 +438,23 @@ class WidgetToolkitTheme extends ThemeExtension<WidgetToolkitTheme>
.activeButtonLanguageTextColor,
activeButtonTextColor = WidgetToolkitDesignSystem.dark().colors.white,
disabledButtonTextColor = WidgetToolkitDesignSystem.dark().colors.gray,
black = WidgetToolkitDesignSystem.dark().colors.white,
shimmerTextColor = WidgetToolkitDesignSystem.dark().colors.white,
activeGradientColorStart = WidgetToolkitDesignSystem.dark().colors.blue,
activeGradientColorEnd =
WidgetToolkitDesignSystem.dark().colors.lightGray,
boxShadowColor = WidgetToolkitDesignSystem.dark().colors.red,
red = WidgetToolkitDesignSystem.dark().colors.red,
orange = WidgetToolkitDesignSystem.dark().colors.orange,
orangeLight = WidgetToolkitDesignSystem.dark().colors.orangeLight,
darkBlue = WidgetToolkitDesignSystem.dark().colors.darkBlue,
darkGreen = WidgetToolkitDesignSystem.dark().colors.darkGreen,
messagePanelBackgroundColorNeutral =
WidgetToolkitDesignSystem.dark().colors.red,
messagePanelColorLessImportant =
WidgetToolkitDesignSystem.dark().colors.orange,
messagePanelBackgroundColorLessImportant =
WidgetToolkitDesignSystem.dark().colors.orangeLight,
messagePanelColorInformative =
WidgetToolkitDesignSystem.dark().colors.darkBlue,
messagePanelColorImportant =
WidgetToolkitDesignSystem.dark().colors.red,
messagePanelColorPositive =
WidgetToolkitDesignSystem.dark().colors.darkGreen,
textButtonLoadingIndicatorColor =
WidgetToolkitDesignSystem.dark().colors.redDark,
buttonShadowColor = WidgetToolkitDesignSystem.dark().colors.white,
Expand Down Expand Up @@ -462,9 +483,8 @@ class WidgetToolkitTheme extends ThemeExtension<WidgetToolkitTheme>
bottomSheetContentPadding = const EdgeInsets.fromLTRB(20, 20, 20, 0),
messagePanelErrorEdgeInsets = const EdgeInsets.only(bottom: 20),
errorModalContentTitleInsets = const EdgeInsets.only(bottom: 8),
smallEdgeInsets = const EdgeInsets.all(12),
mediumEdgeInsets = const EdgeInsets.all(16),
largeEdgeInsets = const EdgeInsets.all(22),
smallButtonPadding = const EdgeInsets.all(12),
gradientFillButtonDefaultPadding = const EdgeInsets.all(16),
messagePanelEdgeInsets =
const EdgeInsets.only(left: 20, top: 16, right: 16, bottom: 16),
spacingXS1 = WidgetToolkitDesignSystem.dark().spacings.xs1,
Expand Down Expand Up @@ -544,11 +564,11 @@ class WidgetToolkitTheme extends ThemeExtension<WidgetToolkitTheme>
@override
final Color errorCardBackgroundColor;
@override
final Color lightRed;
final Color messagePanelBackgroundColorImportant;
@override
final Color blueLight;
final Color messagePanelBackgroundColorInformative;
@override
final Color greenLight;
final Color messagePanelBackgroundColorPositive;
@override
final Color errorCardTextColor;
@override
Expand Down Expand Up @@ -594,7 +614,7 @@ class WidgetToolkitTheme extends ThemeExtension<WidgetToolkitTheme>
@override
final Color shimmerHighlightColor;
@override
final Color white;
final Color messagePanelColorNeutral;
@override
final Color buttonBlueGradientEnd;
@override
Expand All @@ -614,23 +634,25 @@ class WidgetToolkitTheme extends ThemeExtension<WidgetToolkitTheme>
@override
final Color disabledButtonTextColor;
@override
final Color black;
final Color shimmerTextColor;
@override
final Color activeGradientColorStart;
@override
final Color activeGradientColorEnd;
@override
final Color boxShadowColor;
@override
final Color red;
final Color messagePanelBackgroundColorNeutral;
@override
final Color orange;
final Color messagePanelColorLessImportant;
@override
final Color orangeLight;
final Color messagePanelBackgroundColorLessImportant;
@override
final Color darkBlue;
final Color messagePanelColorInformative;
@override
final Color darkGreen;
final Color messagePanelColorImportant;
@override
final Color messagePanelColorPositive;
@override
final Color textButtonLoadingIndicatorColor;
@override
Expand Down Expand Up @@ -668,11 +690,9 @@ class WidgetToolkitTheme extends ThemeExtension<WidgetToolkitTheme>
@override
final EdgeInsets errorModalContentTitleInsets;
@override
final EdgeInsets smallEdgeInsets;
@override
final EdgeInsets mediumEdgeInsets;
final EdgeInsets smallButtonPadding;
@override
final EdgeInsets largeEdgeInsets;
final EdgeInsets gradientFillButtonDefaultPadding;
@override
final EdgeInsets messagePanelEdgeInsets;
@override
Expand Down
Loading

0 comments on commit 642288c

Please sign in to comment.