mirror of
https://github.com/linagora/tmail-flutter.git
synced 2026-12-05 08:05:07 +00:00
19 lines
550 B
Dart
19 lines
550 B
Dart
import 'package:jmap_dart_client/jmap/core/session/session.dart';
|
|
import 'package:tmail_ui_user/features/session/data/datasource/session_datasource.dart';
|
|
import 'package:tmail_ui_user/features/session/data/network/session_api.dart';
|
|
|
|
class SessionDataSourceImpl extends SessionDataSource {
|
|
|
|
final SessionAPI sessionAPI;
|
|
|
|
SessionDataSourceImpl(this.sessionAPI);
|
|
|
|
@override
|
|
Future<Session> getSession() {
|
|
return Future.sync(() async {
|
|
return await sessionAPI.getSession();
|
|
}).catchError((error) {
|
|
throw error;
|
|
});
|
|
}
|
|
} |