Browse Source

neon_notes: Fix casting error when loading notes

pull/368/head
jld3103 2 years ago
parent
commit
8c5b32a35f
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 4
      packages/neon/neon_notes/lib/blocs/notes.dart
  2. 1
      packages/neon/neon_notes/lib/neon_notes.dart
  3. 1
      packages/neon/neon_notes/pubspec.yaml

4
packages/neon/neon_notes/lib/blocs/notes.dart

@ -46,12 +46,12 @@ class NotesBloc extends InteractiveBloc implements NotesBlocEvents, NotesBlocSta
@override
Future refresh() async {
await requestManager.wrapNextcloud<List<NextcloudNotesNote>, Iterable<NextcloudNotesNote>>(
await requestManager.wrapNextcloud<List<NextcloudNotesNote>, BuiltList>(
client.id,
'notes-notes',
notes,
() async => client.notes.getNotes(),
(final response) => response.toList(),
List<NextcloudNotesNote>.from,
);
}

1
packages/neon/neon_notes/lib/neon_notes.dart

@ -3,6 +3,7 @@ library notes;
import 'dart:async';
import 'dart:convert';
import 'package:built_collection/built_collection.dart';
import 'package:crypto/crypto.dart';
import 'package:flutter/material.dart';
import 'package:flutter_markdown/flutter_markdown.dart';

1
packages/neon/neon_notes/pubspec.yaml

@ -7,6 +7,7 @@ environment:
flutter: '>=3.10.0'
dependencies:
built_collection: ^5.1.1
crypto: ^3.0.3
flutter:
sdk: flutter

Loading…
Cancel
Save