Skip to content

Commit

Permalink
Merge pull request #42 from K-shir0/fix/#34
Browse files Browse the repository at this point in the history
テキストフィールドの統合、SizedBoxをGapに変更
  • Loading branch information
K-shir0 authored Jul 29, 2021
2 parents 31aa360 + a226c2d commit 11e0895
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 160 deletions.
87 changes: 0 additions & 87 deletions lib/pages/common/alexander_not_icon_text_field.dart

This file was deleted.

5 changes: 3 additions & 2 deletions lib/pages/common/alexander_text_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class AlexanderTextField extends StatelessWidget {
final IconData iconName;
final IconData? iconName;
final String label;
final String engLabel;
final String? information;
Expand All @@ -12,7 +12,7 @@ class AlexanderTextField extends StatelessWidget {

const AlexanderTextField({
Key? key,
required this.iconName,
this.iconName,
required this.label,
required this.engLabel,
this.information,
Expand All @@ -30,6 +30,7 @@ class AlexanderTextField extends StatelessWidget {
//左上テキストラベル
Row(
children: <Widget>[
if(iconName != null)
Padding(
padding: const EdgeInsets.only(bottom: 8.0, right: 8.0),
child: Icon(iconName, color: Palette.mainTextColor),
Expand Down
131 changes: 60 additions & 71 deletions lib/pages/sign_up_page.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:alexander/pages/common/alexander_not_icon_text_field.dart';
import 'package:alexander/pages/theme/palette.dart';
import 'package:flutter/material.dart';
import 'package:gap/gap.dart';
import 'common/alexander_text_field.dart';
import 'common/sign_button.dart';
import 'home_menu.dart';

Expand Down Expand Up @@ -28,79 +29,67 @@ class _SignUpPageState extends State<SignUpPage> {
padding: const EdgeInsets.only(left: 80, right: 80),
child: Column(
children: [
TextButton(
onPressed: returnPage,
child: Row(
children: [
const Padding(
padding: EdgeInsets.only(right: 12.0),
child: Icon(
Icons.arrow_back_ios_new_outlined,
size: 16,
color: Palette.mainTextColor,
),
TextButton(
onPressed: returnPage,
child: Row(
children: [
const Padding(
padding: EdgeInsets.only(right: 12.0),
child: Icon(
Icons.arrow_back_ios_new_outlined,
size: 16,
color: Palette.mainTextColor,
),
const Text(
'ログインページに戻る',
style: TextStyle(
fontSize: 12,
color: Palette.mainTextColor,
letterSpacing: 3.2,
),
),
const Text(
'ログインページに戻る',
style: TextStyle(
fontSize: 12,
color: Palette.mainTextColor,
letterSpacing: 3.2,
),
],
),
),
const SizedBox(
height: 16,
),
//ファーストネームTextField
const AlexanderNotIconTextField(
label: 'ファーストネーム',
engLabel: 'First Name',
information: 'ファーストネームが入力されていません'),
const SizedBox(
height: 16,
),
//ラストネームTextField
const AlexanderNotIconTextField(
label: 'ラストネーム',
engLabel: 'Last Name',
information: 'ラストネームが入力されていません'),
const SizedBox(
height: 16,
),
//メールアドレスTextField
const AlexanderNotIconTextField(
label: 'メールアドレス',
engLabel: 'E-mail',
information: 'メールアドレスが入力されていません'),
const SizedBox(
height: 16,
),
//パスワードTextField
const AlexanderNotIconTextField(
label: 'パスワード',
engLabel: 'Password',
information: 'パスワードが入力されていません',
obscureText: true),
const SizedBox(
height: 16,
),
//ログイン用パスワードTextField
const AlexanderNotIconTextField(
label: 'もう一度パスワードを入力',
engLabel: 'ConfirmPassword',
information: 'パスワードが一致していません',
obscureText: true),
const SizedBox(
height: 16,
),
//新規登録
const SignButton(buttonLabel: 'SIGN UP'),
const SizedBox(
height: 36,
),
],
),
),
const Gap(24),
//ファーストネームTextField
const AlexanderTextField(
label: 'ファーストネーム',
engLabel: 'First Name',
information: 'ファーストネームが入力されていません'),
const Gap(24),
//ラストネームTextField
const AlexanderTextField(
label: 'ラストネーム',
engLabel: 'Last Name',
information: 'ラストネームが入力されていません'),
const Gap(24),
//メールアドレスTextField
const AlexanderTextField(
label: 'メールアドレス',
engLabel: 'E-mail',
information: 'メールアドレスが入力されていません'),
const Gap(24),
//パスワードTextField
const AlexanderTextField(
label: 'パスワード',
engLabel: 'Password',
information: 'パスワードが入力されていません',
obscureText: true),
const Gap(24),
//ログイン用パスワードTextField
const AlexanderTextField(
label: 'もう一度パスワードを入力',
engLabel: 'ConfirmPassword',
information: 'パスワードが一致していません',
obscureText: true),
const Gap(24),
//新規登録
const SignButton(buttonLabel: 'SIGN UP'),
const SizedBox(
height: 36,
),
],
),
),
Expand Down

0 comments on commit 11e0895

Please sign in to comment.