45 lines
No EOL
1.1 KiB
Dart
45 lines
No EOL
1.1 KiB
Dart
// google_sign_in_provider.dart - 非機能のため簡易実装
|
|
import 'package:flutter/material.dart';
|
|
import '../database_helper.dart';
|
|
|
|
class GoogleSignInProvider {
|
|
static final GoogleSignInProvider instance = GoogleSignInProvider._init();
|
|
|
|
factory GoogleSignInProvider() => instance;
|
|
|
|
GoogleSignInProvider._init();
|
|
|
|
void signOut(BuildContext context) {}
|
|
|
|
Stream<GoogleSignInAccount?>? get authStateChanges => null;
|
|
|
|
Future<void> signIn() async {}
|
|
|
|
bool get isSignedIn => false;
|
|
|
|
List<GoogleSignInAccount>? get accounts => null;
|
|
|
|
GoogleSignInAccount? get user => null;
|
|
|
|
Future<String> buildInfo() async {
|
|
try {
|
|
final db = await DatabaseHelper.instance.database;
|
|
final count = await db.rawQuery('SELECT COUNT(*) FROM customers');
|
|
return '顧客数:${count.first[0]}';
|
|
} catch (e) {
|
|
return 'エラー: $e';
|
|
}
|
|
}
|
|
|
|
Future<void> signOutAccount(BuildContext context) async {}
|
|
|
|
void signInAnonymously(BuildContext context) {}
|
|
|
|
bool isValid() => true;
|
|
}
|
|
|
|
class GoogleSignInAuthError {
|
|
const GoogleSignInAuthError({required this.code, required this.message});
|
|
final String code;
|
|
final String message;
|
|
} |