将小蜜蜂改为小蜜蜂智慧生活;新增进入App弹出通知栏消息

pull/1/head
戴余标 3 years ago
parent bdbd857d38
commit e1884967b6

@ -4,7 +4,7 @@
In most cases you can leave this as-is, but you if you want to provide In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. --> FlutterApplication and put your custom class here. -->
<application android:label="小蜜蜂" android:icon="@mipmap/ic_launcher" android:networkSecurityConfig="@xml/network_security_config"> <application android:label="小蜜蜂智慧生活" android:icon="@mipmap/ic_launcher" android:networkSecurityConfig="@xml/network_security_config">
<service android:name="com.amap.api.location.APSService"></service> <service android:name="com.amap.api.location.APSService"></service>
<meta-data android:name="com.amap.api.v2.apikey" <meta-data android:name="com.amap.api.v2.apikey"
android:value="f6361c0537bf2d6ddb898b10618d3726"/> android:value="f6361c0537bf2d6ddb898b10618d3726"/>

@ -4,4 +4,6 @@
to allow setting breakpoints, to provide hot reload, etc. to allow setting breakpoints, to provide hot reload, etc.
--> -->
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
</manifest> </manifest>

@ -17,6 +17,8 @@ PODS:
- device_info_plus (0.0.1): - device_info_plus (0.0.1):
- Flutter - Flutter
- Flutter (1.0.0) - Flutter (1.0.0)
- flutter_local_notifications (0.0.1):
- Flutter
- flutter_sound (9.2.2): - flutter_sound (9.2.2):
- Flutter - Flutter
- flutter_sound_core (= 9.2.2) - flutter_sound_core (= 9.2.2)
@ -54,6 +56,8 @@ PODS:
- MTBBarcodeScanner - MTBBarcodeScanner
- share (0.0.1): - share (0.0.1):
- Flutter - Flutter
- shared_preferences_ios (0.0.1):
- Flutter
- sms_autofill (0.0.1): - sms_autofill (0.0.1):
- Flutter - Flutter
- sqflite (0.0.2): - sqflite (0.0.2):
@ -72,6 +76,7 @@ DEPENDENCIES:
- audio_session (from `.symlinks/plugins/audio_session/ios`) - audio_session (from `.symlinks/plugins/audio_session/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- Flutter (from `Flutter`) - Flutter (from `Flutter`)
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
- flutter_sound (from `.symlinks/plugins/flutter_sound/ios`) - flutter_sound (from `.symlinks/plugins/flutter_sound/ios`)
- fluwx (from `.symlinks/plugins/fluwx/ios`) - fluwx (from `.symlinks/plugins/fluwx/ios`)
- image_picker (from `.symlinks/plugins/image_picker/ios`) - image_picker (from `.symlinks/plugins/image_picker/ios`)
@ -84,6 +89,7 @@ DEPENDENCIES:
- permission_handler (from `.symlinks/plugins/permission_handler/ios`) - permission_handler (from `.symlinks/plugins/permission_handler/ios`)
- qr_code_scanner (from `.symlinks/plugins/qr_code_scanner/ios`) - qr_code_scanner (from `.symlinks/plugins/qr_code_scanner/ios`)
- share (from `.symlinks/plugins/share/ios`) - share (from `.symlinks/plugins/share/ios`)
- shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`)
- sms_autofill (from `.symlinks/plugins/sms_autofill/ios`) - sms_autofill (from `.symlinks/plugins/sms_autofill/ios`)
- sqflite (from `.symlinks/plugins/sqflite/ios`) - sqflite (from `.symlinks/plugins/sqflite/ios`)
- tobias (from `.symlinks/plugins/tobias/ios`) - tobias (from `.symlinks/plugins/tobias/ios`)
@ -114,6 +120,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/device_info_plus/ios" :path: ".symlinks/plugins/device_info_plus/ios"
Flutter: Flutter:
:path: Flutter :path: Flutter
flutter_local_notifications:
:path: ".symlinks/plugins/flutter_local_notifications/ios"
flutter_sound: flutter_sound:
:path: ".symlinks/plugins/flutter_sound/ios" :path: ".symlinks/plugins/flutter_sound/ios"
fluwx: fluwx:
@ -138,6 +146,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/qr_code_scanner/ios" :path: ".symlinks/plugins/qr_code_scanner/ios"
share: share:
:path: ".symlinks/plugins/share/ios" :path: ".symlinks/plugins/share/ios"
shared_preferences_ios:
:path: ".symlinks/plugins/shared_preferences_ios/ios"
sms_autofill: sms_autofill:
:path: ".symlinks/plugins/sms_autofill/ios" :path: ".symlinks/plugins/sms_autofill/ios"
sqflite: sqflite:
@ -157,6 +167,7 @@ SPEC CHECKSUMS:
audio_session: 4f3e461722055d21515cf3261b64c973c062f345 audio_session: 4f3e461722055d21515cf3261b64c973c062f345
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743
flutter_sound: b4eccdf53c922ad12146ac94fb2a18ceb5855c12 flutter_sound: b4eccdf53c922ad12146ac94fb2a18ceb5855c12
flutter_sound_core: 0e902ec587e9854b4f852f4bad2d625057d9958b flutter_sound_core: 0e902ec587e9854b4f852f4bad2d625057d9958b
fluwx: 02670633ce7509206f62b366e9734e7dda81e100 fluwx: 02670633ce7509206f62b366e9734e7dda81e100
@ -174,6 +185,7 @@ SPEC CHECKSUMS:
permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0 permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0
qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e
share: 0b2c3e82132f5888bccca3351c504d0003b3b410 share: 0b2c3e82132f5888bccca3351c504d0003b3b410
shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad
sms_autofill: c461043483362c3f1709ee76eaae6eb570b31686 sms_autofill: c461043483362c3f1709ee76eaae6eb570b31686
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
tobias: 2aded9b83e3663b907360a800d8e3c13284f25c5 tobias: 2aded9b83e3663b907360a800d8e3c13284f25c5

@ -28,7 +28,7 @@ class AboutPage extends StatelessWidget {
), ),
SizedBox(height: 100.w), SizedBox(height: 100.w),
Text( Text(
'“小蜜蜂智慧小区”APP——幸福生活简单到达', '“小蜜蜂智慧生活”APP——幸福生活简单到达',
style: _style, style: _style,
), ),
], ],

@ -17,14 +17,14 @@ class _AgreementPageState extends State<AgreementPage> {
padding: EdgeInsets.all(16.w), padding: EdgeInsets.all(16.w),
child: Text( child: Text(
''' '''
使APP 使APP使 使使 //() 使APP 使APP使 使使 //()
1.1 1.1
使使 使使
2.1 2.1
APP线 APP线
2.2 2.2
2.2.1 使 2.2.1 使
2.2.2 iOSandroid 2.2.2 iOSandroid

@ -19,7 +19,7 @@ class _PrivacyPageState extends State<PrivacyPage> {
padding: EdgeInsets.all(16.sp), padding: EdgeInsets.all(16.sp),
child: Text( child: Text(
''' '''
使App40-11使使使使访便 使App40-11使使使使访便
   

@ -147,11 +147,11 @@ class _SettingsPageState extends State<SettingsPage> {
// onTap: () => Get.to(() => AccountManagerPage()), // onTap: () => Get.to(() => AccountManagerPage()),
// ), // ),
_buildTile( _buildTile(
title: '小蜜蜂用户协议', title: '小蜜蜂智慧生活用户协议',
onTap: () => Get.to(() => AgreementPage()), onTap: () => Get.to(() => AgreementPage()),
), ),
_buildTile( _buildTile(
title: '小蜜蜂隐私政策', title: '小蜜蜂智慧生活隐私政策',
onTap: () => Get.to(() => PrivacyPage()), onTap: () => Get.to(() => PrivacyPage()),
), ),
].sepWidget( ].sepWidget(

@ -46,7 +46,7 @@ class AppVerifyDialog extends StatelessWidget {
children: [ children: [
52.hb, 52.hb,
Text( Text(
'欢迎使用小蜜蜂', '欢迎使用小蜜蜂智慧生活',
style: TextStyle( style: TextStyle(
color: Colors.black.withOpacity(0.85), color: Colors.black.withOpacity(0.85),
fontSize: 28.sp, fontSize: 28.sp,
@ -55,7 +55,7 @@ class AppVerifyDialog extends StatelessWidget {
45.hb, 45.hb,
Text( Text(
''' '''
使使 使使
访访 访访
使 使
@ -88,7 +88,7 @@ class AppVerifyDialog extends StatelessWidget {
fontSize: 24.sp), fontSize: 24.sp),
), ),
TextSpan( TextSpan(
text: '《小蜜蜂隐私保护政策》', text: '《小蜜蜂智慧生活隐私保护政策》',
style: TextStyle( style: TextStyle(
color: kPrimaryColor, fontSize: 24.sp), color: kPrimaryColor, fontSize: 24.sp),
recognizer: TapGestureRecognizer() recognizer: TapGestureRecognizer()

@ -250,7 +250,7 @@ class _SplashPageState extends State<SplashPage> {
fit: BoxFit.fill, fit: BoxFit.fill,
), ),
Text( Text(
'小蜜蜂', '小蜜蜂智慧生活',
style: TextStyle( style: TextStyle(
color: Color(0xD9000000), color: Color(0xD9000000),
fontSize: 32.sp, fontSize: 32.sp,

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart'; import 'package:bot_toast/bot_toast.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -41,10 +42,18 @@ class _TabNavigatorState extends State<TabNavigator>
List<Widget> _pages = <Widget>[]; List<Widget> _pages = <Widget>[];
EasyRefreshController _refreshController = EasyRefreshController(); EasyRefreshController _refreshController = EasyRefreshController();
late FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
flutterLocalNotificationsPlugin = new FlutterLocalNotificationsPlugin();
var android = new AndroidInitializationSettings('@mipmap/ic_launcher');
var iOS = new IOSInitializationSettings();
var initSettings = new InitializationSettings(android: android,iOS: iOS);
flutterLocalNotificationsPlugin.initialize(initSettings);
//showNotification();
final appProvider = Provider.of<AppProvider>(Get.context!); final appProvider = Provider.of<AppProvider>(Get.context!);
Future.delayed(Duration(milliseconds: 0), () async { Future.delayed(Duration(milliseconds: 0), () async {
await appProvider.getMyAddress(); // await appProvider.getMyAddress(); //
@ -219,8 +228,32 @@ class _TabNavigatorState extends State<TabNavigator>
), ),
), ),
) )
) );
}
Future onSelectNotification(String payload) async {
if (payload != null) {
debugPrint('notification payload: ' + payload);
}
//payload
debugPrint('payload:$payload');
if(payload == "complete") {
await showDialog(context: context, builder: (_) => AlertDialog(
title: Text('Notification'),
content: Text('$payload'),
),);
}
}
; showNotification() async {
var android = new AndroidNotificationDetails(
'channel id', 'channel NAME',
priority: Priority.high,
importance: Importance.max,);
var iOS = new IOSNotificationDetails();
var platform = new NotificationDetails(android: android, iOS: iOS);
await flutterLocalNotificationsPlugin.show(
0, 'New Video is out', 'Flutter Local Notification', platform,
payload: 'Nitish Kumar Singh is part time Youtuber');
} }
} }

@ -7,6 +7,7 @@ import Foundation
import audio_session import audio_session
import device_info_plus_macos import device_info_plus_macos
import flutter_local_notifications
import just_audio import just_audio
import package_info import package_info
import package_info_plus_macos import package_info_plus_macos
@ -18,6 +19,7 @@ import url_launcher_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin")) AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin"))
JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin")) JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin"))
FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin")) FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin"))
FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin")) FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))

@ -304,6 +304,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.1.0"
dbus:
dependency: transitive
description:
name: dbus
url: "https://pub.dartlang.org"
source: hosted
version: "0.7.3"
decimal: decimal:
dependency: transitive dependency: transitive
description: description:
@ -493,6 +500,27 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.1" version: "2.0.1"
flutter_local_notifications:
dependency: "direct main"
description:
name: flutter_local_notifications
url: "https://pub.dartlang.org"
source: hosted
version: "9.5.3+1"
flutter_local_notifications_linux:
dependency: transitive
description:
name: flutter_local_notifications_linux
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.2"
flutter_local_notifications_platform_interface:
dependency: transitive
description:
name: flutter_local_notifications_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "5.0.0"
flutter_localizations: flutter_localizations:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
@ -1322,6 +1350,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.0" version: "2.1.0"
timezone:
dependency: transitive
description:
name: timezone
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.0"
timing: timing:
dependency: transitive dependency: transitive
description: description:

@ -127,7 +127,10 @@ dependencies:
like_button: ^2.0.4 like_button: ^2.0.4
#图片扩展 #图片扩展
extended_image: ^6.1.0 extended_image: ^6.1.0
#本地缓存
sp_util: ^2.0.0 sp_util: ^2.0.0
#系统通知栏消息
flutter_local_notifications: ^9.5.3+1
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:

Loading…
Cancel
Save