ほぼ完成:QRcodeトライ
This commit is contained in:
@ -90,21 +90,40 @@ class EntryDetailPage extends GetView<EntryController> {
|
||||
},
|
||||
),
|
||||
SizedBox(height: 32),
|
||||
ElevatedButton(
|
||||
child: Text(mode == 'new' ? 'エントリーを作成' : 'エントリーを更新'),
|
||||
onPressed: () {
|
||||
if (mode == 'new') {
|
||||
controller.createEntry();
|
||||
} else {
|
||||
controller.updateEntry();
|
||||
}
|
||||
},
|
||||
),
|
||||
if (mode == 'edit' && controller.isOwner())
|
||||
if (mode == 'new')
|
||||
ElevatedButton(
|
||||
child: Text('エントリーを削除'),
|
||||
onPressed: () => controller.deleteEntry(),
|
||||
style: ElevatedButton.styleFrom(backgroundColor: Colors.red),
|
||||
child: Text('エントリーを作成'),
|
||||
onPressed: () => controller.createEntry(),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Colors.blue,
|
||||
minimumSize: Size(double.infinity, 50),
|
||||
),
|
||||
)
|
||||
else
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ElevatedButton(
|
||||
child: Text('エントリーを削除'),
|
||||
onPressed: () => controller.deleteEntry(),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Colors.red,
|
||||
minimumSize: Size(0, 50),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 16),
|
||||
Expanded(
|
||||
child: ElevatedButton(
|
||||
child: Text('エントリーを更新'),
|
||||
onPressed: () => controller.updateEntry(),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Colors.lightBlue,
|
||||
minimumSize: Size(0, 50),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user