728x90
반응형
728x170
▶ main.dart
import 'package:flutter/cupertino.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 StatefulWidget {
@override
_MainPageState createState() => _MainPageState();
}
class _MainPageState extends State<MainPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: CupertinoNavigationBar(
middle: Text('Test Application'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
CupertinoButton(
borderRadius: BorderRadius.circular(16.0),
color: Colors.orange,
child: Text('RUN 1'),
onPressed: () { },
),
CupertinoButton(
child: Text('RUN 2'),
onPressed: () { },
),
],
),
),
);
}
}
728x90
반응형
그리드형(광고전용)
'Flutter' 카테고리의 다른 글
[FLUTTER] Navigator 클래스 : pushNamed 정적 메소드를 사용해 화면 이동하기 (0) | 2021.04.27 |
---|---|
[FLUTTER] Navigator 클래스 : push/pop 정적 메소드를 사용해 화면 이동하기 (0) | 2021.04.27 |
[FLUTTER] import 키워드 : 파일 분할하기 (0) | 2021.04.27 |
[FLUTTER] CupertinoPicker 클래스 사용하기 (0) | 2021.04.26 |
[FLUTTER] CupertinoAlertDialog 클래스 : 알림 대화 상자 사용하기 (0) | 2021.04.26 |
[FLUTTER] CupertinoSwitch 클래스 사용하기 (0) | 2021.04.26 |
[FLUTTER] CupertinoNavigationBar 클래스 사용하기 (0) | 2021.04.26 |
[FLUTTER] import 키워드 : 큐퍼티노 디자인 패키지 임포트하기 (0) | 2021.04.26 |
[FLUTTER] SliverAppBar/SliverList 클래스 사용하기 (0) | 2021.04.26 |
[FLUTTER] SliverAppBar/SliverFillRemaining 클래스 사용하기 (0) | 2021.04.26 |
댓글을 달아 주세요