mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 22:09:06 +00:00
25 lines
654 B
Dart
25 lines
654 B
Dart
// Copyright 2024 The Flutter team. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'login_request.freezed.dart';
|
|
|
|
part 'login_request.g.dart';
|
|
|
|
/// Simple data class to hold login request data.
|
|
@freezed
|
|
class LoginRequest with _$LoginRequest {
|
|
const factory LoginRequest({
|
|
/// Email address.
|
|
required String email,
|
|
|
|
/// Plain text password.
|
|
required String password,
|
|
}) = _LoginRequest;
|
|
|
|
factory LoginRequest.fromJson(Map<String, Object?> json) =>
|
|
_$LoginRequestFromJson(json);
|
|
}
|