커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
텍스트 필드에 글자가 겹쳐요
노코드로 수익형 AI 앱 만들기 v0
1주차
북마크
이*아
댓글
3
추천
0
조회수
20
조회수
20
답변 완료

* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.

* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.


Align Label with Hint를 누르니 텍스트필드 선에 겹쳐서 나옵니다



스파르타 즉문즉답




작성한 코드 및 에러 메세지

import '/flutter_flow/flutter_flow_theme.dart';

import '/flutter_flow/flutter_flow_util.dart';

import '/flutter_flow/flutter_flow_widgets.dart';

import 'package:flutter/material.dart';

import 'package:google_fonts/google_fonts.dart';

import 'package:provider/provider.dart';


import 'home_page_model.dart';

export 'home_page_model.dart';


class HomePageWidget extends StatefulWidget {

 const HomePageWidget({super.key});


 @override

 State<HomePageWidget> createState() => _HomePageWidgetState();

}


class _HomePageWidgetState extends State<HomePageWidget> {

 late HomePageModel _model;


 final scaffoldKey = GlobalKey<ScaffoldState>();


 @override

 void initState() {

  super.initState();

  _model = createModel(context, () => HomePageModel());


  _model.textController ??= TextEditingController();

  _model.textFieldFocusNode ??= FocusNode();

 }


 @override

 void dispose() {

  _model.dispose();


  super.dispose();

 }


 @override

 Widget build(BuildContext context) {

  return GestureDetector(

   onTap: () => _model.unfocusNode.canRequestFocus

     ? FocusScope.of(context).requestFocus(_model.unfocusNode)

     : FocusScope.of(context).unfocus(),

   child: Scaffold(

    key: scaffoldKey,

    backgroundColor: FlutterFlowTheme.of(context).primaryBackground,

    appBar: AppBar(

     backgroundColor: FlutterFlowTheme.of(context).primary,

     automaticallyImplyLeading: false,

     title: Text(

      'Home',

      style: FlutterFlowTheme.of(context).headlineMedium.override(

         fontFamily: 'Pretentard',

         color: Colors.white,

         fontSize: 22,

         letterSpacing: 0,

         useGoogleFonts: false,

        ),

     ),

     actions: [],

     centerTitle: false,

     elevation: 2,

    ),

    body: SafeArea(

     top: true,

     child: Padding(

      padding: EdgeInsetsDirectional.fromSTEB(16, 0, 16, 0),

      child: Column(

       mainAxisSize: MainAxisSize.max,

       crossAxisAlignment: CrossAxisAlignment.start,

       children: [

        Text(

         '입력하기',

         style: FlutterFlowTheme.of(context).titleLarge.override(

            fontFamily: 'Pretentard',

            letterSpacing: 0,

            useGoogleFonts: false,

           ),

        ),

        TextFormField(

         controller: _model.textController,

         focusNode: _model.textFieldFocusNode,

         autofocus: true,

         obscureText: false,

         decoration: InputDecoration(

          isDense: false,

          labelText: '만들고 싶은 수식',

          labelStyle:

            FlutterFlowTheme.of(context).labelMedium.override(

               fontFamily: 'Pretentard',

               letterSpacing: 0,

               useGoogleFonts: false,

              ),

          alignLabelWithHint: true,

          hintStyle: FlutterFlowTheme.of(context).bodyMedium.override(

             fontFamily: 'Pretentard',

             letterSpacing: 0,

             useGoogleFonts: false,

            ),

          enabledBorder: OutlineInputBorder(

           borderSide: BorderSide(

            color: FlutterFlowTheme.of(context).secondary,

            width: 2,

           ),

           borderRadius: BorderRadius.circular(8),

          ),

          focusedBorder: OutlineInputBorder(

           borderSide: BorderSide(

            color: FlutterFlowTheme.of(context).primary,

            width: 2,

           ),

           borderRadius: BorderRadius.circular(8),

          ),

          errorBorder: OutlineInputBorder(

           borderSide: BorderSide(

            color: FlutterFlowTheme.of(context).error,

            width: 2,

           ),

           borderRadius: BorderRadius.circular(8),

          ),

          focusedErrorBorder: OutlineInputBorder(

           borderSide: BorderSide(

            color: FlutterFlowTheme.of(context).error,

            width: 2,

           ),

           borderRadius: BorderRadius.circular(8),

          ),

          filled: true,

          fillColor: FlutterFlowTheme.of(context).alternate,

         ),

         style: FlutterFlowTheme.of(context).labelMedium.override(

            fontFamily: 'Pretentard',

            letterSpacing: 0,

            useGoogleFonts: false,

           ),

         textAlign: TextAlign.justify,

         maxLines: 5,

         validator:

           _model.textControllerValidator.asValidator(context),

        ),

        Align(

         alignment: AlignmentDirectional(0, 0),

         child: FFButtonWidget(

          onPressed: () {

           print('Button pressed ...');

          },

          text: '제출',

          options: FFButtonOptions(

           height: 40,

           padding: EdgeInsetsDirectional.fromSTEB(24, 0, 24, 0),

           iconPadding: EdgeInsetsDirectional.fromSTEB(0, 0, 0, 0),

           color: FlutterFlowTheme.of(context).primary,

           textStyle:

             FlutterFlowTheme.of(context).titleSmall.override(

                fontFamily: 'Pretentard',

                color: Colors.white,

                letterSpacing: 0,

                useGoogleFonts: false,

               ),

           elevation: 3,

           borderSide: BorderSide(

            color: Colors.transparent,

            width: 1,

           ),

           borderRadius: BorderRadius.circular(8),

          ),

         ),

        ),

        Row(

         mainAxisSize: MainAxisSize.max,

         mainAxisAlignment: MainAxisAlignment.spaceBetween,

         children: [

          Text(

           '출력결과',

           style: FlutterFlowTheme.of(context).titleLarge.override(

              fontFamily: 'Pretentard',

              letterSpacing: 0,

              useGoogleFonts: false,

             ),

          ),

          Row(

           mainAxisSize: MainAxisSize.max,

           children: [

            Padding(

             padding: EdgeInsetsDirectional.fromSTEB(0, 0, 8, 0),

             child: Text(

              '복사하기',

              style: FlutterFlowTheme.of(context)

                .bodyMedium

                .override(

                 fontFamily: 'Pretentard',

                 color: FlutterFlowTheme.of(context)

                   .secondaryText,

                 letterSpacing: 0,

                 useGoogleFonts: false,

                ),

             ),

            ),

            Icon(

             Icons.content_copy_sharp,

             color: FlutterFlowTheme.of(context).secondaryText,

             size: 24,

            ),

           ],

          ),

         ],

        ),

        Container(

         width: MediaQuery.sizeOf(context).width,

         height: 120,

         decoration: BoxDecoration(

          color: FlutterFlowTheme.of(context).alternate,

          borderRadius: BorderRadius.circular(8),

          border: Border.all(

           color: FlutterFlowTheme.of(context).secondary,

           width: 2,

          ),

         ),

         child: Text(

          '결과값',

          style: FlutterFlowTheme.of(context).bodyMedium.override(

             fontFamily: 'Pretentard',

             letterSpacing: 0,

             useGoogleFonts: false,

            ),

         ),

        ),

       ].divide(SizedBox(height: 16)).addToStart(SizedBox(height: 32)),

      ),

     ),

    ),

   ),

  );

 }

}




취소
 공유
취소
댓글 0
댓글 알림
나의얼굴