update location permission

This commit is contained in:
Mohamed Nouffer
2022-12-22 14:06:02 +05:30
parent 3c3740bc6a
commit 6a4d4b5033
4 changed files with 49 additions and 9 deletions

View File

@ -12,6 +12,34 @@ class PermissionHandlerScreen extends StatefulWidget {
class _PermissionHandlerScreenState extends State<PermissionHandlerScreen> {
Future<void> _showMyDialog() async {
return showDialog<void>(
context: context,
barrierDismissible: false, // user must tap button!
builder: (BuildContext context) {
return AlertDialog(
title: const Text('ロケーション許可'),
content: SingleChildScrollView(
child: ListBody(
children: const <Widget>[
Text( 'このアプリでは、位置情報の収集を行います。'),
Text( 'このアプリでは、開始時点で位置情報を収集します。'),
],
),
),
actions: <Widget>[
TextButton(
child: const Text('わかった'),
onPressed: () {
Navigator.of(context).pop();
},
),
],
);
},
);
}
@override
void initState() {
// TODO: implement initState
@ -33,6 +61,9 @@ class _PermissionHandlerScreenState extends State<PermissionHandlerScreen> {
// MaterialPageRoute(builder: (context) => SplashScreen()),
// );
}
else{
_showMyDialog();
}
}
},
);

View File

@ -1,4 +1,3 @@
import 'dart:ffi';
import 'package:flutter/material.dart';
import 'package:geojson/geojson.dart';
import 'package:get/get.dart';