글자 스타일
Text() 위젯
style: TextStyle()
아이콘 스타일
color, size 뿐
버튼
TextButton()
IconButton()
ElevateButton()
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(),
body: Column(
children: [
SizedBox(
child: TextButton(
child: Text('버튼임'),
onPressed: () {},
)),
SizedBox(
child: IconButton(
icon: Icon(Icons.star),
onPressed: () {},
)),
SizedBox(
child: ElevatedButton(
child: Text('버튼임'),
onPressed: () {},
)),
],
),
));
}
}
버튼스타일
앱바
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
leading: Icon(Icons.star),
title: Text('ddd'),
actions: [Icon(Icons.add), Icon(Icons.add_call)]),
body: SizedBox(),
));
}
}
leading 부분에는 뒤로가기 버튼, 메뉴버튼 등을 넣어서 활용하면 되겠고
actions 리스트는 필터, 메뉴버튼 등을 넣어서 활용 하면 되겠다.
'백엔드개발자 > FLUTTER, DART' 카테고리의 다른 글
[Flutter] 쪽지 화면을 만들어 보았다. (0) | 2023.01.06 |
---|---|
[Flutter] debug 없애기 (0) | 2023.01.01 |
Android Studio 에서 alt+Enter 안 됨 / 위젯 감싸기 (0) | 2023.01.01 |
[Flutter] 메인 화면을 만들어 보았다. (0) | 2022.08.02 |
[Flutter] 페이지 채워보기, 메뉴 4칸 2줄 (0) | 2022.07.25 |