generated from TaskWeaver/recommandForTeam
-
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.
Merge pull request #12 from TaskWeaver/2-dx-관련-린트-설정-제안-드립니다
2 dx 관련 린트 설정 제안 드립니다
- Loading branch information
Showing
11 changed files
with
603 additions
and
104 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,18 @@ | ||
import 'package:front/domain/presentation/home/home.dart'; | ||
import 'package:front/domain/presentation/login/email_singin.dart'; | ||
import 'package:front/domain/presentation/login/login.dart'; | ||
import 'package:front/domain/presentation/login/signIn.dart'; | ||
|
||
class RouteName { | ||
static const home = '/'; | ||
static const login = '/login'; | ||
static const signIn = '/signIn'; | ||
static const emailSignIn = '/emailSignIn'; | ||
} | ||
|
||
var nameRoutes = { | ||
RouteName.home: (context) => const HomeScreen(), | ||
RouteName.login: (context) => const LoginScreen(), | ||
RouteName.signIn: (context) => const SignInScreen(), | ||
RouteName.emailSignIn: (context) => const EmailSignInScreen(), | ||
}; |
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,18 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class HomeScreen extends StatelessWidget { | ||
const HomeScreen({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar(title: const Text('홈')), | ||
body: Center( | ||
child: ElevatedButton( | ||
onPressed: () { | ||
Navigator.pushNamed(context, '/login'); // 로그인 화면으로 이동 | ||
}, | ||
child: const Text('로그인'), | ||
))); | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
front/lib/domain/presentation/login/component/checkbox_text_row.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,27 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class CheckboxTextRow extends StatelessWidget { | ||
const CheckboxTextRow( | ||
{super.key, this.onChanged, required this.text, required this.value}); | ||
final Function(bool?)? onChanged; | ||
final bool value; | ||
final String text; | ||
@override | ||
Widget build(BuildContext context) { | ||
return Padding( | ||
padding: const EdgeInsets.fromLTRB(0, 4, 0, 4), | ||
child: Row( | ||
children: [ | ||
Checkbox(value: value, onChanged: onChanged), | ||
const SizedBox( | ||
width: 4, | ||
), | ||
Text( | ||
text, | ||
style: const TextStyle(color: Colors.black, fontSize: 12), | ||
) | ||
], | ||
), | ||
); | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
front/lib/domain/presentation/login/component/hinted_textfield.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,50 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class HintedTextField extends StatelessWidget { | ||
final String? title; | ||
final String hintText; | ||
final FormFieldSetter<String> onSaved; | ||
final FormFieldValidator<String> validator; | ||
final void Function(String?)? onChanged; | ||
const HintedTextField( | ||
{super.key, | ||
this.title, | ||
required this.hintText, | ||
required this.onSaved, | ||
required this.validator, | ||
this.onChanged}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
TextStyle textStyle = const TextStyle( | ||
fontSize: 12, | ||
color: Colors.black, | ||
); | ||
return Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
title != null | ||
? Text( | ||
title!, | ||
style: textStyle, | ||
) | ||
: Container(), | ||
Padding( | ||
padding: const EdgeInsets.fromLTRB(0, 6, 0, 6), | ||
child: TextFormField( | ||
onChanged: onChanged, | ||
onSaved: onSaved, | ||
validator: validator, | ||
decoration: InputDecoration( | ||
border: InputBorder.none, | ||
filled: true, | ||
fillColor: Colors.grey[300], | ||
hintText: hintText, | ||
hintStyle: textStyle, | ||
), | ||
), | ||
) | ||
], | ||
); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
front/lib/domain/presentation/login/component/rounded_elvatedbutton.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,32 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class RoundedElevatedButton extends StatelessWidget { | ||
const RoundedElevatedButton( | ||
{super.key, required this.text, required this.onPressed}); | ||
final String text; | ||
final VoidCallback onPressed; | ||
@override | ||
Widget build(BuildContext context) { | ||
TextStyle textStyle = const TextStyle(color: Colors.black, fontSize: 12); | ||
return SizedBox( | ||
width: double.infinity, | ||
child: ElevatedButton( | ||
onPressed: onPressed, | ||
style: ElevatedButton.styleFrom( | ||
elevation: 0, | ||
shadowColor: Colors.transparent, | ||
backgroundColor: Colors.grey[300], | ||
shape: RoundedRectangleBorder( | ||
borderRadius: BorderRadius.circular(20.0), // 원하는 둥근 모서리 반지름 값 지정 | ||
), | ||
padding: const EdgeInsets.symmetric( | ||
horizontal: 16.0, vertical: 12.0), // 원하는 패딩 값 지정 | ||
), | ||
child: Text( | ||
text, | ||
style: textStyle, | ||
), | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.