Showing
16 changed files
with
126 additions
and
26 deletions
| @@ -43,8 +43,8 @@ android { | @@ -43,8 +43,8 @@ android { | ||
| 43 | applicationId "com.naji.one_key" | 43 | applicationId "com.naji.one_key" |
| 44 | minSdkVersion 21 | 44 | minSdkVersion 21 |
| 45 | targetSdkVersion 28 | 45 | targetSdkVersion 28 |
| 46 | - versionCode flutterVersionCode.toInteger() | ||
| 47 | - versionName flutterVersionName | 46 | + versionCode 7 |
| 47 | + versionName "1.0.7" | ||
| 48 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | 48 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
| 49 | 49 | ||
| 50 | ndk { | 50 | ndk { |
| @@ -55,6 +55,8 @@ PODS: | @@ -55,6 +55,8 @@ PODS: | ||
| 55 | - Flutter | 55 | - Flutter |
| 56 | - url_launcher_web (0.0.1): | 56 | - url_launcher_web (0.0.1): |
| 57 | - Flutter | 57 | - Flutter |
| 58 | + - webview_flutter (0.0.1): | ||
| 59 | + - Flutter | ||
| 58 | - WechatOpenSDK (1.8.7.1) | 60 | - WechatOpenSDK (1.8.7.1) |
| 59 | 61 | ||
| 60 | DEPENDENCIES: | 62 | DEPENDENCIES: |
| @@ -80,6 +82,7 @@ DEPENDENCIES: | @@ -80,6 +82,7 @@ DEPENDENCIES: | ||
| 80 | - url_launcher (from `.symlinks/plugins/url_launcher/ios`) | 82 | - url_launcher (from `.symlinks/plugins/url_launcher/ios`) |
| 81 | - url_launcher_macos (from `.symlinks/plugins/url_launcher_macos/ios`) | 83 | - url_launcher_macos (from `.symlinks/plugins/url_launcher_macos/ios`) |
| 82 | - url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`) | 84 | - url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`) |
| 85 | + - webview_flutter (from `.symlinks/plugins/webview_flutter/ios`) | ||
| 83 | 86 | ||
| 84 | SPEC REPOS: | 87 | SPEC REPOS: |
| 85 | https://github.com/CocoaPods/Specs.git: | 88 | https://github.com/CocoaPods/Specs.git: |
| @@ -135,6 +138,8 @@ EXTERNAL SOURCES: | @@ -135,6 +138,8 @@ EXTERNAL SOURCES: | ||
| 135 | :path: ".symlinks/plugins/url_launcher_macos/ios" | 138 | :path: ".symlinks/plugins/url_launcher_macos/ios" |
| 136 | url_launcher_web: | 139 | url_launcher_web: |
| 137 | :path: ".symlinks/plugins/url_launcher_web/ios" | 140 | :path: ".symlinks/plugins/url_launcher_web/ios" |
| 141 | + webview_flutter: | ||
| 142 | + :path: ".symlinks/plugins/webview_flutter/ios" | ||
| 138 | 143 | ||
| 139 | SPEC CHECKSUMS: | 144 | SPEC CHECKSUMS: |
| 140 | audioplayers: 84f968cea3f2deab00ec4f8ff53358b3c0b3992c | 145 | audioplayers: 84f968cea3f2deab00ec4f8ff53358b3c0b3992c |
| @@ -164,6 +169,7 @@ SPEC CHECKSUMS: | @@ -164,6 +169,7 @@ SPEC CHECKSUMS: | ||
| 164 | url_launcher: a1c0cc845906122c4784c542523d8cacbded5626 | 169 | url_launcher: a1c0cc845906122c4784c542523d8cacbded5626 |
| 165 | url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313 | 170 | url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313 |
| 166 | url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c | 171 | url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c |
| 172 | + webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96 | ||
| 167 | WechatOpenSDK: 6a4d1436c15b3b5fe2a0bd383f3046010186da44 | 173 | WechatOpenSDK: 6a4d1436c15b3b5fe2a0bd383f3046010186da44 |
| 168 | 174 | ||
| 169 | PODFILE CHECKSUM: a5c9f5cbedb217afa5108d75ed888500ab689803 | 175 | PODFILE CHECKSUM: a5c9f5cbedb217afa5108d75ed888500ab689803 |
| @@ -383,7 +383,7 @@ | @@ -383,7 +383,7 @@ | ||
| 383 | CLANG_ENABLE_MODULES = YES; | 383 | CLANG_ENABLE_MODULES = YES; |
| 384 | CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements; | 384 | CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements; |
| 385 | CODE_SIGN_STYLE = Manual; | 385 | CODE_SIGN_STYLE = Manual; |
| 386 | - CURRENT_PROJECT_VERSION = 5; | 386 | + CURRENT_PROJECT_VERSION = 7; |
| 387 | DEVELOPMENT_TEAM = 8J59HM8B82; | 387 | DEVELOPMENT_TEAM = 8J59HM8B82; |
| 388 | ENABLE_BITCODE = NO; | 388 | ENABLE_BITCODE = NO; |
| 389 | FRAMEWORK_SEARCH_PATHS = ( | 389 | FRAMEWORK_SEARCH_PATHS = ( |
| @@ -396,7 +396,7 @@ | @@ -396,7 +396,7 @@ | ||
| 396 | "$(inherited)", | 396 | "$(inherited)", |
| 397 | "$(PROJECT_DIR)/Flutter", | 397 | "$(PROJECT_DIR)/Flutter", |
| 398 | ); | 398 | ); |
| 399 | - MARKETING_VERSION = 1.0.5; | 399 | + MARKETING_VERSION = 1.0.7; |
| 400 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; | 400 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; |
| 401 | PRODUCT_NAME = "一键订"; | 401 | PRODUCT_NAME = "一键订"; |
| 402 | PROVISIONING_PROFILE_SPECIFIER = "OneKey Distribution Profile"; | 402 | PROVISIONING_PROFILE_SPECIFIER = "OneKey Distribution Profile"; |
| @@ -526,7 +526,7 @@ | @@ -526,7 +526,7 @@ | ||
| 526 | CLANG_ENABLE_MODULES = YES; | 526 | CLANG_ENABLE_MODULES = YES; |
| 527 | CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; | 527 | CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; |
| 528 | CODE_SIGN_STYLE = Manual; | 528 | CODE_SIGN_STYLE = Manual; |
| 529 | - CURRENT_PROJECT_VERSION = 5; | 529 | + CURRENT_PROJECT_VERSION = 7; |
| 530 | DEVELOPMENT_TEAM = 8J59HM8B82; | 530 | DEVELOPMENT_TEAM = 8J59HM8B82; |
| 531 | ENABLE_BITCODE = NO; | 531 | ENABLE_BITCODE = NO; |
| 532 | FRAMEWORK_SEARCH_PATHS = ( | 532 | FRAMEWORK_SEARCH_PATHS = ( |
| @@ -539,7 +539,7 @@ | @@ -539,7 +539,7 @@ | ||
| 539 | "$(inherited)", | 539 | "$(inherited)", |
| 540 | "$(PROJECT_DIR)/Flutter", | 540 | "$(PROJECT_DIR)/Flutter", |
| 541 | ); | 541 | ); |
| 542 | - MARKETING_VERSION = 1.0.5; | 542 | + MARKETING_VERSION = 1.0.7; |
| 543 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; | 543 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; |
| 544 | PRODUCT_NAME = "一键订"; | 544 | PRODUCT_NAME = "一键订"; |
| 545 | PROVISIONING_PROFILE_SPECIFIER = "Push Development Profile"; | 545 | PROVISIONING_PROFILE_SPECIFIER = "Push Development Profile"; |
| @@ -558,7 +558,7 @@ | @@ -558,7 +558,7 @@ | ||
| 558 | CLANG_ENABLE_MODULES = YES; | 558 | CLANG_ENABLE_MODULES = YES; |
| 559 | CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; | 559 | CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; |
| 560 | CODE_SIGN_STYLE = Manual; | 560 | CODE_SIGN_STYLE = Manual; |
| 561 | - CURRENT_PROJECT_VERSION = 5; | 561 | + CURRENT_PROJECT_VERSION = 7; |
| 562 | DEVELOPMENT_TEAM = 8J59HM8B82; | 562 | DEVELOPMENT_TEAM = 8J59HM8B82; |
| 563 | ENABLE_BITCODE = NO; | 563 | ENABLE_BITCODE = NO; |
| 564 | FRAMEWORK_SEARCH_PATHS = ( | 564 | FRAMEWORK_SEARCH_PATHS = ( |
| @@ -571,7 +571,7 @@ | @@ -571,7 +571,7 @@ | ||
| 571 | "$(inherited)", | 571 | "$(inherited)", |
| 572 | "$(PROJECT_DIR)/Flutter", | 572 | "$(PROJECT_DIR)/Flutter", |
| 573 | ); | 573 | ); |
| 574 | - MARKETING_VERSION = 1.0.5; | 574 | + MARKETING_VERSION = 1.0.7; |
| 575 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; | 575 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; |
| 576 | PRODUCT_NAME = "一键订"; | 576 | PRODUCT_NAME = "一键订"; |
| 577 | PROVISIONING_PROFILE_SPECIFIER = "OneKey Distribution Profile"; | 577 | PROVISIONING_PROFILE_SPECIFIER = "OneKey Distribution Profile"; |
| @@ -2,8 +2,6 @@ | @@ -2,8 +2,6 @@ | ||
| 2 | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | 2 | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
| 3 | <plist version="1.0"> | 3 | <plist version="1.0"> |
| 4 | <dict> | 4 | <dict> |
| 5 | - <key></key> | ||
| 6 | - <string></string> | ||
| 7 | <key>CFBundleDevelopmentRegion</key> | 5 | <key>CFBundleDevelopmentRegion</key> |
| 8 | <string>$(DEVELOPMENT_LANGUAGE)</string> | 6 | <string>$(DEVELOPMENT_LANGUAGE)</string> |
| 9 | <key>CFBundleDisplayName</key> | 7 | <key>CFBundleDisplayName</key> |
| @@ -84,5 +82,7 @@ | @@ -84,5 +82,7 @@ | ||
| 84 | </array> | 82 | </array> |
| 85 | <key>UIViewControllerBasedStatusBarAppearance</key> | 83 | <key>UIViewControllerBasedStatusBarAppearance</key> |
| 86 | <false/> | 84 | <false/> |
| 85 | + <key>io.flutter.embedded_views_preview</key> | ||
| 86 | + <true/> | ||
| 87 | </dict> | 87 | </dict> |
| 88 | </plist> | 88 | </plist> |
| @@ -74,7 +74,7 @@ class MyAppState extends State<MyApp>{ | @@ -74,7 +74,7 @@ class MyAppState extends State<MyApp>{ | ||
| 74 | appId: "wx85aa3cdd0f791e65", | 74 | appId: "wx85aa3cdd0f791e65", |
| 75 | doOnAndroid: true, | 75 | doOnAndroid: true, |
| 76 | doOnIOS: true, | 76 | doOnIOS: true, |
| 77 | - universalLink: "https://xt04.colorcun.com/link/"); | 77 | + universalLink: "https://xt04.colorcun.com/link/OneKey/"); |
| 78 | var result = await isWeChatInstalled; | 78 | var result = await isWeChatInstalled; |
| 79 | LogUtil.v("is installed $result"); | 79 | LogUtil.v("is installed $result"); |
| 80 | } | 80 | } |
| @@ -75,7 +75,7 @@ class MyPageState extends State<MyPage>{ | @@ -75,7 +75,7 @@ class MyPageState extends State<MyPage>{ | ||
| 75 | },), | 75 | },), |
| 76 | MyDivider(double.infinity,ScreenUtil().setHeight(1),color: MyColours.color_f3f3f3,), | 76 | MyDivider(double.infinity,ScreenUtil().setHeight(1),color: MyColours.color_f3f3f3,), |
| 77 | MyItem(title:"帮助与反馈",content:"",callback: (){ | 77 | MyItem(title:"帮助与反馈",content:"",callback: (){ |
| 78 | - Utils.goHelp(); | 78 | + Utils.goHelp(context); |
| 79 | },), | 79 | },), |
| 80 | MyDivider(double.infinity,ScreenUtil().setHeight(1),color: MyColours.color_f3f3f3), | 80 | MyDivider(double.infinity,ScreenUtil().setHeight(1),color: MyColours.color_f3f3f3), |
| 81 | GestureDetector( | 81 | GestureDetector( |
lib/pages/webview/webview_page.dart
0 → 100644
| 1 | +import 'dart:async'; | ||
| 2 | +import 'dart:convert'; | ||
| 3 | + | ||
| 4 | +import 'package:flutter/material.dart'; | ||
| 5 | +import 'package:one_key/widgets/app_bar.dart'; | ||
| 6 | +import 'package:webview_flutter/webview_flutter.dart'; | ||
| 7 | + | ||
| 8 | +class WebViewPage extends StatefulWidget { | ||
| 9 | + | ||
| 10 | + @override | ||
| 11 | + _WebViewPageState createState() => _WebViewPageState(); | ||
| 12 | +} | ||
| 13 | + | ||
| 14 | +class _WebViewPageState extends State<WebViewPage> { | ||
| 15 | + final Completer<WebViewController> _controller = | ||
| 16 | + Completer<WebViewController>(); | ||
| 17 | + | ||
| 18 | + @override | ||
| 19 | + Widget build(BuildContext context) { | ||
| 20 | + return Scaffold( | ||
| 21 | + // We're using a Builder here so we have a context that is below the Scaffold | ||
| 22 | + // to allow calling Scaffold.of(context) so we can show a snackbar. | ||
| 23 | + appBar: AppBar( | ||
| 24 | + title: const Text('一键订'), | ||
| 25 | + // This drop down menu demonstrates that Flutter widgets can be shown over the web view. | ||
| 26 | + ), | ||
| 27 | + body: Builder(builder: (BuildContext context) { | ||
| 28 | + return WebView( | ||
| 29 | + initialUrl: "https://support.qq.com/product/152856", | ||
| 30 | + javascriptMode: JavascriptMode.unrestricted, | ||
| 31 | + onWebViewCreated: (WebViewController webViewController) { | ||
| 32 | + _controller.complete(webViewController); | ||
| 33 | + }, | ||
| 34 | + // TODO(iskakaushik): Remove this when collection literals makes it to stable. | ||
| 35 | + // ignore: prefer_collection_literals | ||
| 36 | + javascriptChannels: <JavascriptChannel>[ | ||
| 37 | + _toasterJavascriptChannel(context), | ||
| 38 | + ].toSet(), | ||
| 39 | + navigationDelegate: (NavigationRequest request) { | ||
| 40 | + if (request.url.startsWith('https://www.youtube.com/')) { | ||
| 41 | + print('blocking navigation to $request}'); | ||
| 42 | + return NavigationDecision.prevent; | ||
| 43 | + } | ||
| 44 | + print('allowing navigation to $request'); | ||
| 45 | + return NavigationDecision.navigate; | ||
| 46 | + }, | ||
| 47 | + onPageStarted: (String url) { | ||
| 48 | + print('Page started loading: $url'); | ||
| 49 | + }, | ||
| 50 | + onPageFinished: (String url) { | ||
| 51 | + print('Page finished loading: $url'); | ||
| 52 | + }, | ||
| 53 | + gestureNavigationEnabled: true, | ||
| 54 | + ); | ||
| 55 | + }), | ||
| 56 | + ); | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + JavascriptChannel _toasterJavascriptChannel(BuildContext context) { | ||
| 60 | + return JavascriptChannel( | ||
| 61 | + name: 'Toaster', | ||
| 62 | + onMessageReceived: (JavascriptMessage message) { | ||
| 63 | + Scaffold.of(context).showSnackBar( | ||
| 64 | + SnackBar(content: Text(message.message)), | ||
| 65 | + ); | ||
| 66 | + }); | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | +} |
| @@ -42,6 +42,7 @@ class UpdateModel { | @@ -42,6 +42,7 @@ class UpdateModel { | ||
| 42 | .request<List>(context, Method.get, HttpUrl.check_update, data: params) | 42 | .request<List>(context, Method.get, HttpUrl.check_update, data: params) |
| 43 | .catchError((error) { | 43 | .catchError((error) { |
| 44 | print(error.toString()); | 44 | print(error.toString()); |
| 45 | + Utils.showToast("当前已是最新版本"); | ||
| 45 | }); | 46 | }); |
| 46 | if (baseResp.code == Constant.status_success) { | 47 | if (baseResp.code == Constant.status_success) { |
| 47 | LogUtil.v(baseResp.data); | 48 | LogUtil.v(baseResp.data); |
| @@ -54,7 +55,11 @@ class UpdateModel { | @@ -54,7 +55,11 @@ class UpdateModel { | ||
| 54 | "content": dataMap["content"].toString() | 55 | "content": dataMap["content"].toString() |
| 55 | }); | 56 | }); |
| 56 | showUpdateDialog(context, version); | 57 | showUpdateDialog(context, version); |
| 58 | + }else{ | ||
| 59 | + Utils.showToast(baseResp.msg??"当前已是最新版本"); | ||
| 57 | } | 60 | } |
| 61 | + }else{ | ||
| 62 | + Utils.showToast(baseResp.msg??"当前已是最新版本"); | ||
| 58 | } | 63 | } |
| 59 | // if(Platform.isAndroid){ | 64 | // if(Platform.isAndroid){ |
| 60 | // | 65 | // |
| 1 | import 'dart:convert'; | 1 | import 'dart:convert'; |
| 2 | 2 | ||
| 3 | -import 'package:dio/dio.dart'; | ||
| 4 | import 'package:flutter/material.dart'; | 3 | import 'package:flutter/material.dart'; |
| 5 | import 'package:flutter_screenutil/flutter_screenutil.dart'; | 4 | import 'package:flutter_screenutil/flutter_screenutil.dart'; |
| 6 | import 'package:jpush_flutter/jpush_flutter.dart'; | 5 | import 'package:jpush_flutter/jpush_flutter.dart'; |
| @@ -10,7 +9,6 @@ import 'package:one_key/net/base_resp.dart'; | @@ -10,7 +9,6 @@ import 'package:one_key/net/base_resp.dart'; | ||
| 10 | import 'package:one_key/net/dio_util.dart'; | 9 | import 'package:one_key/net/dio_util.dart'; |
| 11 | import 'package:one_key/net/http_url.dart'; | 10 | import 'package:one_key/net/http_url.dart'; |
| 12 | import 'package:one_key/res/colors.dart'; | 11 | import 'package:one_key/res/colors.dart'; |
| 13 | -import 'package:one_key/utils/log_util.dart'; | ||
| 14 | import 'package:one_key/utils/navigator_util.dart'; | 12 | import 'package:one_key/utils/navigator_util.dart'; |
| 15 | import 'package:one_key/utils/utils.dart'; | 13 | import 'package:one_key/utils/utils.dart'; |
| 16 | import 'package:one_key/widgets/MyDivider.dart'; | 14 | import 'package:one_key/widgets/MyDivider.dart'; |
| @@ -8,6 +8,7 @@ import 'package:one_key/pages/detail/handle_online_page.dart'; | @@ -8,6 +8,7 @@ import 'package:one_key/pages/detail/handle_online_page.dart'; | ||
| 8 | import 'package:one_key/pages/detail/notebook_detail_page.dart'; | 8 | import 'package:one_key/pages/detail/notebook_detail_page.dart'; |
| 9 | import 'package:one_key/pages/sms/sms_page.dart'; | 9 | import 'package:one_key/pages/sms/sms_page.dart'; |
| 10 | import 'package:one_key/pages/table/select_table_page.dart'; | 10 | import 'package:one_key/pages/table/select_table_page.dart'; |
| 11 | +import 'package:one_key/pages/webview/webview_page.dart'; | ||
| 11 | import 'package:one_key/utils/fluro_convert_utils.dart'; | 12 | import 'package:one_key/utils/fluro_convert_utils.dart'; |
| 12 | import 'package:one_key/utils/log_util.dart'; | 13 | import 'package:one_key/utils/log_util.dart'; |
| 13 | 14 | ||
| @@ -66,3 +67,9 @@ var handleSmsHandler = new Handler( | @@ -66,3 +67,9 @@ var handleSmsHandler = new Handler( | ||
| 66 | return SmsPage(rid); | 67 | return SmsPage(rid); |
| 67 | }); | 68 | }); |
| 68 | 69 | ||
| 70 | +// 浏览网页 | ||
| 71 | +var handleWebviewHandler = new Handler( | ||
| 72 | + handlerFunc: (BuildContext context, Map<String, List<Object>> params) { | ||
| 73 | + return WebViewPage(); | ||
| 74 | + }); | ||
| 75 | + |
| 1 | import 'package:fluro/fluro.dart'; | 1 | import 'package:fluro/fluro.dart'; |
| 2 | import 'package:flutter/material.dart'; | 2 | import 'package:flutter/material.dart'; |
| 3 | import 'package:one_key/pages/login/login_page.dart'; | 3 | import 'package:one_key/pages/login/login_page.dart'; |
| 4 | +import 'package:one_key/utils/log_util.dart'; | ||
| 4 | 5 | ||
| 5 | import 'route_handles.dart'; | 6 | import 'route_handles.dart'; |
| 6 | 7 | ||
| @@ -12,6 +13,7 @@ class Routes { | @@ -12,6 +13,7 @@ class Routes { | ||
| 12 | static String select_table="/select_table";//选择桌位 | 13 | static String select_table="/select_table";//选择桌位 |
| 13 | static String invication="/invication";//邀请函 | 14 | static String invication="/invication";//邀请函 |
| 14 | static String sms="/sms";//发短信 | 15 | static String sms="/sms";//发短信 |
| 16 | + static String webview="/webview";//网页 | ||
| 15 | 17 | ||
| 16 | 18 | ||
| 17 | static void configureRoutes(Router router) { | 19 | static void configureRoutes(Router router) { |
| @@ -27,5 +29,6 @@ class Routes { | @@ -27,5 +29,6 @@ class Routes { | ||
| 27 | router.define(select_table, handler: handleSelectTableHandler); | 29 | router.define(select_table, handler: handleSelectTableHandler); |
| 28 | router.define(invication, handler: handleInvicationHandler); | 30 | router.define(invication, handler: handleInvicationHandler); |
| 29 | router.define(sms, handler: handleSmsHandler); | 31 | router.define(sms, handler: handleSmsHandler); |
| 32 | + router.define(webview, handler: handleWebviewHandler); | ||
| 30 | } | 33 | } |
| 31 | } | 34 | } |
| @@ -173,8 +173,8 @@ class DialogUtil { | @@ -173,8 +173,8 @@ class DialogUtil { | ||
| 173 | decoration: BoxDecoration( | 173 | decoration: BoxDecoration( |
| 174 | color: MyColours.color_2bb5b7), | 174 | color: MyColours.color_2bb5b7), |
| 175 | headerPadding: EdgeInsets.zero, | 175 | headerPadding: EdgeInsets.zero, |
| 176 | - formatButtonVisible: false, | ||
| 177 | - centerHeaderTitle: true, | 176 | + formatButtonVisible: true, |
| 177 | + centerHeaderTitle: false, | ||
| 178 | titleTextBuilder: (dateTime, _) { | 178 | titleTextBuilder: (dateTime, _) { |
| 179 | return dateTime.year.toString() + | 179 | return dateTime.year.toString() + |
| 180 | "年-" + | 180 | "年-" + |
| @@ -183,7 +183,7 @@ class DialogUtil { | @@ -183,7 +183,7 @@ class DialogUtil { | ||
| 183 | }, | 183 | }, |
| 184 | titleTextStyle: TextStyle( | 184 | titleTextStyle: TextStyle( |
| 185 | color: MyColours.color_ffffff, | 185 | color: MyColours.color_ffffff, |
| 186 | - fontSize: ScreenUtil().setSp(32)), | 186 | + fontSize: ScreenUtil().setSp(30)), |
| 187 | leftChevronIcon: | 187 | leftChevronIcon: |
| 188 | const Icon(Icons.chevron_left, color: Colors.white), | 188 | const Icon(Icons.chevron_left, color: Colors.white), |
| 189 | rightChevronIcon: | 189 | rightChevronIcon: |
| @@ -58,4 +58,9 @@ class NavigatorUtil { | @@ -58,4 +58,9 @@ class NavigatorUtil { | ||
| 58 | static void goSmsPage(BuildContext context,String rid) { | 58 | static void goSmsPage(BuildContext context,String rid) { |
| 59 | _navigateTo(context,"${Routes.sms}?rid=$rid"); | 59 | _navigateTo(context,"${Routes.sms}?rid=$rid"); |
| 60 | } | 60 | } |
| 61 | + | ||
| 62 | + /// 浏览器 | ||
| 63 | + static void goWebviewPage(BuildContext context) { | ||
| 64 | + _navigateTo(context,"${Routes.webview}"); | ||
| 65 | + } | ||
| 61 | } | 66 | } |
| @@ -10,8 +10,10 @@ import 'package:fluttertoast/fluttertoast.dart'; | @@ -10,8 +10,10 @@ import 'package:fluttertoast/fluttertoast.dart'; | ||
| 10 | import 'package:flutter/services.dart'; | 10 | import 'package:flutter/services.dart'; |
| 11 | import 'package:fluwx/fluwx.dart'; | 11 | import 'package:fluwx/fluwx.dart'; |
| 12 | import 'package:one_key/utils/log_util.dart'; | 12 | import 'package:one_key/utils/log_util.dart'; |
| 13 | +import 'package:one_key/utils/navigator_util.dart'; | ||
| 13 | import 'package:package_info/package_info.dart'; | 14 | import 'package:package_info/package_info.dart'; |
| 14 | import 'package:url_launcher/url_launcher.dart'; | 15 | import 'package:url_launcher/url_launcher.dart'; |
| 16 | +import 'package:webview_flutter/webview_flutter.dart'; | ||
| 15 | 17 | ||
| 16 | class Utils { | 18 | class Utils { |
| 17 | static void showToast(String msg) { | 19 | static void showToast(String msg) { |
| @@ -81,13 +83,8 @@ class Utils { | @@ -81,13 +83,8 @@ class Utils { | ||
| 81 | } | 83 | } |
| 82 | 84 | ||
| 83 | //跳转拨打电话页面 | 85 | //跳转拨打电话页面 |
| 84 | - static goHelp() async { | ||
| 85 | - String url="https://support.qq.com/product/152856"; | ||
| 86 | - if(await canLaunch(url)){ | ||
| 87 | - await launch(url); | ||
| 88 | - }else{ | ||
| 89 | - LogUtil.e("Could not launch $url"); | ||
| 90 | - } | 86 | + static goHelp(BuildContext context) async { |
| 87 | + NavigatorUtil.goWebviewPage(context); | ||
| 91 | } | 88 | } |
| 92 | 89 | ||
| 93 | //获取应用版本昊 | 90 | //获取应用版本昊 |
| @@ -309,7 +309,7 @@ packages: | @@ -309,7 +309,7 @@ packages: | ||
| 309 | name: fluwx | 309 | name: fluwx |
| 310 | url: "https://pub.flutter-io.cn" | 310 | url: "https://pub.flutter-io.cn" |
| 311 | source: hosted | 311 | source: hosted |
| 312 | - version: "2.0.9" | 312 | + version: "2.1.0" |
| 313 | front_end: | 313 | front_end: |
| 314 | dependency: transitive | 314 | dependency: transitive |
| 315 | description: | 315 | description: |
| @@ -819,6 +819,13 @@ packages: | @@ -819,6 +819,13 @@ packages: | ||
| 819 | url: "https://pub.flutter-io.cn" | 819 | url: "https://pub.flutter-io.cn" |
| 820 | source: hosted | 820 | source: hosted |
| 821 | version: "1.1.0" | 821 | version: "1.1.0" |
| 822 | + webview_flutter: | ||
| 823 | + dependency: "direct main" | ||
| 824 | + description: | ||
| 825 | + name: webview_flutter | ||
| 826 | + url: "https://pub.flutter-io.cn" | ||
| 827 | + source: hosted | ||
| 828 | + version: "0.3.22+1" | ||
| 822 | xml: | 829 | xml: |
| 823 | dependency: transitive | 830 | dependency: transitive |
| 824 | description: | 831 | description: |
| @@ -64,7 +64,7 @@ dependencies: | @@ -64,7 +64,7 @@ dependencies: | ||
| 64 | # 日历 | 64 | # 日历 |
| 65 | table_calendar: ^2.2.1 | 65 | table_calendar: ^2.2.1 |
| 66 | # 微信SDK | 66 | # 微信SDK |
| 67 | - fluwx: ^2.0.9 | 67 | + fluwx: ^2.1.0 |
| 68 | #网页,短信,电话 | 68 | #网页,短信,电话 |
| 69 | url_launcher: ^5.4.2 | 69 | url_launcher: ^5.4.2 |
| 70 | # 滚轮选择器 | 70 | # 滚轮选择器 |
| @@ -79,12 +79,15 @@ dependencies: | @@ -79,12 +79,15 @@ dependencies: | ||
| 79 | package_info: ^0.4.0+18 | 79 | package_info: ^0.4.0+18 |
| 80 | # 获取设备信息 | 80 | # 获取设备信息 |
| 81 | device_info: ^0.4.2+4 | 81 | device_info: ^0.4.2+4 |
| 82 | +# webview | ||
| 83 | + webview_flutter: ^0.3.22+1 | ||
| 82 | 84 | ||
| 83 | dev_dependencies: | 85 | dev_dependencies: |
| 84 | flutter_test: | 86 | flutter_test: |
| 85 | sdk: flutter | 87 | sdk: flutter |
| 86 | 88 | ||
| 87 | json_model: ^0.0.2 | 89 | json_model: ^0.0.2 |
| 90 | + | ||
| 88 | build_runner: ^1.0.0 | 91 | build_runner: ^1.0.0 |
| 89 | json_serializable: ^2.0.0 | 92 | json_serializable: ^2.0.0 |
| 90 | 93 |
-
Please register or login to post a comment