묻고 답해요
156만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결
언리얼 위젯 구현 C++ vs Blueprint ?
뭐로 만드는게 좋을까요?제가 만든 위젯구조는 다음과 같고요,[InventoryComponent] - C++ 구현Create WB_Inventory x 1↓ 나머지 BP 구현[WB_Inventory] Create WB_Container x n[WB_Container]Create WB_ContainerRow x n[WB_ContainerRow]Create WB_ContainerCell x n[WB_ContainerCell] + Attached WB_CellBorderSend Cell Info To [WB_CellBorder]if Item is Valid in Cell , Create WB_ContainerItem x n[WB_CellBorder]Draw Cell Based on Cell Info[WB_ContainerItem]Init Item Size, Image And Draw아이템을 Cell 칸에 넣는 식으로 위젯구조를 짰는데 ,Cell 칸을 그리는데 연산을 자주하긴 해서 이걸 C++로 바꿔야 하나 고민입니다.성능상 바꿔야할까요ㅕ?
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
구글지도 사용하기 중 코드 질문..
아래 코드에서 _HomeScreenState 클래스에서 appBar와 Body를 나누신 후에, 코드 정리중 appBar는 함수로, _CustomGoogleMap과 ChooCheckButton은 위젯으로 분리하여 만들어주셨는데, 그 이유가 뭔가요? appBar는 위젯으로 관리를 하면 안되는건가요? import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; class HomeScreen extends StatefulWidget { const HomeScreen({super.key}); @override State<HomeScreen> createState() => _HomeScreenState(); } class _HomeScreenState extends State<HomeScreen> { static final LatLng companyLatLng = LatLng(37.5233273, 126.921252); static final CameraPosition initialPosition = CameraPosition( target: companyLatLng, zoom: 15, ); @override Widget build(BuildContext context) { return Scaffold( appBar: renderAppbar(), body: Column( children: [ _CustomGoogleMap(initialPosition: initialPosition), _ChoolCheckButton(), ], ), ); } AppBar renderAppbar() { return AppBar( title: Text( '오늘도 출근', style: TextStyle( color: Colors.blue, fontWeight: FontWeight.w700, ), ), backgroundColor: Colors.white, ); } } class _CustomGoogleMap extends StatelessWidget { final CameraPosition initialPosition; const _CustomGoogleMap({ required this.initialPosition, Key? key, }) : super(key: key); @override Widget build(BuildContext context) { return Expanded( flex: 5, child: GoogleMap( mapType: MapType.normal, initialCameraPosition: initialPosition, ), ); } } class _ChoolCheckButton extends StatelessWidget { const _ChoolCheckButton({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return Expanded( child: Text( '출근', ), ); } }