Skip to content

Commit

Permalink
#73 이용약관 동의 체크박스 확인 조건문 수정, 지도 권한 확인 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
latteishorse committed Aug 3, 2022
1 parent 66d9018 commit 594663f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/screens/init/signup.dart
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class _SignupPageState extends State<SignupPage> {
}

checktext() {
return Center(child: Text('미동의시 서비스 이용이 제한됩니다.'));
return Center(child: Text('미동의시 서비스 이용이 제한될 수 있습니다'));
}

signupDecoration(labelText) {
Expand Down Expand Up @@ -278,6 +278,8 @@ class _SignupPageState extends State<SignupPage> {
errorDialog('유효하지 않은 전화번호입니다.\n -을 제외한 11자리 번호만 입력해주세요!');
} else if (isChecked == false) {
errorDialog('서비스 이용약관 및 개인정보 처리방침에 동의해주세요.');
} else if (isuserChecked == false) {
errorDialog('서비스 이용약관 및 개인정보 처리방침에 동의해주세요.');
} else {
print('Trying to POST signup. . . ');
if (await postUser(accountName, password, phoneNumber) ==
Expand Down
16 changes: 16 additions & 0 deletions lib/screens/map/map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import 'dart:convert';
import 'package:geolocator/geolocator.dart';
import 'dart:async';

import 'package:permission_handler/permission_handler.dart';
//
// import '../sharing/sharing_accept_page.dart';
import '../../providers/bottomBar.dart';
Expand All @@ -33,6 +34,19 @@ class _CurrentLocationScreenState extends State<CurrentLocationScreen> {

var loginID;

checkPermissions() async {
Map<Permission, PermissionStatus> statuses = await [
// Permission.bluetooth,
Permission.bluetooth,
Permission.bluetoothAdvertise,
Permission.bluetoothConnect,
Permission.bluetoothScan,
Permission.location,
Permission.storage,
//add more permission to request here.
].request();
}

// var myId;
// var latt;
// var longg;
Expand Down Expand Up @@ -154,6 +168,8 @@ class _CurrentLocationScreenState extends State<CurrentLocationScreen> {

@override
Widget build(BuildContext context) {
checkPermissions();

return Scaffold(
appBar: AppBar(
title: Text(
Expand Down

0 comments on commit 594663f

Please sign in to comment.