Files
rog_app/lib/widgets/category_change_dialog.dart

36 lines
1020 B
Dart

import 'package:flutter/material.dart';
import 'package:get/get.dart';
class CategoryChangeDialog extends StatelessWidget {
final String oldCategory;
final String newCategory;
const CategoryChangeDialog({
Key? key,
required this.oldCategory,
required this.newCategory,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return AlertDialog(
title: Text('カテゴリ変更の警告'),
content: Text(
'チームの構成変更により、カテゴリが $oldCategory から $newCategory に変更されます。'
'このチームは既にエントリーしています。どのように処理しますか?'
),
actions: [
TextButton(
child: Text('新しいチームを作成'),
onPressed: () => Get.back(result: true),
),
TextButton(
child: Text('既存のエントリーを更新'),
onPressed: () => Get.back(result: false),
),
],
);
}
}