전체 글
-
-
공용 위젯 파일 샘플.. 이런 구성과 이런 형태로 간단한 위젯 공급하면 어떨지..카테고리 없음 2023. 8. 4. 00:49
// Copyright 2022 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'package:flutter/material.dart'; class Header extends StatelessWidget { const Header(this.heading, {super.key}); final String heading; @override Widget build(BuildContext context) => Padding( padding: const EdgeInsets.all(8.0),..
-
-
-
커스텀 팝업 메뉴 샘플flutter 2023. 8. 1. 13:51
//RightClickMenu or PopUp Menu PopupMenuItem _buildPopupMenuItem( {String value = 'func1', String name = 'untitled', IconData icon = Icons.abc, double width = 120, double height = 32}) { return PopupMenuItem( height: height, value: value, child: Row( children: [ Container(width: width, child: Text(name)), Icon( icon, color: Colors.black, ) ], )); } void _showPopupMenu(BuildContext context) async..
-
Flutter에서 PopupMenu의 스타일을 변경하는 방법카테고리 없음 2023. 8. 1. 11:12
Flutter에서 PopupMenu의 스타일을 변경하는 방법은 여러 가지가 있습니다. 아이템의 디자인을 변경하려면 `PopupMenuItem`의 `child` 속성을 사용하면 됩니다. 아래는 아이콘과 메뉴 이름이 함께 표시되는 `PopupMenuItem`의 예시입니다. 아이콘은 오른쪽에 배치하였습니다: final items = [ PopupMenuItem( value: 'copy', child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text('복사'), Icon(Icons.copy), // 아이콘 추가 ], ), height: 50.0, // 메뉴의 높이 설정 ), ]; 또한, 메뉴의 전체적인 스타일은 `Theme`나 `..