Expand Flutter app scaffold
ci / flutter-check (push) Successful in 4s

This commit is contained in:
2026-06-30 16:21:45 +09:00
parent 684cf87702
commit d2f6af7657
84 changed files with 3342 additions and 28 deletions
@@ -0,0 +1,37 @@
import 'package:baron_safe_app/src/features/push/baron_safe_push_models.dart';
import 'package:baron_safe_app/src/features/push/baron_safe_push_service.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
group('PlaceholderBaronSafePushService', () {
test('registers the current placeholder token', () async {
const service = PlaceholderBaronSafePushService();
final result = await service.registerCurrentToken();
expect(result.registered, isTrue);
expect(result.token?.token, 'placeholder-push-token');
expect(result.token?.platform, BaronSafePushPlatform.unknown);
});
test('reports unavailable token without registration', () async {
const service = PlaceholderBaronSafePushService(
tokenProvider: _EmptyPushTokenProvider(),
);
final result = await service.registerCurrentToken();
expect(result.registered, isFalse);
expect(result.token, isNull);
});
});
}
class _EmptyPushTokenProvider implements BaronSafePushTokenProvider {
const _EmptyPushTokenProvider();
@override
Future<BaronSafePushToken?> readCurrentToken() async {
return null;
}
}