sample.dart 508 B

1234567891011121314151617181920212223242526272829
  1. /// A simple Dart class for user service.
  2. class UserService {
  3. /// Login method validates credentials.
  4. void login(String user, String pass) {
  5. // implementation
  6. }
  7. /// Logout method clears session.
  8. void logout() {
  9. // implementation
  10. }
  11. /// Static helper method.
  12. static void helper() {
  13. // implementation
  14. }
  15. }
  16. /// Enum representing user status.
  17. enum UserStatus {
  18. active,
  19. inactive,
  20. suspended,
  21. }
  22. /// Abstract class for base service.
  23. abstract class BaseService {
  24. void init();
  25. }