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