Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nullable params are required in generated ThemeExtension constructor #52

Closed
jtdLab opened this issue Nov 25, 2022 · 1 comment · Fixed by #56
Closed

Nullable params are required in generated ThemeExtension constructor #52

jtdLab opened this issue Nov 25, 2022 · 1 comment · Fixed by #56
Assignees

Comments

@jtdLab
Copy link

jtdLab commented Nov 25, 2022

Given

@tailor
class _$BoxStyle {
  static List<Color?> background = [
    TOfflineColors.lightGrey,
    TOfflineColorsDark.lightBlack,
  ];
}

leads to

class BoxStyle extends ThemeExtension<BoxStyle> {
  const BoxStyle({
    required this.background, // this is required but nullable
  });

  final Color? background;

  // ...
}

Is it possible to make background not beeing required?

@jakubtiteo jakubtiteo self-assigned this Dec 6, 2022
@jakubtiteo jakubtiteo linked a pull request Dec 6, 2022 that will close this issue
RSC-88 added a commit that referenced this issue Jan 4, 2023
…in_constructor

#52 - Do not require nullable params in theme constructor
@jakubtiteo
Copy link
Contributor

I think we can close it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants