open ai service

This commit is contained in:
2026-02-08 12:05:05 +06:00
parent d7722ad81d
commit 3209827e92
29 changed files with 2175 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
import '../../models/models.dart';
class AddBookState {
final String title;
final String author;
final String annotation;
final String genre;
final Book? editBook;
final bool isSaved;
const AddBookState({
this.title = '',
this.author = '',
this.annotation = '',
this.genre = 'fiction',
this.editBook,
this.isSaved = false,
});
bool get isEditing => editBook != null;
AddBookState copyWith({
String? title,
String? author,
String? annotation,
String? genre,
Book? editBook,
bool? isSaved,
}) {
return AddBookState(
title: title ?? this.title,
author: author ?? this.author,
annotation: annotation ?? this.annotation,
genre: genre ?? this.genre,
editBook: editBook ?? this.editBook,
isSaved: isSaved ?? this.isSaved,
);
}
}