4da36aa31d
Flutter Android client for FabledAssistant with: - Session-cookie auth via persistent cookie jar (Dio + cookie_jar) - OAuth/SSO login via in-app WebView (flutter_inappwebview) - Notes: list, detail (markdown render), create/edit - Tasks: list with status tabs, create/edit with priority - Chat: SSE streaming bubbles, conversation management - Quick Capture FAB for rapid note/task creation - Settings screen (change server URL, logout) - Android home screen widget → opens chat - Riverpod state management, go_router navigation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
16 lines
477 B
Dart
16 lines
477 B
Dart
import '../api/notes_api.dart';
|
|
import '../models/note.dart';
|
|
|
|
class NotesRepository {
|
|
final NotesApi _api;
|
|
const NotesRepository(this._api);
|
|
|
|
Future<List<Note>> getAll() => _api.getAll();
|
|
Future<Note> getOne(int id) => _api.getOne(id);
|
|
Future<Note> create(String title, String body) =>
|
|
_api.create(title, body);
|
|
Future<Note> update(int id, String title, String body) =>
|
|
_api.update(id, title, body);
|
|
Future<void> delete(int id) => _api.delete(id);
|
|
}
|