diff --git a/src/demo/viewapp_master/lib/main.dart b/src/demo/viewapp_master/lib/main.dart index 82cb4d0..bc0d87e 100644 --- a/src/demo/viewapp_master/lib/main.dart +++ b/src/demo/viewapp_master/lib/main.dart @@ -1,29 +1,38 @@ // ignore_for_file: avoid_web_libraries_in_flutter, use_key_in_widget_constructors, camel_case_types, depend_on_referenced_packages +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:pwa_install/pwa_install.dart'; -import 'package:local_notifier/local_notifier.dart'; import 'package:viewapp_master/pages/out/about.dart'; import 'package:viewapp_master/pages/user/forget.dart'; import 'package:viewapp_master/pages/user/login.dart'; import 'package:viewapp_master/pages/user/register.dart'; import 'package:viewapp_master/pages/user/updateUser.dart'; + var focusedcolor = Colors.yellow; var backcolor = Colors.black26; void main() async { - PWAInstall().setup(installCallback: () { - debugPrint('APP INSTALLED!'); - }); + WidgetsFlutterBinding.ensureInitialized(); + + // Check for PWA install prompt support (if necessary) + if (defaultTargetPlatform == TargetPlatform.android) { + PWAInstall().setup(installCallback: () { + debugPrint('APP INSTALLED!'); + }); + PWAInstall().promptInstall_(); + }else if(defaultTargetPlatform == TargetPlatform.iOS){ + PWAInstall().setup(installCallback: () { + debugPrint('APP INSTALLED!'); + }); + PWAInstall().promptInstall_(); + } + runApp(viewAppMain()); await Future.delayed(const Duration(seconds: 1)); - /* localNotifier: Only Windows,Linux.macOS */ - await localNotifier.setup( - appName: 'View App master v3', - shortcutPolicy: - ShortcutPolicy.requireCreate, // shortcutPolicy: 仅适用于 Windows - ); + } class viewAppMain extends StatelessWidget { diff --git a/src/demo/viewapp_master/lib/pages/btn/view/Cfoot_api.dart b/src/demo/viewapp_master/lib/pages/btn/view/Cfoot_api.dart index 2505e85..e265c95 100644 --- a/src/demo/viewapp_master/lib/pages/btn/view/Cfoot_api.dart +++ b/src/demo/viewapp_master/lib/pages/btn/view/Cfoot_api.dart @@ -100,7 +100,8 @@ class btn1 extends StatelessWidget { Navigator.push( context, MaterialPageRoute(builder: (context) => CfootTraffic_DB())); }, - child: Text('交通', textAlign: TextAlign.center)); + //交通 + child: Text('產品流通', textAlign: TextAlign.center)); } } @@ -115,7 +116,7 @@ class btn2 extends StatelessWidget { Navigator.push( context, MaterialPageRoute(builder: (context) => CfootOther_DB())); }, - child: Text('其它', textAlign: TextAlign.center)); + child: Text('其它計算', textAlign: TextAlign.center)); } } diff --git a/src/demo/viewapp_master/lib/pages/home.dart b/src/demo/viewapp_master/lib/pages/home.dart index fdcbca3..a2c4425 100644 --- a/src/demo/viewapp_master/lib/pages/home.dart +++ b/src/demo/viewapp_master/lib/pages/home.dart @@ -2,7 +2,6 @@ // ignore_for_file: must_be_immutable, duplicate_ignore, non_constant_identifier_names, prefer_const_constructors, prefer_const_literals_to_create_immutables import 'package:flutter/material.dart'; -import 'package:local_notifier/local_notifier.dart'; import 'package:viewapp_master/class/user.dart'; import 'package:viewapp_master/modules/PreferencesUtil.dart'; import 'package:viewapp_master/pages/out/control.dart'; @@ -98,10 +97,6 @@ class DrawerMenu extends StatelessWidget { class BtnLogOut extends StatelessWidget { BtnLogOut({super.key}); - LocalNotification notification = LocalNotification( - title: "提示", - body: "現在使用者己登出", - ); @override Widget build(BuildContext context) { @@ -109,7 +104,6 @@ class BtnLogOut extends StatelessWidget { leading: const CircleAvatar(child: Icon(Icons.arrow_back)), title: const Text('登出'), onTap: () { - notification.show(); //for Windows,Linux.macOS toLoginPage(context); }, ); diff --git a/src/demo/viewapp_master/lib/pages/user/login.dart b/src/demo/viewapp_master/lib/pages/user/login.dart index e89f6ad..7043adc 100644 --- a/src/demo/viewapp_master/lib/pages/user/login.dart +++ b/src/demo/viewapp_master/lib/pages/user/login.dart @@ -4,7 +4,6 @@ import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; -import 'package:local_notifier/local_notifier.dart'; import 'package:viewapp_master/class/user.dart'; import 'package:viewapp_master/modules/PreferencesUtil.dart'; import 'package:viewapp_master/pages/home.dart'; @@ -23,7 +22,7 @@ class LoginPage extends StatelessWidget { @override Widget build(BuildContext context) { - return Scaffold( + return const Scaffold( backgroundColor: Colors.white, body: InputGet(), ); @@ -39,11 +38,11 @@ class InputGet extends StatelessWidget { child: Column( children: [ wallpaperLogin(), - SizedBox(height: 20.0), - LoginStr(), - SizedBox(height: 20.0), - btnView(), - SizedBox(height: 20.0), + const SizedBox(height: 20.0), + const LoginStr(), + const SizedBox(height: 20.0), + const btnView(), + const SizedBox(height: 20.0), ], ), ); @@ -54,10 +53,10 @@ class LoginStr extends StatelessWidget { const LoginStr({Key? key}); @override Widget build(BuildContext context) { - return Column( + return const Column( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: const [ + children: [ tbServerSource(), SizedBox(height: 10), tbUsername(), @@ -77,8 +76,8 @@ class tbServerSource extends StatelessWidget { padding: const EdgeInsets.symmetric(horizontal: 24.0, vertical: 5.0), child: TextFormField( controller: serverSourceStr, - decoration: InputDecoration( - prefixIcon: const Icon(Icons.info), + decoration: const InputDecoration( + prefixIcon: Icon(Icons.info), labelText: "Server", hintText: "Your Server Address", enabledBorder: @@ -99,8 +98,8 @@ class tbUsername extends StatelessWidget { padding: const EdgeInsets.symmetric(horizontal: 24.0, vertical: 5.0), child: TextFormField( controller: usernameStr, - decoration: InputDecoration( - prefixIcon: const Icon(Icons.person), + decoration: const InputDecoration( + prefixIcon: Icon(Icons.person), labelText: "Username", hintText: "Your account username", enabledBorder: @@ -122,8 +121,8 @@ class tbPassword extends StatelessWidget { child: TextFormField( controller: passwordStr, obscureText: true, - decoration: InputDecoration( - prefixIcon: const Icon(Icons.lock), + decoration: const InputDecoration( + prefixIcon: Icon(Icons.lock), labelText: "Password", hintText: "Your account password", enabledBorder: @@ -222,10 +221,6 @@ class btnLoginSend extends StatelessWidget { serverSource: serverSourceStr.text, LoginName: data["LoginName"], username: data["username"]); - LocalNotification notification = LocalNotification( - title: "Tip", - body: "Now Login User: ${data["LoginName"]} ", - ); /*主迴圈*/ if (code == "1") { @@ -233,7 +228,6 @@ class btnLoginSend extends StatelessWidget { PreferencesUtil.saveString('serverSource', serverSourceStr.text); PreferencesUtil.saveString('username', data["username"]); PreferencesUtil.saveString('LoginName', data["LoginName"]); - notification.show(); //for Windows,Linux.macOS //Go To HomePage Navigator.push( context, diff --git a/src/demo/viewapp_master/linux/flutter/generated_plugin_registrant.cc b/src/demo/viewapp_master/linux/flutter/generated_plugin_registrant.cc index 8c36fda..2dccc22 100644 --- a/src/demo/viewapp_master/linux/flutter/generated_plugin_registrant.cc +++ b/src/demo/viewapp_master/linux/flutter/generated_plugin_registrant.cc @@ -6,14 +6,10 @@ #include "generated_plugin_registrant.h" -#include #include #include void fl_register_plugins(FlPluginRegistry* registry) { - g_autoptr(FlPluginRegistrar) local_notifier_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "LocalNotifierPlugin"); - local_notifier_plugin_register_with_registrar(local_notifier_registrar); g_autoptr(FlPluginRegistrar) printing_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "PrintingPlugin"); printing_plugin_register_with_registrar(printing_registrar); diff --git a/src/demo/viewapp_master/linux/flutter/generated_plugins.cmake b/src/demo/viewapp_master/linux/flutter/generated_plugins.cmake index d4e6c04..45f2369 100644 --- a/src/demo/viewapp_master/linux/flutter/generated_plugins.cmake +++ b/src/demo/viewapp_master/linux/flutter/generated_plugins.cmake @@ -3,7 +3,6 @@ # list(APPEND FLUTTER_PLUGIN_LIST - local_notifier printing url_launcher_linux ) diff --git a/src/demo/viewapp_master/macos/Flutter/GeneratedPluginRegistrant.swift b/src/demo/viewapp_master/macos/Flutter/GeneratedPluginRegistrant.swift index 639b0fb..9b4fab6 100644 --- a/src/demo/viewapp_master/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/src/demo/viewapp_master/macos/Flutter/GeneratedPluginRegistrant.swift @@ -6,7 +6,6 @@ import FlutterMacOS import Foundation import device_info_plus -import local_notifier import path_provider_foundation import printing import share_plus @@ -16,7 +15,6 @@ import url_launcher_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) - LocalNotifierPlugin.register(with: registry.registrar(forPlugin: "LocalNotifierPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PrintingPlugin.register(with: registry.registrar(forPlugin: "PrintingPlugin")) SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) diff --git a/src/demo/viewapp_master/pubspec.lock b/src/demo/viewapp_master/pubspec.lock index a773a91..ca814e3 100644 --- a/src/demo/viewapp_master/pubspec.lock +++ b/src/demo/viewapp_master/pubspec.lock @@ -1,6 +1,22 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" + url: "https://pub.dev" + source: hosted + version: "67.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" + url: "https://pub.dev" + source: hosted + version: "6.4.1" archive: dependency: transitive description: @@ -33,6 +49,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.6" + bazel_worker: + dependency: transitive + description: + name: bazel_worker + sha256: "4eef19cc486c289e4b06c69d0f6f3192e85cc93c25d4d15d02afb205e388d2f0" + url: "https://pub.dev" + source: hosted + version: "1.1.1" bidi: dependency: transitive description: @@ -49,6 +73,86 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + url: "https://pub.dev" + source: hosted + version: "4.0.1" + build_modules: + dependency: transitive + description: + name: build_modules + sha256: "9987d67a29081872e730468295fc565e9a2b377ca3673337c1d4e41d57c6cd7c" + url: "https://pub.dev" + source: hosted + version: "5.0.8" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: "581bacf68f89ec8792f5e5a0b2c4decd1c948e97ce659dc783688c8a88fbec21" + url: "https://pub.dev" + source: hosted + version: "2.4.8" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + url: "https://pub.dev" + source: hosted + version: "7.3.0" + build_web_compilers: + dependency: "direct dev" + description: + name: build_web_compilers + sha256: "9071a94aa67787cebdd9e76837c9d2af61fb5242db541244f6a0b6249afafb46" + url: "https://pub.dev" + source: hosted + version: "4.0.10" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: fedde275e0a6b798c3296963c5cd224e3e1b55d0e478d5b7e65e6b540f363a0e + url: "https://pub.dev" + source: hosted + version: "8.9.1" characters: dependency: transitive description: @@ -81,6 +185,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + url: "https://pub.dev" + source: hosted + version: "4.10.0" collection: dependency: transitive description: @@ -121,6 +233,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.6" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" + url: "https://pub.dev" + source: hosted + version: "2.3.6" device_info_plus: dependency: transitive description: @@ -169,6 +289,14 @@ packages: url: "https://pub.dev" source: hosted version: "7.0.0" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" fl_chart: dependency: "direct overridden" description: @@ -194,10 +322,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7 + sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" flutter_test: dependency: "direct dev" description: flutter @@ -208,6 +336,30 @@ packages: description: flutter source: sdk version: "0.0.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + url: "https://pub.dev" + source: hosted + version: "3.2.0" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + graphs: + dependency: transitive + description: + name: graphs + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" + source: hosted + version: "2.3.1" http: dependency: "direct overridden" description: @@ -216,6 +368,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.1" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" http_parser: dependency: transitive description: @@ -236,10 +396,18 @@ packages: dependency: transitive description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf + url: "https://pub.dev" + source: hosted + version: "0.19.0" + io: + dependency: transitive + description: + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "1.0.4" js: dependency: transitive description: @@ -288,14 +456,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.0" - local_notifier: - dependency: "direct overridden" + logging: + dependency: transitive description: - name: local_notifier - sha256: cc855aa6362c8840e3d3b35b1c3b058a3a8becdb2b03d5a9aa3f3a1e861f0a03 + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "1.2.0" matcher: dependency: transitive description: @@ -328,6 +496,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.5" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" path: dependency: transitive description: @@ -440,6 +616,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.7.4" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" printing: dependency: "direct overridden" description: @@ -448,6 +632,30 @@ packages: url: "https://pub.dev" source: hosted version: "5.12.0" + protobuf: + dependency: transitive + description: + name: protobuf + sha256: "68645b24e0716782e58948f8467fd42a880f255096a821f9e7d0ec625b00c84d" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + url: "https://pub.dev" + source: hosted + version: "1.2.3" pwa_install: dependency: "direct overridden" description: @@ -464,6 +672,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.1" + scratch_space: + dependency: transitive + description: + name: scratch_space + sha256: "8510fbff458d733a58fc427057d1ac86303b376d609d6e1bc43f240aad9aa445" + url: "https://pub.dev" + source: hosted + version: "1.0.2" share_plus: dependency: "direct overridden" description: @@ -536,11 +752,35 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.2" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" + source: hosted + version: "1.0.4" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" + source_maps: + dependency: transitive + description: + name: source_maps + sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" + url: "https://pub.dev" + source: hosted + version: "0.10.12" source_span: dependency: transitive description: @@ -549,6 +789,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" stack_trace: dependency: transitive description: @@ -565,6 +813,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.2" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" string_scanner: dependency: transitive description: @@ -577,66 +833,66 @@ packages: dependency: transitive description: name: syncfusion_flutter_core - sha256: a2427697bfad5b611db78ea4c4daef82d3350b83c729a8dc37959662a31547f9 + sha256: "7666506885ebc8f62bb928ad4588a73e20caaff2b2cf2b2b56f67d98f4113525" url: "https://pub.dev" source: hosted - version: "23.2.7" + version: "24.2.9" syncfusion_flutter_pdf: dependency: transitive description: name: syncfusion_flutter_pdf - sha256: "1fdb4da03d2a3bcd9006b7bc39e668ef8a6b45b4604dde1e95a216007125e50a" + sha256: a9e85bbfd574bb262733b33494240fda38bfeb58553537560ba4b3f54a31418b url: "https://pub.dev" source: hosted - version: "23.2.7" + version: "24.2.9" syncfusion_flutter_pdfviewer: dependency: "direct overridden" description: name: syncfusion_flutter_pdfviewer - sha256: "202a8f39dc80b5e9f24dd59cb3979aae73fa5cd2533597d07baaf4638084eadc" + sha256: "90bb093838a4a2b3f59f5aa1167325185ee83aa7bc8c5857e73b9a978c1fe299" url: "https://pub.dev" source: hosted - version: "23.1.39" + version: "24.2.8" syncfusion_flutter_signaturepad: dependency: transitive description: name: syncfusion_flutter_signaturepad - sha256: "7950bf086484ed7ada07fea2378be619ec4a0498ddabe42f4c0953fbdb25a16c" + sha256: "2ab2c81176ed6779a0e5f7724645c9af2a1656eec3f53ef6b10d67d9d65f0b4a" url: "https://pub.dev" source: hosted - version: "23.2.7" + version: "24.2.9" syncfusion_pdfviewer_macos: dependency: transitive description: name: syncfusion_pdfviewer_macos - sha256: d9dda5bde1ec873d9559ff04be79d0cb12ab3a541124792cf754af81e034f192 + sha256: "6dad65d36d32e679e7666be438a5a75d870e0b1b9cd010ddcfc7475b9063a89d" url: "https://pub.dev" source: hosted - version: "23.2.7" + version: "24.2.9" syncfusion_pdfviewer_platform_interface: dependency: transitive description: name: syncfusion_pdfviewer_platform_interface - sha256: c8eaf2b30c509126628f9456d303ca2ea5600db180e5485c940f4846966902fe + sha256: "6a1bf9fe0648daa77e3c76052f7d02b50f1208ae1d751f648100e46100bf8711" url: "https://pub.dev" source: hosted - version: "23.2.7" + version: "24.2.9" syncfusion_pdfviewer_web: dependency: transitive description: name: syncfusion_pdfviewer_web - sha256: "90ee0961a654bca25a2446828f296568b4098c461c36dff8d2d7624149b4cd26" + sha256: c69720a884b0faa2c42bc2c98596db18dd2747123fdd6f7f398da1120a7d21b3 url: "https://pub.dev" source: hosted - version: "23.2.7" + version: "24.2.8" syncfusion_pdfviewer_windows: dependency: transitive description: name: syncfusion_pdfviewer_windows - sha256: ac645b6f2d14ae8e0a6906359913b2f59eb5495b2a373b60fd55c1aff7b5b769 + sha256: "6e33562967828feeebc1b5cb0e5f1ec23abb86007dce37773501f9f18bfe3a36" url: "https://pub.dev" source: hosted - version: "23.2.7" + version: "24.2.9" term_glyph: dependency: transitive description: @@ -653,6 +909,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.6.1" + timing: + dependency: transitive + description: + name: timing + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" + source: hosted + version: "1.0.1" typed_data: dependency: transitive description: @@ -729,10 +993,10 @@ packages: dependency: transitive description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8 url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.3.3" vector_math: dependency: transitive description: @@ -749,6 +1013,14 @@ packages: url: "https://pub.dev" source: hosted version: "13.0.0" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" web: dependency: "direct overridden" description: @@ -757,6 +1029,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.5.1" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: "1d8e795e2a8b3730c41b8a98a2dff2e0fb57ae6f0764a1c46ec5915387d257b2" + url: "https://pub.dev" + source: hosted + version: "2.4.4" win32: dependency: transitive description: @@ -798,5 +1078,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.3.0 <4.0.0" + dart: ">=3.3.0 <3.6.0" flutter: ">=3.19.0" diff --git a/src/demo/viewapp_master/pubspec.yaml b/src/demo/viewapp_master/pubspec.yaml index 34d6cc1..fa185d0 100644 --- a/src/demo/viewapp_master/pubspec.yaml +++ b/src/demo/viewapp_master/pubspec.yaml @@ -37,7 +37,6 @@ dependency_overrides: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 - local_notifier: ^0.1.5 pwa_install: ^0.0.5 shared_preferences: ^2.2.2 fl_chart: ^0.66.2 @@ -46,7 +45,7 @@ dependency_overrides: pdf: ^3.10.6 printing: ^5.12.0 share_plus: ^7.2.1 - syncfusion_flutter_pdfviewer: <=24.0.0 + syncfusion_flutter_pdfviewer: ^24.0.0 url_launcher: ^6.2.1 flutter_launcher_icons: ^0.13.1 @@ -54,6 +53,9 @@ dev_dependencies: flutter_test: sdk: flutter + build_runner: ^2.4.0 + build_web_compilers: ^4.0.4 + # The "flutter_lints" package below contains a set of recommended lints to # encourage good coding practices. The lint set provided by the package is # activated in the `analysis_options.yaml` file located at the root of your diff --git a/src/demo/viewapp_master/web/index.html b/src/demo/viewapp_master/web/index.html index 5484117..9770dac 100644 --- a/src/demo/viewapp_master/web/index.html +++ b/src/demo/viewapp_master/web/index.html @@ -28,6 +28,8 @@ + + viewapp_master diff --git a/src/demo/viewapp_master/windows/flutter/generated_plugin_registrant.cc b/src/demo/viewapp_master/windows/flutter/generated_plugin_registrant.cc index 0871eee..0d59293 100644 --- a/src/demo/viewapp_master/windows/flutter/generated_plugin_registrant.cc +++ b/src/demo/viewapp_master/windows/flutter/generated_plugin_registrant.cc @@ -6,15 +6,12 @@ #include "generated_plugin_registrant.h" -#include #include #include #include #include void RegisterPlugins(flutter::PluginRegistry* registry) { - LocalNotifierPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("LocalNotifierPlugin")); PrintingPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("PrintingPlugin")); SharePlusWindowsPluginCApiRegisterWithRegistrar( diff --git a/src/demo/viewapp_master/windows/flutter/generated_plugins.cmake b/src/demo/viewapp_master/windows/flutter/generated_plugins.cmake index a2a672d..8dc4fcb 100644 --- a/src/demo/viewapp_master/windows/flutter/generated_plugins.cmake +++ b/src/demo/viewapp_master/windows/flutter/generated_plugins.cmake @@ -3,7 +3,6 @@ # list(APPEND FLUTTER_PLUGIN_LIST - local_notifier printing share_plus syncfusion_pdfviewer_windows diff --git a/src/demo/viewapp_user/lib/main.dart b/src/demo/viewapp_user/lib/main.dart index 5be01d9..3473a3c 100644 --- a/src/demo/viewapp_user/lib/main.dart +++ b/src/demo/viewapp_user/lib/main.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:pwa_install/pwa_install.dart'; -import 'package:local_notifier/local_notifier.dart'; import 'package:viewapp_user/pages/out/about.dart'; import 'package:viewapp_user/pages/user/forget.dart'; import 'package:viewapp_user/pages/user/login.dart'; @@ -13,14 +12,9 @@ void main() async { PWAInstall().setup(installCallback: () { debugPrint('APP INSTALLED!'); }); + PWAInstall().promptInstall_(); runApp(viewAppMain()); await Future.delayed(const Duration(seconds: 1)); - /* localNotifier: Only Windows,Linux.macOS */ - await localNotifier.setup( - appName: 'View App User v3', - shortcutPolicy: - ShortcutPolicy.requireCreate, - ); } class viewAppMain extends StatelessWidget { diff --git a/src/demo/viewapp_user/lib/pages/btn/view/Cfoot.dart b/src/demo/viewapp_user/lib/pages/btn/view/Cfoot.dart index 5c02d25..89a1de0 100644 --- a/src/demo/viewapp_user/lib/pages/btn/view/Cfoot.dart +++ b/src/demo/viewapp_user/lib/pages/btn/view/Cfoot.dart @@ -100,7 +100,8 @@ class btn1 extends StatelessWidget { Navigator.push( context, MaterialPageRoute(builder: (context) => CfootTraffic_DB())); }, - child: Text('交通', textAlign: TextAlign.center)); + //交通 + child: Text('產品流通', textAlign: TextAlign.center)); } } @@ -115,7 +116,7 @@ class btn2 extends StatelessWidget { Navigator.push( context, MaterialPageRoute(builder: (context) => CfootOther_DB())); }, - child: Text('其它', textAlign: TextAlign.center)); + child: Text('其它計算', textAlign: TextAlign.center)); } } diff --git a/src/demo/viewapp_user/lib/pages/home.dart b/src/demo/viewapp_user/lib/pages/home.dart index 9057366..0a017b8 100644 --- a/src/demo/viewapp_user/lib/pages/home.dart +++ b/src/demo/viewapp_user/lib/pages/home.dart @@ -2,7 +2,6 @@ // ignore_for_file: must_be_immutable, duplicate_ignore, non_constant_identifier_names, prefer_const_constructors, prefer_const_literals_to_create_immutables import 'package:flutter/material.dart'; -import 'package:local_notifier/local_notifier.dart'; import 'package:viewapp_user/class/user.dart'; import 'package:viewapp_user/modules/PreferencesUtil.dart'; import 'package:viewapp_user/pages/out/control.dart'; @@ -94,11 +93,7 @@ class DrawerMenu extends StatelessWidget { } class BtnLogOut extends StatelessWidget { - BtnLogOut({super.key}); - LocalNotification notification = LocalNotification( - title: "提示", - body: "現在使用者登出", - ); + const BtnLogOut({super.key}); @override Widget build(BuildContext context) { @@ -106,7 +101,6 @@ class BtnLogOut extends StatelessWidget { leading: const CircleAvatar(child: Icon(Icons.arrow_back)), title: const Text('登出'), onTap: () { - notification.show(); //for Windows,Linux.macOS toLoginPage(context); }, ); diff --git a/src/demo/viewapp_user/lib/pages/user/login.dart b/src/demo/viewapp_user/lib/pages/user/login.dart index c9b154a..718203b 100644 --- a/src/demo/viewapp_user/lib/pages/user/login.dart +++ b/src/demo/viewapp_user/lib/pages/user/login.dart @@ -3,7 +3,6 @@ import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; -import 'package:local_notifier/local_notifier.dart'; import 'package:viewapp_user/class/user.dart'; import 'package:viewapp_user/modules/PreferencesUtil.dart'; import 'package:viewapp_user/pages/home.dart'; @@ -204,10 +203,6 @@ class btnLoginSend extends StatelessWidget { serverSource: serverSourceStr.text, LoginName: data["LoginName"], username: data["username"]); - LocalNotification notification = LocalNotification( - title: "Tip", - body: "Now Login User: ${data["LoginName"]} ", - ); /*主迴圈*/ if (code == "1") { @@ -215,7 +210,6 @@ class btnLoginSend extends StatelessWidget { PreferencesUtil.saveString('serverSource', serverSourceStr.text); PreferencesUtil.saveString('username', data["username"]); PreferencesUtil.saveString('LoginName', data["LoginName"]); - notification.show(); //for Windows,Linux.macOS //Go To HomePage Navigator.push( context, @@ -240,6 +234,7 @@ class btnLoginSend extends StatelessWidget { return AlertDialog( title: const Text('Login Fail!'), content: const Text('Please check you are Input Data!'), + backgroundColor: Colors.blue, actions: [ ElevatedButton( child: const Text('OK'), @@ -261,6 +256,7 @@ class btnLoginSend extends StatelessWidget { return AlertDialog( title: const Text('Password Fail!'), content: const Text('Please check you are Password!'), + backgroundColor: Colors.blue, actions: [ ElevatedButton( child: const Text('OK'), @@ -282,6 +278,7 @@ class btnLoginSend extends StatelessWidget { return AlertDialog( title: const Text('Network Connection Fail!'), content: const Text('Please check you are Network & Server!'), + backgroundColor: Colors.blue, actions: [ ElevatedButton( child: const Text('OK'), diff --git a/src/demo/viewapp_user/linux/flutter/generated_plugin_registrant.cc b/src/demo/viewapp_user/linux/flutter/generated_plugin_registrant.cc index 8c36fda..2dccc22 100644 --- a/src/demo/viewapp_user/linux/flutter/generated_plugin_registrant.cc +++ b/src/demo/viewapp_user/linux/flutter/generated_plugin_registrant.cc @@ -6,14 +6,10 @@ #include "generated_plugin_registrant.h" -#include #include #include void fl_register_plugins(FlPluginRegistry* registry) { - g_autoptr(FlPluginRegistrar) local_notifier_registrar = - fl_plugin_registry_get_registrar_for_plugin(registry, "LocalNotifierPlugin"); - local_notifier_plugin_register_with_registrar(local_notifier_registrar); g_autoptr(FlPluginRegistrar) printing_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "PrintingPlugin"); printing_plugin_register_with_registrar(printing_registrar); diff --git a/src/demo/viewapp_user/linux/flutter/generated_plugins.cmake b/src/demo/viewapp_user/linux/flutter/generated_plugins.cmake index d4e6c04..45f2369 100644 --- a/src/demo/viewapp_user/linux/flutter/generated_plugins.cmake +++ b/src/demo/viewapp_user/linux/flutter/generated_plugins.cmake @@ -3,7 +3,6 @@ # list(APPEND FLUTTER_PLUGIN_LIST - local_notifier printing url_launcher_linux ) diff --git a/src/demo/viewapp_user/macos/Flutter/GeneratedPluginRegistrant.swift b/src/demo/viewapp_user/macos/Flutter/GeneratedPluginRegistrant.swift index 639b0fb..9b4fab6 100644 --- a/src/demo/viewapp_user/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/src/demo/viewapp_user/macos/Flutter/GeneratedPluginRegistrant.swift @@ -6,7 +6,6 @@ import FlutterMacOS import Foundation import device_info_plus -import local_notifier import path_provider_foundation import printing import share_plus @@ -16,7 +15,6 @@ import url_launcher_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) - LocalNotifierPlugin.register(with: registry.registrar(forPlugin: "LocalNotifierPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PrintingPlugin.register(with: registry.registrar(forPlugin: "PrintingPlugin")) SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) diff --git a/src/demo/viewapp_user/pubspec.lock b/src/demo/viewapp_user/pubspec.lock index 98bf920..e777195 100644 --- a/src/demo/viewapp_user/pubspec.lock +++ b/src/demo/viewapp_user/pubspec.lock @@ -169,6 +169,14 @@ packages: url: "https://pub.dev" source: hosted version: "7.0.0" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" fl_chart: dependency: "direct overridden" description: @@ -288,14 +296,6 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.0" - local_notifier: - dependency: "direct overridden" - description: - name: local_notifier - sha256: cc855aa6362c8840e3d3b35b1c3b058a3a8becdb2b03d5a9aa3f3a1e861f0a03 - url: "https://pub.dev" - source: hosted - version: "0.1.5" matcher: dependency: transitive description: @@ -549,6 +549,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" stack_trace: dependency: transitive description: @@ -577,66 +585,66 @@ packages: dependency: transitive description: name: syncfusion_flutter_core - sha256: a2427697bfad5b611db78ea4c4daef82d3350b83c729a8dc37959662a31547f9 + sha256: "7666506885ebc8f62bb928ad4588a73e20caaff2b2cf2b2b56f67d98f4113525" url: "https://pub.dev" source: hosted - version: "23.2.7" + version: "24.2.9" syncfusion_flutter_pdf: dependency: transitive description: name: syncfusion_flutter_pdf - sha256: "1fdb4da03d2a3bcd9006b7bc39e668ef8a6b45b4604dde1e95a216007125e50a" + sha256: a9e85bbfd574bb262733b33494240fda38bfeb58553537560ba4b3f54a31418b url: "https://pub.dev" source: hosted - version: "23.2.7" + version: "24.2.9" syncfusion_flutter_pdfviewer: dependency: "direct overridden" description: name: syncfusion_flutter_pdfviewer - sha256: "202a8f39dc80b5e9f24dd59cb3979aae73fa5cd2533597d07baaf4638084eadc" + sha256: "90bb093838a4a2b3f59f5aa1167325185ee83aa7bc8c5857e73b9a978c1fe299" url: "https://pub.dev" source: hosted - version: "23.1.39" + version: "24.2.8" syncfusion_flutter_signaturepad: dependency: transitive description: name: syncfusion_flutter_signaturepad - sha256: "7950bf086484ed7ada07fea2378be619ec4a0498ddabe42f4c0953fbdb25a16c" + sha256: "2ab2c81176ed6779a0e5f7724645c9af2a1656eec3f53ef6b10d67d9d65f0b4a" url: "https://pub.dev" source: hosted - version: "23.2.7" + version: "24.2.9" syncfusion_pdfviewer_macos: dependency: transitive description: name: syncfusion_pdfviewer_macos - sha256: d9dda5bde1ec873d9559ff04be79d0cb12ab3a541124792cf754af81e034f192 + sha256: "6dad65d36d32e679e7666be438a5a75d870e0b1b9cd010ddcfc7475b9063a89d" url: "https://pub.dev" source: hosted - version: "23.2.7" + version: "24.2.9" syncfusion_pdfviewer_platform_interface: dependency: transitive description: name: syncfusion_pdfviewer_platform_interface - sha256: c8eaf2b30c509126628f9456d303ca2ea5600db180e5485c940f4846966902fe + sha256: "6a1bf9fe0648daa77e3c76052f7d02b50f1208ae1d751f648100e46100bf8711" url: "https://pub.dev" source: hosted - version: "23.2.7" + version: "24.2.9" syncfusion_pdfviewer_web: dependency: transitive description: name: syncfusion_pdfviewer_web - sha256: "90ee0961a654bca25a2446828f296568b4098c461c36dff8d2d7624149b4cd26" + sha256: c69720a884b0faa2c42bc2c98596db18dd2747123fdd6f7f398da1120a7d21b3 url: "https://pub.dev" source: hosted - version: "23.2.7" + version: "24.2.8" syncfusion_pdfviewer_windows: dependency: transitive description: name: syncfusion_pdfviewer_windows - sha256: ac645b6f2d14ae8e0a6906359913b2f59eb5495b2a373b60fd55c1aff7b5b769 + sha256: "6e33562967828feeebc1b5cb0e5f1ec23abb86007dce37773501f9f18bfe3a36" url: "https://pub.dev" source: hosted - version: "23.2.7" + version: "24.2.9" term_glyph: dependency: transitive description: @@ -729,10 +737,10 @@ packages: dependency: transitive description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8 url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.3.3" vector_math: dependency: transitive description: diff --git a/src/demo/viewapp_user/pubspec.yaml b/src/demo/viewapp_user/pubspec.yaml index b944795..e3f9deb 100644 --- a/src/demo/viewapp_user/pubspec.yaml +++ b/src/demo/viewapp_user/pubspec.yaml @@ -38,7 +38,6 @@ dependency_overrides: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 - local_notifier: ^0.1.5 pwa_install: ^0.0.5 shared_preferences: ^2.2.2 fl_chart: ^0.66.2 @@ -47,7 +46,7 @@ dependency_overrides: pdf: ^3.10.6 printing: ^5.11.1 share_plus: ^7.2.1 - syncfusion_flutter_pdfviewer: <=24.0.0 + syncfusion_flutter_pdfviewer: ^24.0.0 url_launcher: ^6.2.1 flutter_launcher_icons: ^0.13.1 diff --git a/src/demo/viewapp_user/windows/flutter/generated_plugin_registrant.cc b/src/demo/viewapp_user/windows/flutter/generated_plugin_registrant.cc index 0871eee..0d59293 100644 --- a/src/demo/viewapp_user/windows/flutter/generated_plugin_registrant.cc +++ b/src/demo/viewapp_user/windows/flutter/generated_plugin_registrant.cc @@ -6,15 +6,12 @@ #include "generated_plugin_registrant.h" -#include #include #include #include #include void RegisterPlugins(flutter::PluginRegistry* registry) { - LocalNotifierPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("LocalNotifierPlugin")); PrintingPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("PrintingPlugin")); SharePlusWindowsPluginCApiRegisterWithRegistrar( diff --git a/src/demo/viewapp_user/windows/flutter/generated_plugins.cmake b/src/demo/viewapp_user/windows/flutter/generated_plugins.cmake index a2a672d..8dc4fcb 100644 --- a/src/demo/viewapp_user/windows/flutter/generated_plugins.cmake +++ b/src/demo/viewapp_user/windows/flutter/generated_plugins.cmake @@ -3,7 +3,6 @@ # list(APPEND FLUTTER_PLUGIN_LIST - local_notifier printing share_plus syncfusion_pdfviewer_windows