flutter_smartschool 0.2.6
flutter_smartschool: ^0.2.6 copied to clipboard
An unofficial Dart library for the Smartschool platform.
0.2.6 - 2026-04-18 #
Added #
MessagesService.getSentMessageRecipients(msgId)— resolves the original recipients of a sent-folder message with their numeric user IDs. The reply-all compose page for the outbox (boxType=outbox&composeType=2) pre-populates the To field with both the original recipients and the authenticated user (as sender); this method filters out the authenticated user and returns the remainder as a(List<MessageSearchUser>, List<MessageSearchUser>)record (To, CC).getReplyAllRecipientsdid not work for sent messages because no exclusion of the sender was applied.MessagesService.parseSentMessageRecipients(htmlBody)static method — pure HTML parser counterpart toparseReplyAllRecipientsfor the sent-folder case; combinesparseComposeCurrentUserIdsto identify the sender andparseReplyAllRecipientsto extract all recipient spans, then removes the sender byuserId.- New example
example/get_recipients_from_sent_messages.dart: fetches the 20 most recent sent messages and prints the resolved recipient IDs for each viagetSentMessageRecipients.
0.2.5 - 2026-04-17 #
Added #
MessagesService.getMessagenow accepts anincludeAllRecipientsflag (defaultfalse). When set totruethe request is sent withlimitList: 'false', and the server returns the full list of recipient display names inFullMessage.receivers/ccReceivers/bccReceiversinstead of a truncated list.MessagesService.getReplyAllRecipients(msgId, {boxType})— parses the reply-all compose page and returns every pre-populated recipient as a(List<MessageSearchUser>, List<MessageSearchUser>)record (To, CC). This is the only server-side endpoint that exposes numeric user IDs for all recipients, which are required for a subsequent reply-all send.MessagesService.parseReplyAllRecipients(htmlBody)static method — pure HTML parser for the compose reply-all page, extracted for unit-testing without a live session.FullMessagenow exposestotalNrOtherToReceivers,totalNrOtherCcReceivers, andtotalNrOtherBccReceivers— the count of recipients hidden behind a "show more" link whenlimitLististrue.- New example
example/reply_all_recipients_example.dart: scans the 50 most recent inbox messages, locates the first message with multiple To recipients and the first with multiple CC recipients, and prints the full recipient list with user IDs resolved viagetReplyAllRecipients. - New test fixtures
test/fixtures/smartschool/requests/post/postboxes/show message all recipients.xmlandtest/fixtures/smartschool/requests/get/composemessage/reply-all.html(all personal data replaced with fakes). - Six new tests in
test/message_fixtures_test.dartcovering full-recipient XML parsing, To/CC separation bytypeatt, correct ID extraction, graceful skip of incompletereceiverSpanelements, missingtypeattdefaulting to To, and missinguserltattdefaulting to zero.
0.2.3 - 2026-04-16 #
Added #
MessagesService.markRead(msgId, {boxType})— explicitly marks a message as read using thepostboxes / mark message readXML dispatcher action. This is the call the Smartschool website makes when opening a message (batched alongsideshow messageandattachment list).getMessagecontinues to leave read-state untouched; callmarkReadseparately when you want the server to record the message as opened.- New fixture
test/fixtures/smartschool/requests/post/postboxes/mark message read.xmland two tests covering the response parsing. - New example
example/mark_read_toggle_example.dartthat toggles the read/unread status of the first inbox message and explains manual browser verification.
Fixed #
ShortMessage.unreadandFullMessage.unreadwere inverted. Smartschool's list XML uses<status>0</status>for unread messages and<status>1</status>for read messages — matching the website's own JavaScript (isNew = parseInt(status) <= 0). The<unread>XML field carries the same numeric value as<status>but its name implies the opposite, leading to a silent inversion in the Dart models. Both models now deriveunreadfrom<status>(status == 0 → unread: true) instead of from the misleadingly-named<unread>field. Callers that usedmsg.unreadto display bold/unread indicators, count unread messages, or drive mark-read/unread logic were all affected.- Corrected the
message listandmessage list archivefixtures to reflect the live server's consistent behaviour (both<status>and<unread>fields always carry the same value).
0.2.2 - 2026-04-15 #
- Added notification support for new messages:
MessagesServicenow emits real-time updates viamessageCounterUpdatesand can be bound toSmartschoolClient.notificationCounterUpdatesfor push-style notification flows. - Increased test coverage for
SmartschoolClientand core session logic. - Added
test/session_additional_test.dartwith more unit and error-path tests. - Improved analyzer and linter compliance in test files.
- Maintenance: removed unused imports, unnecessary type checks, and null comparisons in tests.
- No breaking changes; all public APIs remain stable.
0.2.1 - 2026-04-11 #
- Added message thread-subject helpers on
MessagesService:threadSubjectKey(subject)for stable thread grouping.ensureReplySubject(subject, {replyPrefix})for consistent reply headers.
- Clarified message attachment docs and examples:
- Corrected
MessageAttachmentfield names (fileId,name,mime,size, ...). - Added explicit
attachment.download(client)usage for byte downloads.
- Corrected
- Documented explicit logout/session reset path via
SmartschoolClient.clearCookies().
0.2.0 - 2026-04-11 #
- Added
IntradeskServicewith root/folder listing and file download support. - Added Intradesk data models (
IntradeskListing,IntradeskFolder,IntradeskFile, revisions, capabilities, platform/owner). - Added interactive Intradesk browser example (
example/intradesk_browser.dart) for terminal-based navigation and downloads. - Added fixture-driven and model-flow test coverage for Intradesk parsing/mapping.
- Updated README with Intradesk usage, scope notes, and example controls.
0.1.0 - 2026-04-11 #
- First public release of
flutter_smartschool. - Added authenticated Smartschool session client with cookie persistence and MFA/account-verification support.
- Added
MessagesServicewith inbox/archive listing, message retrieval, attachment listing, recipient search, and compose/send flow. - Added archive-box ID discovery and compose current-user ID parsing helpers.
- Added examples and test coverage for message workflows and parser behavior.