728x90
반응형
728x170
▶ main.dart
import 'package:flutter/material.dart';
void main() {
runApp(TestApplication());
}
class TestApplication extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Test Application',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MainPage(),
);
}
}
class MainPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Test Application'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Opacity(
opacity: 0.3,
child: Container(
color: Colors.red,
width: 100,
height: 100,
padding: const EdgeInsets.all(8.0),
margin: const EdgeInsets.all(8.0),
),
),
Opacity(
opacity: 0.6,
child: Container(
color: Colors.red,
width: 100,
height: 100,
padding: const EdgeInsets.all(8.0),
margin: const EdgeInsets.all(8.0),
),
),
Opacity(
opacity: 0.9,
child: Container(
color: Colors.red,
width: 100,
height: 100,
padding: const EdgeInsets.all(8.0),
margin: const EdgeInsets.all(8.0),
),
),
],
),
),
);
}
}
728x90
반응형
그리드형(광고전용)
'Flutter' 카테고리의 다른 글
[FLUTTER] Timer 클래스 : periodic 팩토리 생성자 사용하기 (0) | 2021.05.02 |
---|---|
[FLUTTER] BottomAppBar 클래스 사용하기 (0) | 2021.05.02 |
[FLUTTER] Positioned 클래스 사용하기 (0) | 2021.05.02 |
[FLUTTER] 스톱워치(Stopwatch) 만들기 (0) | 2021.05.02 |
[FLUTTER] 비만도 계산기 만들기 (0) | 2021.05.01 |
[FLUTTER] ScaffoldState 클래스 : showSnackBar 메소드를 사용해 스낵바 표시하기 (0) | 2021.05.01 |
[FLUTTER] TextFormField 클래스 : validator 속성을 사용해 입력 값 검증하기 (0) | 2021.05.01 |
[FLUTTER] Form 클래스 : 입력 값 검증하기 (0) | 2021.05.01 |
[FLUTTER] TextEditingController 클래스 사용하기 (0) | 2021.05.01 |
[FLUTTER] CarouselSlider 클래스 : 자동 스크롤 슬라이더 사용하기 (0) | 2021.04.29 |
댓글을 달아 주세요