Initial commit: CleanPlate shared Dart package
Domain models, enums, constants, validators shared between frontend and backend.
This commit is contained in:
13
example/cleanplate_shared_example.dart
Normal file
13
example/cleanplate_shared_example.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
import 'package:cleanplate_shared/cleanplate_shared.dart';
|
||||
|
||||
void main() {
|
||||
// Example: validate a recipe title
|
||||
final titleError = RecipeValidator.validateTitle('My Delicious Pasta');
|
||||
print('Title validation: ${titleError ?? "valid"}');
|
||||
|
||||
// Example: use diet type enum
|
||||
print('Diet: ${DietType.vegetarian.displayName}');
|
||||
|
||||
// Example: API constants
|
||||
print('Login endpoint: ${ApiConstants.authLogin}');
|
||||
}
|
||||
Reference in New Issue
Block a user