ログインをメアドに変更
This commit is contained in:
@ -20,6 +20,7 @@ import 'package:rogapp/pages/index/index_controller.dart';
|
||||
import 'package:rogapp/routes/app_pages.dart';
|
||||
import 'package:rogapp/utils/location_controller.dart';
|
||||
import 'package:rogapp/utils/string_values.dart';
|
||||
import 'package:rogapp/widgets/debug_widget.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
// import 'package:is_lock_screen/is_lock_screen.dart';
|
||||
|
||||
@ -127,7 +128,7 @@ void main() async {
|
||||
FlutterError.presentError(details);
|
||||
Get.log('Flutter error: ${details.exception}');
|
||||
Get.log('Stack trace: ${details.stack}');
|
||||
ErrorService.reportError(details.exception, details.stack ?? StackTrace.current, deviceInfo);
|
||||
ErrorService.reportError(details.exception, details.stack ?? StackTrace.current, deviceInfo, LogManager().operationLogs);
|
||||
};
|
||||
|
||||
//Get.put(LocationController());
|
||||
@ -153,7 +154,7 @@ void main() async {
|
||||
//runApp(const MyApp());
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Future<void> requestLocationPermission() async {
|
||||
try {
|
||||
final status = await Permission.locationAlways.request();
|
||||
@ -167,7 +168,7 @@ Future<void> requestLocationPermission() async {
|
||||
print('Error requesting location permission: $e');
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// メモリ使用量の解説:https://qiita.com/hukusuke1007/items/e4e987836412e9bc73b9
|
||||
@ -366,6 +367,11 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
||||
}
|
||||
WidgetsBinding.instance.addObserver(this);
|
||||
|
||||
// Add to clear
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
showLocationDisclosure(context);
|
||||
});
|
||||
|
||||
/*
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||
await PermissionController.checkAndRequestPermissions();
|
||||
@ -375,6 +381,45 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
||||
debugPrint("Start MyAppState...");
|
||||
}
|
||||
|
||||
void showLocationDisclosure(BuildContext context) {
|
||||
showDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: Text('位置情報の使用について'),
|
||||
content: const SingleChildScrollView(
|
||||
child: ListBody(
|
||||
children: <Widget>[
|
||||
Text('このアプリでは、以下の目的で位置情報を使用します:'),
|
||||
Text('• チェックポイントの自動チェックイン(アプリが閉じているときも含む)'),
|
||||
Text('• 移動履歴の記録(バックグラウンドでも継続)'),
|
||||
Text('• 現在地周辺の情報表示'),
|
||||
Text('\nバックグラウンドでも位置情報を継続的に取得します。'),
|
||||
Text('これにより、バッテリーの消費が増加する可能性があります。'),
|
||||
],
|
||||
),
|
||||
),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
child: const Text('同意しない'),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
// アプリを終了するなどの処理
|
||||
},
|
||||
),
|
||||
TextButton(
|
||||
child: const Text('同意する'),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
requestLocationPermission();
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
|
||||
Reference in New Issue
Block a user