Skip to content

Commit

Permalink
Merge pull request #2737 from TalaoDAO/october
Browse files Browse the repository at this point in the history
fix: Add portal even if primary color is not provided #2733
  • Loading branch information
bibash28 authored Jun 24, 2024
2 parents eadfba6 + 6bb5d68 commit 6d4a0a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/dashboard/profile/models/profile_setting.dart
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ class GeneralOptions extends Equatable {
required this.published,
required this.profileId,
required this.customerPlan,
required this.primaryColor,
this.primaryColor,
});

factory GeneralOptions.fromJson(Map<String, dynamic> json) =>
Expand Down Expand Up @@ -381,7 +381,7 @@ class GeneralOptions extends Equatable {
final DateTime published;
final String profileId;
final String customerPlan;
final String primaryColor;
final String? primaryColor;

Map<String, dynamic> toJson() => _$GeneralOptionsToJson(this);

Expand Down
6 changes: 4 additions & 2 deletions lib/theme/app_theme/app_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ class AppTheme {
);
}

static ThemeData seedThemeData(Brightness brightness, String primaryColor) {
if (primaryColor.startsWith('#')) {
static ThemeData seedThemeData(Brightness brightness, String? primaryColor) {
if (primaryColor == null) {
return defaultThemeData(brightness);
} else if (primaryColor.startsWith('#')) {
final seedColor = Color(
int.parse(primaryColor.substring(1, 7), radix: 16) + 0xFF000000,
);
Expand Down

0 comments on commit 6d4a0a5

Please sign in to comment.