generated from jwson-automation/blueberry_template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
75991e1
commit a1a4f85
Showing
2 changed files
with
64 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import 'dart:io'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_riverpod/flutter_riverpod.dart'; | ||
import 'ImageImporter.dart'; | ||
|
||
class ImageConfirmationDialog extends StatelessWidget { | ||
final File imageFile; | ||
final WidgetRef ref; | ||
|
||
const ImageConfirmationDialog({ | ||
Key? key, | ||
required this.imageFile, | ||
required this.ref, | ||
}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Dialog( | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(10), | ||
), | ||
child: Column( | ||
mainAxisSize: MainAxisSize.min, | ||
children: [ | ||
Image.file( | ||
imageFile, | ||
fit: BoxFit.cover, | ||
), | ||
Padding( | ||
padding: const EdgeInsets.all(16.0), | ||
child: Text( | ||
'이 사진을 사용하시겠습니까?', | ||
style: TextStyle( | ||
fontSize: 18, | ||
fontWeight: FontWeight.bold, | ||
), | ||
), | ||
), | ||
Row( | ||
mainAxisAlignment: MainAxisAlignment.spaceEvenly, | ||
children: [ | ||
ElevatedButton( | ||
onPressed: () { | ||
Navigator.of(context).pop(); | ||
ref.read(imageFileProvider.notifier).clearImage(); | ||
}, | ||
child: Text('다시 선택'), | ||
), | ||
ElevatedButton( | ||
onPressed: () { | ||
Navigator.of(context).pop(); | ||
ref.read(imageFileProvider.notifier).state = imageFile; | ||
}, | ||
child: Text('사용'), | ||
), | ||
], | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters