feat(app): 完成 P0 钱包解锁、下载落盘与手机号登录
This commit is contained in:
1 parent
de941c841c
commit
136ee74618
47 files changed
+3264
-70
No files matched your search
@@ -0,0 +1,23 @@
|
||||
// Author: fruit.com.cn
|
||||
|
||||
import '../models/wallet.dart';
|
||||
import '../remote/commerce_api.dart';
|
||||
|
||||
/// 钱包与金币解锁的数据来源。
|
||||
abstract interface class CommerceRepository {
|
||||
Future<WalletSnapshot> fetchWallet();
|
||||
|
||||
Future<UnlockResult> unlock(String episodeId);
|
||||
}
|
||||
|
||||
class HttpCommerceRepository implements CommerceRepository {
|
||||
const HttpCommerceRepository(this._api);
|
||||
|
||||
final CommerceApi _api;
|
||||
|
||||
@override
|
||||
Future<WalletSnapshot> fetchWallet() => _api.wallet();
|
||||
|
||||
@override
|
||||
Future<UnlockResult> unlock(String episodeId) => _api.unlock(episodeId);
|
||||
}
|
||||
Reference in new issue
Block a user