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

Default values for fields #7

Open
FatulM opened this issue Sep 4, 2021 · 2 comments
Open

Default values for fields #7

FatulM opened this issue Sep 4, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@FatulM
Copy link
Contributor

FatulM commented Sep 4, 2021

Add a capability to add default values for fields.
for example like this:

import 'package:sealed_annotations/sealed_annotations.dart';

part 'weather.sealed.dart';

@Sealed()
abstract class _Weather {
  void sunny();

  void rainy({int rain = 10});

  void windy({@WithDefault('1e10') double velocity, double? angle = 100.0});
}

there is the question that if it should support dynamic defaults as well ?!

@FatulM FatulM self-assigned this Sep 4, 2021
@FatulM
Copy link
Contributor Author

FatulM commented Sep 4, 2021

@SaeedMasoumi

@FatulM FatulM added the enhancement New feature or request label Sep 4, 2021
@FatulM FatulM changed the title default values for fields Default values for fields Sep 12, 2021
@FatulM
Copy link
Contributor Author

FatulM commented Sep 12, 2021

There should be ability to set default values for common fields on constructor

@FatulM FatulM removed their assignment Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant