Merge branch 'master' into release

hmxc
张萌 4 years ago
commit f72d5c2b9f

@ -5,6 +5,8 @@
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:name="io.flutter.app.FlutterApplication" android:label="小蜜蜂智慧社区" android:icon="@mipmap/logo" android:networkSecurityConfig="@xml/network_security_config"> <application android:name="io.flutter.app.FlutterApplication" android:label="小蜜蜂智慧社区" android:icon="@mipmap/logo" android:networkSecurityConfig="@xml/network_security_config">
<meta-data android:name="com.amap.api.v2.apikey"
android:value="ee697f99e8381b7efde08b9976052bd0"/>
<activity android:name=".MainActivity" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize"> <activity android:name=".MainActivity" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as <!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user the Android process has started. This theme is visible to the user
@ -17,6 +19,7 @@
gap between the end of Android's launch screen and the painting of gap between the end of Android's launch screen and the painting of
Flutter's first frame. --> Flutter's first frame. -->
<meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" android:resource="@drawable/launch_background" /> <meta-data android:name="io.flutter.embedding.android.SplashScreenDrawable" android:resource="@drawable/launch_background" />
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>
@ -26,6 +29,18 @@
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data android:name="flutterEmbedding" android:value="2" /> <meta-data android:name="flutterEmbedding" android:value="2" />
</application> </application>
<!--允许程序打开网络套接字-->
<uses-permission android:name="android.permission.INTERNET" />
<!--允许程序设置内置sd卡的写权限-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!--允许程序获取网络状态-->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!--允许程序访问WiFi网络信息-->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!--允许程序读写手机状态和身份-->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<!--允许程序访问CellID或WiFi热点来获取粗略的位置-->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<!-- 保存照片到相册 --> <!-- 保存照片到相册 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- 打开相册选取图片 --> <!-- 打开相册选取图片 -->

@ -1 +1 @@
de6ad1e9bb4f0c60a77292d2bb839254 36d97e3e1483892c0e0296e4c06bf36f

@ -1,4 +1,33 @@
PODS: PODS:
- AMap3DMap-NO-IDFA (7.6.0):
- AMapFoundation-NO-IDFA (~> 1.6.3)
- amap_core_fluttify (0.0.1):
- AMapFoundation-NO-IDFA (~> 1.6.4)
- Flutter
- foundation_fluttify
- amap_location_fluttify (0.0.1):
- amap_core_fluttify
- AMapLocation-NO-IDFA (= 2.6.7)
- Flutter
- foundation_fluttify
- amap_map_fluttify (0.0.1):
- AMap3DMap-NO-IDFA (= 7.6.0)
- amap_core_fluttify
- amap_location_fluttify
- amap_search_fluttify
- Flutter
- foundation_fluttify
- url_launcher
- amap_search_fluttify (0.0.1):
- amap_core_fluttify
- AMapSearch-NO-IDFA (~> 7.3.0)
- Flutter
- foundation_fluttify
- AMapFoundation-NO-IDFA (1.6.4)
- AMapLocation-NO-IDFA (2.6.7):
- AMapFoundation-NO-IDFA (~> 1.6.4)
- AMapSearch-NO-IDFA (7.3.0):
- AMapFoundation-NO-IDFA (~> 1.6.3)
- barcode_scan (0.0.1): - barcode_scan (0.0.1):
- Flutter - Flutter
- MTBBarcodeScanner - MTBBarcodeScanner
@ -8,12 +37,18 @@ PODS:
- BSGridCollectionViewLayout (= 1.2.5) - BSGridCollectionViewLayout (= 1.2.5)
- BSImageView (= 1.0.3) - BSImageView (= 1.0.3)
- BSImageView (1.0.3) - BSImageView (1.0.3)
- core_location_fluttify (0.0.1):
- Flutter
- foundation_fluttify
- Flutter (1.0.0) - Flutter (1.0.0)
- flutter_pdfview (1.0.2): - fluwx (0.0.1):
- Flutter - Flutter
- WechatOpenSDK (= 1.8.7.1)
- FMDB (2.7.5): - FMDB (2.7.5):
- FMDB/standard (= 2.7.5) - FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5) - FMDB/standard (2.7.5)
- foundation_fluttify (0.0.1):
- Flutter
- MTBBarcodeScanner (5.0.11) - MTBBarcodeScanner (5.0.11)
- multi_image_picker (4.7.14): - multi_image_picker (4.7.14):
- BSImagePicker (~> 2.10.3) - BSImagePicker (~> 2.10.3)
@ -40,11 +75,18 @@ PODS:
- Flutter - Flutter
- webview_flutter (0.0.1): - webview_flutter (0.0.1):
- Flutter - Flutter
- WechatOpenSDK (1.8.7.1)
DEPENDENCIES: DEPENDENCIES:
- amap_core_fluttify (from `.symlinks/plugins/amap_core_fluttify/ios`)
- amap_location_fluttify (from `.symlinks/plugins/amap_location_fluttify/ios`)
- amap_map_fluttify (from `.symlinks/plugins/amap_map_fluttify/ios`)
- amap_search_fluttify (from `.symlinks/plugins/amap_search_fluttify/ios`)
- barcode_scan (from `.symlinks/plugins/barcode_scan/ios`) - barcode_scan (from `.symlinks/plugins/barcode_scan/ios`)
- core_location_fluttify (from `.symlinks/plugins/core_location_fluttify/ios`)
- Flutter (from `Flutter`) - Flutter (from `Flutter`)
- flutter_pdfview (from `.symlinks/plugins/flutter_pdfview/ios`) - fluwx (from `.symlinks/plugins/fluwx/ios`)
- foundation_fluttify (from `.symlinks/plugins/foundation_fluttify/ios`)
- multi_image_picker (from `.symlinks/plugins/multi_image_picker/ios`) - multi_image_picker (from `.symlinks/plugins/multi_image_picker/ios`)
- package_info (from `.symlinks/plugins/package_info/ios`) - package_info (from `.symlinks/plugins/package_info/ios`)
- path_provider (from `.symlinks/plugins/path_provider/ios`) - path_provider (from `.symlinks/plugins/path_provider/ios`)
@ -59,20 +101,37 @@ DEPENDENCIES:
SPEC REPOS: SPEC REPOS:
trunk: trunk:
- AMap3DMap-NO-IDFA
- AMapFoundation-NO-IDFA
- AMapLocation-NO-IDFA
- AMapSearch-NO-IDFA
- BSGridCollectionViewLayout - BSGridCollectionViewLayout
- BSImagePicker - BSImagePicker
- BSImageView - BSImageView
- FMDB - FMDB
- MTBBarcodeScanner - MTBBarcodeScanner
- SwiftProtobuf - SwiftProtobuf
- WechatOpenSDK
EXTERNAL SOURCES: EXTERNAL SOURCES:
amap_core_fluttify:
:path: ".symlinks/plugins/amap_core_fluttify/ios"
amap_location_fluttify:
:path: ".symlinks/plugins/amap_location_fluttify/ios"
amap_map_fluttify:
:path: ".symlinks/plugins/amap_map_fluttify/ios"
amap_search_fluttify:
:path: ".symlinks/plugins/amap_search_fluttify/ios"
barcode_scan: barcode_scan:
:path: ".symlinks/plugins/barcode_scan/ios" :path: ".symlinks/plugins/barcode_scan/ios"
core_location_fluttify:
:path: ".symlinks/plugins/core_location_fluttify/ios"
Flutter: Flutter:
:path: Flutter :path: Flutter
flutter_pdfview: fluwx:
:path: ".symlinks/plugins/flutter_pdfview/ios" :path: ".symlinks/plugins/fluwx/ios"
foundation_fluttify:
:path: ".symlinks/plugins/foundation_fluttify/ios"
multi_image_picker: multi_image_picker:
:path: ".symlinks/plugins/multi_image_picker/ios" :path: ".symlinks/plugins/multi_image_picker/ios"
package_info: package_info:
@ -97,13 +156,23 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/webview_flutter/ios" :path: ".symlinks/plugins/webview_flutter/ios"
SPEC CHECKSUMS: SPEC CHECKSUMS:
AMap3DMap-NO-IDFA: 5e5b483ef230d1bed6c8d989d36254a66c67a6fc
amap_core_fluttify: 832331914f028c32aebf1dab23474a82aff828e8
amap_location_fluttify: baa3007e3f215456ab2ea2f4ccccf5bc1a9a164b
amap_map_fluttify: 6b64256d6ccea7813e1b6423fcf7b5ef10d3c984
amap_search_fluttify: f83f950b4f8e8688bc8b100684c33868335f2e06
AMapFoundation-NO-IDFA: 68a24362b110b8e0a3677605d0fd36bdf521f2bb
AMapLocation-NO-IDFA: 2a3edfee336b38481b892e1ecc85df0f6b365851
AMapSearch-NO-IDFA: 85555dc9ba312949d39a259baa4ef4e0619fa944
barcode_scan: a5c27959edfafaa0c771905bad0b29d6d39e4479 barcode_scan: a5c27959edfafaa0c771905bad0b29d6d39e4479
BSGridCollectionViewLayout: 333dcb457a5a3bdd9212607ab5756553dcfe06cb BSGridCollectionViewLayout: 333dcb457a5a3bdd9212607ab5756553dcfe06cb
BSImagePicker: 07404254f2fcdaf5a2eb403c0f8c337267ce8738 BSImagePicker: 07404254f2fcdaf5a2eb403c0f8c337267ce8738
BSImageView: a149459433a2687157d034c78e059d30ac7f2544 BSImageView: a149459433a2687157d034c78e059d30ac7f2544
core_location_fluttify: 9466a411ea7d22c6349c7e6a767ae4623f01eb1d
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
flutter_pdfview: 25f53dd6097661e6395b17de506e6060585946bd fluwx: 07a55ed66bf3a4961e836a2a411b02dcada32902
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
foundation_fluttify: 0c45145e3fad1fb99188e4979daed5b24cd9b278
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
multi_image_picker: c068931d08240565e0615fb01437d16984909183 multi_image_picker: c068931d08240565e0615fb01437d16984909183
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
@ -117,6 +186,7 @@ SPEC CHECKSUMS:
video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e
wakelock: 0d4a70faf8950410735e3f61fb15d517c8a6efc4 wakelock: 0d4a70faf8950410735e3f61fb15d517c8a6efc4
webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96 webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96
WechatOpenSDK: 6a4d1436c15b3b5fe2a0bd383f3046010186da44
PODFILE CHECKSUM: a75497545d4391e2d394c3668e20cfb1c2bbd4aa PODFILE CHECKSUM: a75497545d4391e2d394c3668e20cfb1c2bbd4aa

@ -139,6 +139,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */, 9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
7B444912F8858E461E3F47D9 /* [CP] Embed Pods Frameworks */, 7B444912F8858E461E3F47D9 /* [CP] Embed Pods Frameworks */,
0817DB8E3F8D6FF182439CE0 /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
); );
@ -197,6 +198,23 @@
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
0817DB8E3F8D6FF182439CE0 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;

@ -1,6 +1,7 @@
import 'dart:io'; import 'dart:io';
import 'package:akuCommunity/pages/sign/sign_in_page.dart'; import 'package:akuCommunity/pages/sign/sign_in_page.dart';
import 'package:amap_map_fluttify/amap_map_fluttify.dart';
import 'package:ani_route/ani_route.dart'; import 'package:ani_route/ani_route.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -14,7 +15,9 @@ import 'package:oktoast/oktoast.dart';
import 'package:akuCommunity/routers/router_init.dart'; import 'package:akuCommunity/routers/router_init.dart';
void main() { void main() {
WidgetsFlutterBinding.ensureInitialized();
ARoute.init(true); ARoute.init(true);
AmapLocation.instance.init(iosKey: 'ios key');
runApp(MyApp()); runApp(MyApp());
} }

@ -7,7 +7,6 @@ import 'widget/goods_app_bar.dart';
import 'widget/product_swiper.dart'; import 'widget/product_swiper.dart';
import 'widget/product_content.dart'; import 'widget/product_content.dart';
import 'widget/product_service.dart'; import 'widget/product_service.dart';
import 'widget/product_specs.dart';
import 'widget/product_evaluate.dart'; import 'widget/product_evaluate.dart';
import 'widget/product_detail.dart'; import 'widget/product_detail.dart';
import 'widget/goods_details_bottom_bar.dart'; import 'widget/goods_details_bottom_bar.dart';

@ -1,3 +1,7 @@
import 'package:akuCommunity/pages/confirm_order_page/confirm_order_page.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:ani_route/ani_route.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -40,7 +44,7 @@ class MarketCartBottomBar extends StatelessWidget {
); );
} }
Widget _settlement(CartProvidde model) { Widget _settlement(CartProvidde model,BuildContext context) {
return Row( return Row(
children: [ children: [
model.allPrice != 0 model.allPrice != 0
@ -94,7 +98,7 @@ class MarketCartBottomBar extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
_selectAll(model), _selectAll(model),
_settlement(model), _settlement(model,context,)
], ],
), ),
); );

@ -1,263 +0,0 @@
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:sliding_up_panel/sliding_up_panel.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:latlong/latlong.dart';
import 'package:akuCommunity/utils/screenutil.dart';
import 'package:akuCommunity/widget/common_app_bar.dart';
class OneAlarmPage extends StatefulWidget {
OneAlarmPage({Key key}) : super(key: key);
@override
_OneAlarmPageState createState() => _OneAlarmPageState();
}
class _OneAlarmPageState extends State<OneAlarmPage> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: PreferredSize(
child: CommonAppBar(
title: '一键报警',
subtitle: '功能说明',
),
preferredSize: Size.fromHeight(kToolbarHeight),
),
body: Stack(
alignment: Alignment.topCenter,
children: <Widget>[
SlidingUpPanel(
maxHeight: Screenutil.length(271),
minHeight: Screenutil.length(271),
parallaxOffset: .5,
panelSnapping: false,
body: _body(),
panelBuilder: (sc) => _panel(sc),
),
Positioned(
right: Screenutil.length(34),
bottom: Screenutil.length(304),
child: InkWell(
child: Container(
height: Screenutil.length(66),
width: Screenutil.length(66),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(Screenutil.length(66)),
boxShadow: <BoxShadow>[
BoxShadow(
color: Color(0xff000000).withOpacity(0.12),
offset: Offset(1, 1))
],
),
child: Icon(
Icons.gps_fixed,
size: Screenutil.length(44),
color: Color(0xff666666),
),
),
),
),
Positioned(
top: Screenutil.length(32),
child: Container(
width: Screenutil.length(686),
padding: EdgeInsets.only(
top: Screenutil.length(24),
bottom: Screenutil.length(24),
left: Screenutil.length(32),
),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.9),
borderRadius: BorderRadius.circular(12),
boxShadow: <BoxShadow>[
BoxShadow(
color: Color(0xff5C5959).withOpacity(0.2),
offset: Offset(1, 1))
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"当前位置(仅供参考)",
style: TextStyle(
fontWeight: FontWeight.w600,
color: Color(0xff333333),
fontSize: Screenutil.size(28),
),
),
Container(
margin: EdgeInsets.only(top: Screenutil.length(20)),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Icon(
Entypo.location_pin,
color: Color(0xff666666),
size: Screenutil.size(28),
),
Container(
margin: EdgeInsets.only(left: Screenutil.length(10)),
child: Text(
"广东省深圳市龙岗区吉信街22-1附近",
style: TextStyle(
color: Color(0xff666666),
fontSize: Screenutil.size(28),
),
),
),
],
),
),
],
),
),
),
],
),
);
}
Widget _panel(ScrollController sc) {
return MediaQuery.removePadding(
context: context,
removeTop: true,
child: Stack(
overflow: Overflow.visible,
children: [
ListView(
controller: sc,
children: [
Container(
margin: EdgeInsets.only(top: Screenutil.length(146)),
width: MediaQuery.of(context).size.width,
alignment: Alignment.center,
child: Text(
'谎报警情,依法追责',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: Screenutil.size(32),
color: Color(0xffe02020),
),
),
),
Container(
margin: EdgeInsets.only(top: Screenutil.length(8)),
width: MediaQuery.of(context).size.width,
alignment: Alignment.center,
child: Text(
'谎报警情将可能被处以五日以上十日以下拘留',
style: TextStyle(
fontSize: Screenutil.size(24),
color: Color(0xff999999),
),
),
),
],
),
Positioned(
top: -Screenutil.length(98),
width: MediaQuery.of(context).size.width,
child: Center(
child: Container(
padding: EdgeInsets.all(Screenutil.length(12)),
height: Screenutil.length(196),
width: Screenutil.length(196),
decoration: BoxDecoration(
color: Colors.white,
borderRadius:
BorderRadius.all(Radius.circular(Screenutil.length(196))),
),
child: Container(
height: Screenutil.length(172),
width: Screenutil.length(172),
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.bottomLeft,
end: Alignment.topLeft,
colors: [Color(0xffef0909), Color(0xffff8880)],
),
borderRadius: BorderRadius.all(
Radius.circular(Screenutil.length(172))),
boxShadow: <BoxShadow>[
BoxShadow(
color: Color(0xfffd7770).withOpacity(0.33),
offset: Offset(0, Screenutil.length(10)),
blurRadius: Screenutil.length(20),
spreadRadius: Screenutil.length(4),
)
],
),
child: Icon(
Feather.phone_call,
color: Colors.white,
size: Screenutil.size(87),
),
),
),
),
),
],
),
);
}
Widget _button(String label, IconData icon, Color color) {
return Column(
children: <Widget>[
Container(
padding: const EdgeInsets.all(16.0),
child: Icon(
icon,
color: Colors.white,
),
decoration:
BoxDecoration(color: color, shape: BoxShape.circle, boxShadow: [
BoxShadow(
color: Color.fromRGBO(0, 0, 0, 0.15),
blurRadius: 8.0,
)
]),
),
SizedBox(
height: 12.0,
),
Text(label),
],
);
}
Widget _body() {
return FlutterMap(
options: MapOptions(
center: LatLng(22.3817, 114.05),
zoom: 13,
maxZoom: 15,
),
layers: [
TileLayerOptions(
urlTemplate: "http://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineCommunity/MapServer/tile/{z}/{y}/{x}",
),
MarkerLayerOptions(markers: [
Marker(
point: LatLng(22.3817, 114.05),
builder: (ctx) => Icon(
Icons.location_on,
color: Colors.blue,
size: 48.0,
),
height: 60),
]),
],
);
}
}

@ -0,0 +1,268 @@
import 'package:akuCommunity/utils/screenutil.dart';
import 'package:akuCommunity/widget/common_app_bar.dart';
import 'package:flutter/material.dart';
import 'package:amap_map_fluttify/amap_map_fluttify.dart';
import 'package:amap_location_fluttify/amap_location_fluttify.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:url_launcher/url_launcher.dart';
class PermissionUtil {
static Future<bool> getLocationPermission() async {
return await Permission.locationWhenInUse.request().isGranted;
}
}
class AlarmPage extends StatefulWidget {
AlarmPage({Key key, bundle}) : super(key: key);
@override
_AlarmPageState createState() => _AlarmPageState();
}
class _AlarmPageState extends State<AlarmPage> {
final _option = MyLocationOption(
show: true,
myLocationType: MyLocationType.Locate,
);
Future<void> _makephonenum(String url)async{
(await canLaunch(url))?await launch(url):throw 'Could not launch $url';
}
AmapController _amapController;
Location _location;
@override
void initState() {
super.initState();
AmapLocation.instance.fetchLocation().then((location) {
_location = location;
setState(() {});
});
PermissionUtil.getLocationPermission();
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: PreferredSize(
child: CommonAppBar(
title: '一键报警',
subtitle: '功能说明',
),
preferredSize: Size.fromHeight(kToolbarHeight),
),
body: Stack(
alignment: Alignment.topCenter,
children: [
AmapView(
onMapCreated: (controller) async {
_amapController = controller;
await _amapController.showMyLocation(_option);
},
mapType: MapType.Standard,
showZoomControl: false,
zoomLevel: 16,
),
Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
margin: EdgeInsets.only(top: Screenutil.length(32)),
width: 686.w,
height: Screenutil.length(148),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.9),
borderRadius: BorderRadius.circular(16),
boxShadow: <BoxShadow>[
BoxShadow(
color: Color(0xE8FFFFFF).withOpacity(0.10),
offset: Offset(0, 2)),
]),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: Screenutil.length(24)),
Container(
margin: EdgeInsets.only(
top: Screenutil.length(24),
left: Screenutil.length(32)),
child: Text(
'当前位置(仅供参考)',
style: TextStyle(
fontWeight: FontWeight.w600,
color: Color(0xff333333),
fontSize: Screenutil.size(28)),
),
),
Container(
margin: EdgeInsets.only(
top: Screenutil.length(20),
left: Screenutil.length(32)),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Icon(
Entypo.location_pin,
color: Color(0xff666666),
size: Screenutil.size(29),
),
Container(
margin:
EdgeInsets.only(left: Screenutil.length(5)),
child: Text(
(_location == null)
? '加载中……'
: _location.aoiName,
style: TextStyle(
color: Color(0xff666666),
fontSize: Screenutil.size(28),
),
),
),
],
),
),
],
)),
Spacer(),
Row(
children: [
Spacer(),
Container(
alignment: Alignment.center,
width: Screenutil.length(66),
height: Screenutil.length(66),
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(Screenutil.length(66)),
boxShadow: <BoxShadow>[
BoxShadow(
color: Color(0x1F000000),
offset: Offset(3, 4),
blurRadius: 6,
spreadRadius: 1,
)
]),
child: FlatButton(
padding: EdgeInsets.zero,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(Screenutil.length(66))),
color: Color(0xFFFFFFFF),
onPressed: () {
_amapController?.setCenterCoordinate(
_location.latLng);
Future.delayed(Duration(milliseconds: 500), () {
if (mounted) _amapController.setZoomLevel(16);
});
},
child: Icon(
Icons.location_searching,
size: Screenutil.length(44),
),
),
),
SizedBox(width: Screenutil.length(34)),
],
),
SizedBox(
height: Screenutil.length(29),
),
Container(
width: double.infinity,
height: Screenutil.length(271),
alignment: Alignment.center,
decoration:
BoxDecoration(color: Color(0xFFFFFFFF).withOpacity(0.9)),
child: Stack(
overflow: Overflow.visible,
alignment: Alignment.topCenter,
children: [
Positioned(
bottom: Screenutil.length(173),
child: Container(
padding: EdgeInsets.all(Screenutil.length(12)),
height: Screenutil.length(196),
width: Screenutil.length(196),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(Screenutil.length(196))),
),
child: Container(
height: Screenutil.length(172),
width: Screenutil.length(172),
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.bottomLeft,
end: Alignment.topLeft,
colors: [Color(0xffef0909), Color(0xffff8880)],
),
borderRadius: BorderRadius.all(
Radius.circular(Screenutil.length(172))),
boxShadow: <BoxShadow>[
BoxShadow(
color: Color(0xfffd7770).withOpacity(0.33),
offset: Offset(0, Screenutil.length(10)),
blurRadius: Screenutil.length(20),
spreadRadius: Screenutil.length(4),
)
],
),
child: FlatButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(
Screenutil.length(172))),
onPressed: () {
setState(() {
_makephonenum('tel:110');
});
},
child: Icon(
Feather.phone_call,
color: Colors.white,
size: Screenutil.size(87),
),
),
),
),
),
Column(
children: [
SizedBox(height: Screenutil.length(146)),
Text(
'谎报警情,依法追责',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: Screenutil.size(32),
color: Color(0xffe02020),
),
),
Spacer(),
Text(
'谎报警情将可能被处以五日以上十日以下拘留',
style: TextStyle(
fontSize: Screenutil.size(24),
color: Color(0xff999999),
),
),
SizedBox(height: 19.5),
],
),
],
),
),
],
)
],
),
);
}
}

@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter_beautiful_popup/main.dart'; import 'package:flutter_beautiful_popup/main.dart';
import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/utils/screenutil.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class ExplainTemplate extends BeautifulPopupTemplate { class ExplainTemplate extends BeautifulPopupTemplate {
@ -14,7 +15,7 @@ class ExplainTemplate extends BeautifulPopupTemplate {
@override @override
Color get primaryColor => options.primaryColor ?? Color(0xff15c0ec); Color get primaryColor => options.primaryColor ?? Color(0xff15c0ec);
@override @override
final maxWidth = Screenutil.length(400); final maxWidth = 400.w;
@override @override
final maxHeight = Screenutil.length(617); final maxHeight = Screenutil.length(617);
@override @override

@ -1,17 +1,19 @@
import 'dart:math'; import 'dart:math';
import 'dart:ui';
import 'package:akuCommunity/pages/setting_page/agreement_page/agreement_page.dart'; import 'package:akuCommunity/pages/setting_page/agreement_page/agreement_page.dart';
import 'package:akuCommunity/pages/setting_page/agreement_page/privacy_page.dart'; import 'package:akuCommunity/pages/setting_page/agreement_page/privacy_page.dart';
import 'package:akuCommunity/pages/sign/user_authentication_page.dart'; import 'package:akuCommunity/pages/sign/user_authentication_page.dart';
import 'package:ani_route/ani_route.dart'; import 'package:ani_route/ani_route.dart';
import 'package:extended_text/extended_text.dart';
import 'package:flustars/flustars.dart' show TextUtil; import 'package:flustars/flustars.dart' show TextUtil;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/utils/screenutil.dart';
import 'package:akuCommunity/base/base_style.dart'; import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/base/assets_image.dart'; import 'package:akuCommunity/base/assets_image.dart';
import 'package:flutter_screenutil/screenutil.dart';
import 'package:oktoast/oktoast.dart'; import 'package:oktoast/oktoast.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class SignInPage extends StatefulWidget { class SignInPage extends StatefulWidget {
SignInPage({Key key}) : super(key: key); SignInPage({Key key}) : super(key: key);
@ -133,19 +135,37 @@ class _SignInPageState extends State<SignInPage> {
else if (TextUtil.isEmpty(_code.text)) else if (TextUtil.isEmpty(_code.text))
showToast('密码不能为空'); showToast('密码不能为空');
else { else {
showDialog( showCupertinoDialog(
context: context, context: context,
child: Center( builder: (context) {
child: CupertinoActivityIndicator(), return CupertinoAlertDialog(
), title: Text('点击登录即表示您已阅读并同意'),
); content: Text(
Future.delayed( '''点击登录即表示您已阅读并同意《闲鱼用户服务协议》《支付服务协议》(特别是免除或限制责任、管辖等粗体下划线标注的条款)。如您不同意上述协议的任何条款,您应立即停止登录及使用本软件及服务。'''),
Duration(milliseconds: 1000 + Random().nextInt(500)), actions: [
() { CupertinoDialogAction(
Navigator.pop(context); child: Text('同意'),
(_phone.text == '17855823545') && (_code.text == '000000') onPressed: () {
? ARoute.push(context, UserAuthenticationPage()) Future.delayed(
: showToast('账号或密码错误!'); Duration(milliseconds: 1000 + Random().nextInt(500)),
() {
Navigator.pop(context);
(_phone.text == '17855823545') &&
(_code.text == '000000')
? ARoute.push(context, UserAuthenticationPage())
: showToast('账号或密码错误!');
},
);
},
),
CupertinoDialogAction(
child: Text('拒绝'),
onPressed: () {
Navigator.pop(context);
},
),
],
);
}, },
); );
} }
@ -176,7 +196,10 @@ class _SignInPageState extends State<SignInPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
double _statusHeight = MediaQuery.of(context).padding.top; double _statusHeight = MediaQuery.of(context).padding.top;
ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: true);
ScreenUtil.init(context,
designSize: Size(750, 1334), allowFontScaling: true);
return Scaffold( return Scaffold(
backgroundColor: Colors.white, backgroundColor: Colors.white,
appBar: _appBar(), appBar: _appBar(),
@ -188,53 +211,52 @@ class _SignInPageState extends State<SignInPage> {
FocusScope.of(context).requestFocus(FocusNode()); FocusScope.of(context).requestFocus(FocusNode());
}, },
child: Container( child: Container(
color: Colors.white, color: Colors.white,
child: ListView( child: ListView(
shrinkWrap: true, shrinkWrap: true,
children: [ children: [
SizedBox( SizedBox(
height: Screenutil.length(153), height: Screenutil.length(153),
),
_containerImage(),
SizedBox(height: Screenutil.length(16)),
Container(
alignment: Alignment.center,
child: Text(
'欢迎登录小蜜蜂',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: BaseStyle.fontSize38,
color: BaseStyle.color333333),
), ),
), _containerImage(),
SizedBox(height: Screenutil.length(89)), SizedBox(height: Screenutil.length(16)),
_containerTextField( Container(
AssetsImage.PHONELOGO, _phone, '请输入手机号码', false), alignment: Alignment.center,
SizedBox(height: Screenutil.length(27)), child: Text(
_containerTextField( '欢迎登录小蜜蜂',
AssetsImage.CODELOGO, _code, '请输入密码', true), style: TextStyle(
SizedBox(height: Screenutil.length(59)), fontWeight: FontWeight.w600,
_inkWellLogin(), fontSize: BaseStyle.fontSize38,
Row( color: BaseStyle.color333333),
mainAxisAlignment: MainAxisAlignment.center,
children: [
FlatButton(
onPressed: () {
ARoute.push(context, AgreementPage());
},
child: Text('用户协议'),
), ),
SizedBox(width: Screenutil.length(15)), ),
FlatButton( SizedBox(height: Screenutil.length(89)),
_containerTextField(
AssetsImage.PHONELOGO, _phone, '请输入手机号码', false),
SizedBox(height: Screenutil.length(27)),
_containerTextField(
AssetsImage.CODELOGO, _code, '请输入密码', true),
SizedBox(height: Screenutil.length(59)),
_inkWellLogin(),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
FlatButton(
onPressed: () { onPressed: () {
ARoute.push(context, PrivacyPage()); ARoute.push(context, AgreementPage());
}, },
child: Text('隐私政策')) child: Text('用户协议'),
], ),
) SizedBox(width: Screenutil.length(15)),
], FlatButton(
), onPressed: () {
), ARoute.push(context, PrivacyPage());
},
child: Text('隐私政策'))
],
),
],
)),
), ),
), ),
), ),

@ -35,7 +35,7 @@ class _TabNavigatorState extends State<TabNavigator> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: true); ScreenUtil.init(context, designSize: Size(750, 1334), allowFontScaling: true);
double iconSize = ScreenUtil().setWidth(44); double iconSize = ScreenUtil().setWidth(44);
// //
List<BottomNavigationBarItem> _bottomNav = <BottomNavigationBarItem>[ List<BottomNavigationBarItem> _bottomNav = <BottomNavigationBarItem>[

@ -1,3 +1,5 @@
import 'package:akuCommunity/pages/one_alarm/widget/alarm_page.dart';
import 'package:ani_route/ani_route.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:akuCommunity/utils/screenutil.dart'; import 'package:akuCommunity/utils/screenutil.dart';
@ -195,8 +197,7 @@ class _TotalApplicationsPageState extends State<TotalApplicationsPage> {
context, PageName.goods_manage_page.toString()); context, PageName.goods_manage_page.toString());
break; break;
case '一键报警': case '一键报警':
Navigator.pushNamed( ARoute.push(context, AlarmPage());
context, PageName.one_alarm_page.toString());
break; break;
default: default:
break; break;

@ -1,3 +1,4 @@
import 'package:akuCommunity/pages/one_alarm/widget/alarm_page.dart';
import 'package:akuCommunity/pages/setting_page/agreement_page/privacy_page.dart'; import 'package:akuCommunity/pages/setting_page/agreement_page/privacy_page.dart';
import 'package:fluro/fluro.dart'; import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -79,7 +80,6 @@ import 'package:akuCommunity/pages/market_class/market_class_page.dart';
import 'package:akuCommunity/pages/address_page/address_page.dart'; import 'package:akuCommunity/pages/address_page/address_page.dart';
import 'package:akuCommunity/pages/address_page/address_edit_page.dart'; import 'package:akuCommunity/pages/address_page/address_edit_page.dart';
import 'package:akuCommunity/pages/one_alarm/one_alarm_page.dart';
import 'package:akuCommunity/pages/fitup_manage/fitup_manage_page.dart'; import 'package:akuCommunity/pages/fitup_manage/fitup_manage_page.dart';
@ -168,6 +168,7 @@ enum PageName {
things_evaluate_page, things_evaluate_page,
agreement_page, agreement_page,
privacy_page, privacy_page,
alarm_page,
} }
class Bundle { class Bundle {
@ -346,8 +347,6 @@ final Map<PageName, PageBuilder> pageRoutes = {
PageBuilder(builder: (bundle) => AddressPage()), PageBuilder(builder: (bundle) => AddressPage()),
PageName.address_edit_page: PageName.address_edit_page:
PageBuilder(builder: (bundle) => AddressEditPage(bundle: bundle)), PageBuilder(builder: (bundle) => AddressEditPage(bundle: bundle)),
PageName.one_alarm_page:
PageBuilder(builder: (bundle) => OneAlarmPage()),
PageName.fitup_manage_page: PageName.fitup_manage_page:
PageBuilder(builder: (bundle) => FitupManagePage()), PageBuilder(builder: (bundle) => FitupManagePage()),
PageName.setting_page: PageName.setting_page:
@ -368,4 +367,6 @@ final Map<PageName, PageBuilder> pageRoutes = {
PageBuilder(builder: (bundle) => ThingsCreatePage(bundle: bundle)), PageBuilder(builder: (bundle) => ThingsCreatePage(bundle: bundle)),
PageName.things_evaluate_page: PageName.things_evaluate_page:
PageBuilder(builder: (bundle) => ThingsEvaluatePage(bundle: bundle)), PageBuilder(builder: (bundle) => ThingsEvaluatePage(bundle: bundle)),
PageName.alarm_page:
PageBuilder(builder: (bundle)=>AlarmPage(bundle:bundle),)
}; };

@ -8,6 +8,34 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "7.0.0" version: "7.0.0"
amap_core_fluttify:
dependency: transitive
description:
name: amap_core_fluttify
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.0"
amap_location_fluttify:
dependency: "direct main"
description:
name: amap_location_fluttify
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.18.0"
amap_map_fluttify:
dependency: "direct main"
description:
name: amap_map_fluttify
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.29.0"
amap_search_fluttify:
dependency: transitive
description:
name: amap_search_fluttify
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.14.0"
analyzer: analyzer:
dependency: transitive dependency: transitive
description: description:
@ -162,6 +190,13 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.1.1" version: "2.1.1"
core_location_fluttify:
dependency: transitive
description:
name: core_location_fluttify
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.4.1"
crypto: crypto:
dependency: transitive dependency: transitive
description: description:
@ -432,7 +467,7 @@ packages:
name: flutter_screenutil name: flutter_screenutil
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.3.1" version: "3.2.0"
flutter_slidable: flutter_slidable:
dependency: "direct main" dependency: "direct main"
description: description:
@ -485,6 +520,13 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "8.8.1" version: "8.8.1"
foundation_fluttify:
dependency: transitive
description:
name: foundation_fluttify
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.9.10+1"
glob: glob:
dependency: transitive dependency: transitive
description: description:

@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at # Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.4+5 version: 1.0.5+6
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"
@ -47,7 +47,7 @@ dependencies:
flutter_redux: ^0.5.3 flutter_redux: ^0.5.3
provider: ^4.1.3 provider: ^4.1.3
# 屏幕适配 # 屏幕适配
flutter_screenutil: ^2.3.1 flutter_screenutil: ^3.2.0
cupertino_icons: ^0.1.3 cupertino_icons: ^0.1.3
# 打电话等各种功能 # 打电话等各种功能
url_launcher: 5.5.2 url_launcher: 5.5.2
@ -112,6 +112,9 @@ dependencies:
flutter_picker: ^1.1.5 flutter_picker: ^1.1.5
#加载动画 #加载动画
loading_animations: ^2.1.0 loading_animations: ^2.1.0
#高德地图
amap_map_fluttify:
amap_location_fluttify:
#用户存储路径 #用户存储路径
path_provider: ^1.6.18 path_provider: ^1.6.18

Loading…
Cancel
Save