forked from kookmin-sw/cap-template
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
#173 online button
- Loading branch information
Showing
7 changed files
with
153 additions
and
32 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
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,24 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class MyCafeModel extends ChangeNotifier { | ||
String? cafeId; | ||
String? latitude; | ||
String? longitude; | ||
|
||
MyCafeModel({ | ||
this.cafeId, | ||
this.latitude, | ||
this.longitude, | ||
}); | ||
|
||
void setMyCafe({ | ||
required String cafeId, | ||
required String latitude, | ||
required String longitude, | ||
}) { | ||
this.cafeId = cafeId; | ||
this.latitude = latitude; | ||
this.longitude = longitude; | ||
notifyListeners(); | ||
} | ||
} |
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
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
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
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,53 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:frontend/widgets/button/bottom_two_buttons.dart'; | ||
|
||
class YesOrNoDialog extends StatelessWidget { | ||
final String content; | ||
final String firstButton; | ||
final String secondButton; | ||
final Function handleFirstClick; | ||
final Function handleSecondClick; | ||
|
||
const YesOrNoDialog({ | ||
super.key, | ||
required this.content, | ||
required this.firstButton, | ||
required this.secondButton, | ||
required this.handleFirstClick, | ||
required this.handleSecondClick, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Dialog( | ||
backgroundColor: Colors.white, | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(20), | ||
), | ||
child: Container( | ||
padding: const EdgeInsets.all(20), | ||
width: 300, | ||
height: 200, | ||
child: Column( | ||
children: [ | ||
const SizedBox( | ||
height: 15, | ||
), | ||
Text( | ||
content, | ||
textAlign: TextAlign.center, | ||
style: const TextStyle(fontSize: 20), | ||
), | ||
const Expanded(child: SizedBox()), | ||
BottomTwoButtonsSmall( | ||
first: "확인", | ||
second: "취소", | ||
handleFirstClick: handleFirstClick, | ||
handleSecondClick: handleSecondClick, | ||
), | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} |
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