feat(flutter): 增加轮播自动播放与站内通知
This commit is contained in:
1 parent
b7b1c50427
commit
b870956665
24 files changed
+1398
-26
No files matched your search
@@ -0,0 +1,21 @@
|
||||
// Author: fruit.com.cn
|
||||
|
||||
import '../models/notice.dart';
|
||||
import '../remote/notice_api.dart';
|
||||
|
||||
/// Notice data source used by the page and controller.
|
||||
abstract interface class NoticeRepository {
|
||||
/// Loads one notice page.
|
||||
Future<NoticePage> page({required int pageIndex, int pageSize = 20});
|
||||
}
|
||||
|
||||
/// HTTP-backed notice repository.
|
||||
class HttpNoticeRepository implements NoticeRepository {
|
||||
const HttpNoticeRepository(this._api);
|
||||
|
||||
final NoticeApi _api;
|
||||
|
||||
@override
|
||||
Future<NoticePage> page({required int pageIndex, int pageSize = 20}) =>
|
||||
_api.page(pageIndex: pageIndex, pageSize: pageSize);
|
||||
}
|
||||
Reference in new issue
Block a user