feat: 实现日历提醒 in-app fallback 机制及通知服务重构
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
test('AndroidManifest declares ActionBroadcastReceiver', () {
|
||||
final manifestFile = File('android/app/src/main/AndroidManifest.xml');
|
||||
|
||||
expect(manifestFile.existsSync(), isTrue);
|
||||
|
||||
final manifestContent = manifestFile.readAsStringSync();
|
||||
|
||||
expect(
|
||||
manifestContent,
|
||||
contains(
|
||||
'com.dexterous.flutterlocalnotifications.ActionBroadcastReceiver',
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
test('AppDelegate registers flutter local notifications callback', () {
|
||||
final appDelegateFile = File('ios/Runner/AppDelegate.swift');
|
||||
|
||||
expect(appDelegateFile.existsSync(), isTrue);
|
||||
|
||||
final appDelegateContent = appDelegateFile.readAsStringSync();
|
||||
|
||||
expect(
|
||||
appDelegateContent,
|
||||
contains('FlutterLocalNotificationsPlugin.setPluginRegistrantCallback'),
|
||||
);
|
||||
expect(
|
||||
appDelegateContent,
|
||||
contains('GeneratedPluginRegistrant.register(with: registry)'),
|
||||
);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user