30 lines
No EOL
742 B
Dart
30 lines
No EOL
742 B
Dart
// gmail_wrapper.dart - 非機能のため簡易実装
|
|
import 'dart:convert';
|
|
|
|
class GmailWrapper {
|
|
static const String apiKey = '';
|
|
|
|
factory GmailWrapper.fromMap(Map<String, dynamic> data) {
|
|
return GmailWrapper(apiKey: (data['api_key'] as String?) ?? '');
|
|
}
|
|
|
|
String get apiKey => _apiKey;
|
|
final String _apiKey;
|
|
|
|
void load(String value) => _apiKey = value;
|
|
|
|
static Future<bool> isValid() async => true;
|
|
|
|
static List<String>? parse(List<String>? data) => data;
|
|
|
|
String toMap(Map<String, dynamic> data) => jsonEncode(data);
|
|
|
|
Map<String, dynamic> fromMap({
|
|
required this._apiKey,
|
|
}) {
|
|
_apiKey = _apiKey ?? '';
|
|
return Map.from({'key': _apiKey});
|
|
}
|
|
|
|
GmailWrapper({this.apiKey}) : _apiKey = apiKey ?? '';
|
|
} |