Updated constants

This commit is contained in:
Benoy Bose 2025-03-01 17:13:20 +05:30
parent f0856242cc
commit 96156a0e68
6 changed files with 46 additions and 50 deletions

View File

@ -1,39 +1,28 @@
<!--
This README describes the package. If you publish this package to pub.dev,
this README's contents appear on the landing page for your package.
# fitlien_common
For information about how to write a good package README, see the guide for
[writing package pages](https://dart.dev/tools/pub/writing-package-pages).
This package contains common classes and constants used in the Fitlien ecosystem.
For general information about developing packages, see the Dart guide for
[creating packages](https://dart.dev/guides/libraries/create-packages)
and the Flutter guide for
[developing packages and plugins](https://flutter.dev/to/develop-packages).
-->
## InvitationStatus
TODO: Put a short description of the package here that helps potential users
know whether this package might be useful for them.
`InvitationStatus` is an enumeration of the possible statuses of an invitation.
## Features
### Values
TODO: List what your package can do. Maybe include images, gifs, or videos.
- `sent`: The invitation has been sent to the user.
- `accepted`: The user has accepted the invitation.
- `rejected`: The user has rejected the invitation.
- `canceled`: The invitation has been canceled by the sender.
## Getting started
## CollectionNames
TODO: List prerequisites and provide or point to information on how to
start using the package.
`CollectionNames` is a class containing constants for the names of the collections used in the Fitlien ecosystem.
## Usage
### Constants
TODO: Include short and useful examples for package users. Add longer examples
to `/example` folder.
```dart
const like = 'sample';
```
## Additional information
TODO: Tell users more about the package: where to find more information, how to
contribute to the package, how to file issues, what response they can expect
from the package authors, and more.
- `users`: The collection containing all users.
- `trainerProfiles`: The collection of trainers profiles
- `gyms`: The collection of gyms
- `invitations`: The collection of invitations
- `termsConditions`: The collection of terms and conditions
- `configurations`: The collection of configurations
- `memberships`: The collection of memberships

View File

@ -1,6 +0,0 @@
class FitLienStatus {
static const String active = 'ACTIVE';
static const String pending = 'PENDING';
static const String rejected = 'REJECTED';
static const String accepted = 'ACCEPTED';
}

16
lib/fitlien_common.dart Normal file
View File

@ -0,0 +1,16 @@
class InvitationStatus {
static const String active = 'ACTIVE';
static const String pending = 'PENDING';
static const String rejected = 'REJECTED';
static const String accepted = 'ACCEPTED';
}
class CollectionNames {
static const String users = 'users';
static const String trainerProfiles = 'trainer_profiles';
static const String gyms = 'gyms';
static const String invitations = 'invitations';
static const String termsConditions = 'terms_and_conditions';
static const String configurations = 'configurations';
static const String memberships = 'memberships';
}

View File

@ -1,5 +1,5 @@
name: fit_lien_package
description: "A new Flutter package project."
name: fitlien_common
description: "Library containing common classes and constants used in the Fitlien ecosystem."
version: 0.0.1
homepage:
@ -15,6 +15,7 @@ dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^5.0.0
test: ^1.25.15
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

View File

@ -1,12 +0,0 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:fit_lien_package/fit_lien_package.dart';
void main() {
test('adds one to input values', () {
final calculator = Calculator();
expect(calculator.addOne(2), 3);
expect(calculator.addOne(-7), -6);
expect(calculator.addOne(0), 1);
});
}

View File

@ -0,0 +1,8 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:fitlien_common/fitlien_common.dart'; // Update with actual package name
void main() {
test('Test CollectionNames constants', () {
expect(CollectionNames.users, 'users');
});
}