17 lines
426 B
Dart
17 lines
426 B
Dart
|
import 'package:fooder/client.dart';
|
||
|
import 'package:fooder/storage.dart';
|
||
|
|
||
|
class Context {
|
||
|
final Client client;
|
||
|
final Storage storage;
|
||
|
|
||
|
Context({required this.client, required this.storage});
|
||
|
|
||
|
static Future<Context> create({required String baseUrl}) async {
|
||
|
var client = await Client.create(baseUrl: baseUrl);
|
||
|
var storage = await Storage.create();
|
||
|
|
||
|
return Context(client: client, storage: storage);
|
||
|
}
|
||
|
}
|