Skip to content

Instantly share code, notes, and snippets.

@dickermoshe
Last active May 16, 2024 17:02
Show Gist options
  • Save dickermoshe/e39f41e2677b6da2ae6a835d2b132e40 to your computer and use it in GitHub Desktop.
Save dickermoshe/e39f41e2677b6da2ae6a835d2b132e40 to your computer and use it in GitHub Desktop.
@Stateful
class Counter{
int initialCount; // Public variables are inputs
int _count = 0; // Private variables are part of state
int? nullableInput = null; // All fields are required unless defaults are specified
}
// ||
// ||
// ||
// \ /
// \ /
// \/
Counter({required initialCount, this.nullableInput})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment