Destination controller から Location controller へGPS信号シミュレーションを変更
This commit is contained in:
@ -1,26 +1,26 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:rogapp/widgets/GameState/Colors.dart';
|
||||
import 'package:rogapp/pages/destination/destination_controller.dart';
|
||||
import 'package:rogapp/widgets/custom_icons.dart';
|
||||
import 'package:rogapp/utils/location_controller.dart';
|
||||
|
||||
enum GPSStatus { high, middle, low }
|
||||
|
||||
class GpsSignalStrengthIndicator extends StatelessWidget {
|
||||
final DestinationController destinationController; // = Get.find<DestinationController>();
|
||||
LocationController locationController;
|
||||
final bool minimized;
|
||||
|
||||
// コンストラクタにminimizedパラメータを追加し、デフォルト値をfalseに設定
|
||||
const GpsSignalStrengthIndicator({
|
||||
GpsSignalStrengthIndicator({
|
||||
Key? key,
|
||||
required this.destinationController,
|
||||
required this.locationController,
|
||||
this.minimized = false, // ここでデフォルト値を指定
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// final LocationController locationController = Get.find<LocationController>();
|
||||
return Obx(() {
|
||||
final signalStrength = destinationController.getGpsSignalStrength();
|
||||
String signalStrength = locationController.latestSignalStrength;
|
||||
print("signalStrength=${signalStrength}");
|
||||
IconData iconData;
|
||||
Color backgroundColor;
|
||||
String text;
|
||||
|
||||
Reference in New Issue
Block a user