Merge branch 'master' into backend_nfc
# Conflicts: # android/app/src/main/AndroidManifest.xml # lib/views/settings/setting_printer_view.dart # pubspec.lock # pubspec.yamlbackend_nfc
commit
fe9e9c5fe4
|
|
@ -9,15 +9,10 @@
|
|||
FlutterApplication and put your custom class here.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<!-- <uses-permission android:name="android.permission.BLUETOOTH_PRIVILEGED" />-->
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||
<!-- <uses-permission android:name="android.permission.ACCESS_BLUETOOTH_ADMIN" />-->
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<!-- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />-->
|
||||
|
||||
|
||||
|
||||
<application
|
||||
|
|
@ -25,12 +20,9 @@
|
|||
android:name="io.flutter.app.FlutterApplication"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="Аман Касса"
|
||||
android:allowBackup="false"
|
||||
android:roundIcon="@mipmap/ic_launcher_rounded"
|
||||
android:usesCleartextTraffic="false"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
>
|
||||
<activity android:name=".activities.BankActivity" android:theme="@android:style/Theme.Black.NoTitleBar"></activity>
|
||||
<activity android:name=".bank.M4BankActivity" android:theme="@android:style/Theme.Light.NoTitleBar"></activity>
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import 'dart:io';
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_redux/flutter_redux.dart';
|
||||
|
||||
import 'package:aman_kassa_flutter/shared/app_colors.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
|
|
@ -26,6 +25,7 @@ void main() async {
|
|||
HttpOverrides.global = MyHttpOverrides();
|
||||
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
HttpOverrides.global = MyHttpOverrides();
|
||||
//initialize locator
|
||||
await LocatorInjector.setupLocator();
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ class BottomBar extends StatelessWidget {
|
|||
currentIndex: selectedTabIndex,
|
||||
backgroundColor: menuColor,
|
||||
type: BottomNavigationBarType.shifting,
|
||||
showUnselectedLabels: true,
|
||||
items: [
|
||||
vm.mode == SettingModeKassa
|
||||
? BottomNavigationBarItem(
|
||||
|
|
|
|||
|
|
@ -164,42 +164,23 @@ class _SettingPrinterViewState extends State<SettingPrinterView> {
|
|||
//только для Android
|
||||
void _permission() async {
|
||||
if( Platform.isAndroid) {
|
||||
var statusLocation = await Permission.location.status;
|
||||
//var statusLocationAlways = await Permission.locationAlways.status;
|
||||
log.i(statusLocation);
|
||||
//log.i(statusLocationAlways);
|
||||
if (
|
||||
statusLocation.isUndetermined
|
||||
|| statusLocation.isDenied
|
||||
|| statusLocation.isPermanentlyDenied
|
||||
// || statusLocationAlways.isUndetermined
|
||||
// || statusLocationAlways.isDenied
|
||||
// || statusLocationAlways.isPermanentlyDenied
|
||||
) {
|
||||
var status = await Permission.location.status;
|
||||
log.i(status);
|
||||
if (status.isUndetermined || status.isDenied || status.isPermanentlyDenied) {
|
||||
DialogResponse response = await _dialogService.showConfirmationDialog(
|
||||
title: 'Доступ',
|
||||
description: 'Для поиска устройств Bluetooth необходимо предоставить доступ к собиру данных о местоположении.',
|
||||
description: 'Для поиска устройств Bluetooth необходимо предоставить доступ к отслеживанию геолокации.',
|
||||
cancelTitle: 'Нет',
|
||||
confirmationTitle: 'Хорошо',
|
||||
);
|
||||
if (response.confirmed) {
|
||||
|
||||
PermissionStatus location = await Permission.location
|
||||
.request();
|
||||
|
||||
if (location.isGranted ) {
|
||||
// PermissionStatus locationAlways = await Permission.locationAlways
|
||||
// .request();
|
||||
// if(locationAlways.isGranted) {
|
||||
// print('Granted');
|
||||
// } else {
|
||||
// _dialogService.showDialog(
|
||||
// description: 'Необходимо предоставить постоянный доступ к местоположении для поиска принтера, даже когда приложение закрыто или не используется.');
|
||||
// _navigatorService.pop();
|
||||
// }
|
||||
if (await Permission.location
|
||||
.request()
|
||||
.isGranted) {
|
||||
print('Granted');
|
||||
} else {
|
||||
_dialogService.showDialog(
|
||||
description: 'Необходимо предоставить доступ к местоположении для поиска принтера');
|
||||
description: 'Необходимо указать постоянный доступ к местоположении для поиска принтера');
|
||||
_navigatorService.pop();
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -428,7 +428,7 @@ packages:
|
|||
name: platform
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
version: "3.0.2"
|
||||
plugin_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -442,7 +442,7 @@ packages:
|
|||
name: process
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.2.1"
|
||||
version: "4.2.3"
|
||||
protobuf:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
name: aman_kassa_flutter
|
||||
description: A new Flutter project.
|
||||
version: 1.2.3+34
|
||||
version: 1.2.3+36
|
||||
environment:
|
||||
sdk: '>=2.3.0 <3.0.0'
|
||||
dependencies:
|
||||
|
|
|
|||
Loading…
Reference in New Issue