updated for tag text
This commit is contained in:
@ -9,6 +9,28 @@ import 'package:rogapp/pages/index/index_controller.dart';
|
||||
import 'package:rogapp/services/external_service.dart';
|
||||
import 'package:rogapp/utils/const.dart';
|
||||
|
||||
String getTagText(bool isRecept, String? tags) {
|
||||
if (tags == null || tags.isEmpty) {
|
||||
return "";
|
||||
}
|
||||
List<String> tts = tags.split(" ");
|
||||
List<String> ttt = tags.split(" ");
|
||||
if (isRecept) {
|
||||
if (ttt.length > tts.length && ttt.length > 1) {
|
||||
return ttt[1];
|
||||
}
|
||||
}
|
||||
if (!isRecept) {
|
||||
if (ttt.length > tts.length && ttt.length > 1) {
|
||||
return ttt[0];
|
||||
}
|
||||
}
|
||||
if (!isRecept) {
|
||||
return tts[0];
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
Image getDisplayImage(Destination destination) {
|
||||
String serverUrl = ConstValues.currentServer();
|
||||
|
||||
@ -257,6 +279,7 @@ class CameraPage extends StatelessWidget {
|
||||
//print("--- buy point camera ${destination.toString()}");
|
||||
return BuyPointCamera(destination: destination);
|
||||
} else if (destinationController.isInRog.value) {
|
||||
//print("-----tags camera page----- ${destination.tags}");
|
||||
//print("--- in normal camera ${destination.toString()}");
|
||||
return Scaffold(
|
||||
appBar: destinationController.isInRog.value &&
|
||||
@ -305,11 +328,15 @@ class CameraPage extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: Obx(() => destinationController.photos.isEmpty == true
|
||||
? const Text("撮影してチェックインしてください。")
|
||||
: const Text("チェックインをタップしてください。")),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: Text(getTagText(
|
||||
false,
|
||||
destination.tags,
|
||||
))
|
||||
// child: Obx(() => destinationController.photos.isEmpty == true
|
||||
// ? const Text("撮影してチェックインしてください。")
|
||||
// : const Text("チェックインをタップしてください。")),
|
||||
),
|
||||
getAction(context),
|
||||
],
|
||||
),
|
||||
@ -432,9 +459,9 @@ class BuyPointCamera extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
const Padding(
|
||||
padding: EdgeInsets.all(8.0),
|
||||
child: Text("次にレシート撮影を行います。"),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(getTagText(true, destination.tags)),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
|
||||
Reference in New Issue
Block a user