-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
9 changed files
with
158 additions
and
38 deletions.
There are no files selected for viewing
Binary file not shown.
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,43 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class CustomLetterArea extends StatelessWidget { | ||
final String hint; | ||
final TextEditingController controller; | ||
final funvalidator; | ||
final String? value; | ||
|
||
const CustomLetterArea({ | ||
super.key, | ||
required this.hint, | ||
required this.controller, | ||
required this.funvalidator, | ||
this.value, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Padding( | ||
padding: const EdgeInsets.symmetric(vertical: 5.0), | ||
child: TextFormField( | ||
controller: controller, | ||
maxLines: null, | ||
expands: true, | ||
decoration: InputDecoration( | ||
hintText: "$hint을(를) 입력하세요", | ||
enabledBorder: OutlineInputBorder( | ||
borderRadius: BorderRadius.circular(20), | ||
), | ||
focusedBorder: OutlineInputBorder( | ||
borderRadius: BorderRadius.circular(20), | ||
), | ||
errorBorder: OutlineInputBorder( | ||
borderRadius: BorderRadius.circular(20), | ||
), | ||
focusedErrorBorder: OutlineInputBorder( | ||
borderRadius: BorderRadius.circular(20), | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
unibond/lib/view/widgets/custom_letter_elevated_button.dart
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,28 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class CustomLetterElevatedButton extends StatelessWidget { | ||
final String text; | ||
final Null Function() funPageRoute; | ||
|
||
const CustomLetterElevatedButton({ | ||
Key? key, | ||
required this.text, | ||
required this.funPageRoute, | ||
}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return ElevatedButton( | ||
style: ElevatedButton.styleFrom( | ||
minimumSize: const Size(double.infinity, 50), | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(20), | ||
), | ||
backgroundColor: Colors.blue, | ||
foregroundColor: Colors.white, | ||
), | ||
onPressed: funPageRoute, | ||
child: Text("$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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class CustomLetterFormField extends StatelessWidget { | ||
final String hint; | ||
final TextEditingController controller; | ||
final funvalidator; | ||
final String? value; | ||
|
||
const CustomLetterFormField({ | ||
super.key, | ||
required this.hint, | ||
required this.controller, | ||
required this.funvalidator, | ||
this.value, | ||
required InputDecoration decoration, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Padding( | ||
padding: const EdgeInsets.symmetric(vertical: 5.0), | ||
child: TextFormField( | ||
initialValue: value ?? "", | ||
validator: funvalidator, | ||
controller: controller, | ||
decoration: InputDecoration( | ||
// ignore: unnecessary_string_interpolations | ||
hintText: hint == "이메일" ? "$hint을 입력하세요" : "$hint를 입력하세요", | ||
enabledBorder: OutlineInputBorder( | ||
borderRadius: BorderRadius.circular(20), | ||
), | ||
focusedBorder: OutlineInputBorder( | ||
borderRadius: BorderRadius.circular(20), | ||
), | ||
errorBorder: OutlineInputBorder( | ||
borderRadius: BorderRadius.circular(20), | ||
), | ||
focusedErrorBorder: OutlineInputBorder( | ||
borderRadius: BorderRadius.circular(20), | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |
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