1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-12 15:58:32 +00:00

Compass app (#2446)

This commit is contained in:
Eric Windmill
2024-09-27 18:49:27 -04:00
committed by GitHub
parent fcf2552cda
commit 46b5a26b26
326 changed files with 53272 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
// 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 'booking_summary.freezed.dart';
part 'booking_summary.g.dart';
/// BookingSummary contains the necessary data to display a booking
/// in the user home screen, but lacks the rest of the booking data
/// like activitities or destination.
///
/// Use the [BookingRepository] to obtain a full [Booking]
/// using the [BookingSummary.id].
@freezed
class BookingSummary with _$BookingSummary {
const factory BookingSummary({
/// Booking id
required int id,
/// Name to be displayed
required String name,
/// Start date of the booking
required DateTime startDate,
/// End date of the booking
required DateTime endDate,
}) = _BookingSummary;
factory BookingSummary.fromJson(Map<String, Object?> json) =>
_$BookingSummaryFromJson(json);
}