질문&답변
안녕하세요. wifi 통신에 관련하여 여쭤보려고 합니다.
아닙니다. 현재 강좌와 답변만으로도 큰 도움이 됩니다. 감사합니다 :)
- 좋아요수
- 0
- 댓글수
- 2
- 조회수
- 577
질문&답변
아닙니다. 현재 강좌와 답변만으로도 큰 도움이 됩니다. 감사합니다 :)
질문&답변
알려주신 형식을 사용하다가 궁굼한 점이 있어서 하나 여쭤보려고 합니다... 현재 class CustomText extends Text { final int fontSize ; CustomText(String data , this . fontSize , ): super (data , textScaleFactor: 1.0 ) ; } 이렇게 클래스를 만들고 다른 페이지에서 import 시켜서 Positioned ( left: 16 / 3 , top: 36 / 3 , child: CustomText (userData. memTitle , 20 , style: TextStyle (color: Color ( 0xFFa6093d ) , fontWeight: FontWeight. bold ) ) , ) , 이런 형식으로 받아서 사용을 하고 있습니다. 그런데 style 파라미터가 정의 되지 않았다는 에러로 run이 안되는데 어떤 형식으로 style을 정의해줘야 하는지 좀 알 수 있을까요?...
질문&답변
아 그렇군요! 너무 감사합니다... 친절하게 설명해주셔서 감사합니다
질문&답변
자세한 설명 감사합니다. 아래 알려주신 코드를 똑같이 새 dart페이지에 작성해서 해볼땐 되는데 제가 참조 소스첨부에 사용하고 있는 CustomText 클래스에 넣어 사용하려고하니 안되서요... 혹시 StatelessWidget에서는 textScaleFactor가 사용이 불가한걸까요?
질문&답변
답변 너무 감사합니다. 그럼 CustomText로 class만든 부분에 추가를 해야하는 건가요? 아님 별도로 class CustomText extends Text { }를 만들어 써야하는 걸까요?...
질문&답변
안녕하세요... 며칠 전에 답변 주신 textScaleFactor를 활용해서 항상 Text를 보통 크기로 유지하고 싶어서 진행해 봤는데 생각보다 적용하기가 힘들어서 다시 문의드리고자 합니다... 위에 알려주신 방법을 토대로 Text 코드만 사용하여 작성했을때는 textScaleFactor가 적용되는 것을 확인하였는데 저 같은 경우는 Text에 대한 Class 함수를 만들어 위젯형식으로 적용을 시켜 전체적으로 Text에대해 이펙트를 먹이고 있습니다. 그런데 아래의 소스에 textScaleFactor를 사용했을때는 에러가 나서 어떻게 적용해야 하는지 좀 도움을 받을 수 있을까해서 문의 남깁니다.. 너무 자주 여쭤봐서 죄송합니다 ㅜ 플러터가 처음이다보니 어려움이 많네요... -----소스첨부---- class CustomText extends StatelessWidget { final String text; final int fontSize; final Color color; final double height; final FontWeight fontWeight; CustomText( this .text, this .fontSize, {Key key, this .color = const Color(0xFF434343), this .height = 1.0, this .fontWeight = FontWeight.normal}) : super (key: key); @override Widget build(BuildContext context) { return Text( this .text, overflow: TextOverflow.ellipsis, style: TextStyle( fontFamily: 'NanumGothic', fontSize: this .fontSize.toDouble(), color: this .color, height: this .height, fontWeight: this .fontWeight, ), ); } } —— 중간생략 —— Row( children: [ InkWell( child: Container( width: drawerWidth, height: 120 / 3, child: Row( children: [ Padding( padding: const EdgeInsets.only(left: 50 / 3, right: 44 / 3), child: Image.asset( 'assets/images/Side_Menu_Monitoring_Btn.png', width: 66 / 3, height: 66 / 3, fit: BoxFit.fill, ), ), CustomText('Monitoring', 16, color: Color(0xFF355c7d), fontWeight: FontWeight.bold), ], )), onTap: () { Navigator.pop(context); Navigator.pushReplacement( context, MaterialPageRoute( builder: (context) => new MonitoringPage())); }, ), ],
질문&답변
신경써 주셔서 감사합니다..^^