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 {
final _itemList = List.generate(50, (i) => ListTile(title: Text('항목 $i')));
@override
Widget build(BuildContext context) {
return Scaffold(
body:CustomScrollView(
slivers: <Widget>[
SliverAppBar(
pinned: true,
expandedHeight: 180.0,
flexibleSpace: FlexibleSpaceBar(
title: Text('Test Application'),
background: Image.asset(
'assets/sample.png',
fit: BoxFit.cover,
),
),
actions: <Widget>[
IconButton(
icon: Icon(Icons.access_alarm),
onPressed: () {},
)
],
),
SliverList(
delegate: SliverChildListDelegate(_itemList),
),
],
),
);
}
}
728x90
그리드형(광고전용)
'Flutter' 카테고리의 다른 글
[FLUTTER] CupertinoAlertDialog 클래스 : 알림 대화 상자 사용하기 (0) | 2021.04.26 |
---|---|
[FLUTTER] CupertinoButton 클래스 사용하기 (0) | 2021.04.26 |
[FLUTTER] CupertinoSwitch 클래스 사용하기 (0) | 2021.04.26 |
[FLUTTER] CupertinoNavigationBar 클래스 사용하기 (0) | 2021.04.26 |
[FLUTTER] import 키워드 : 큐퍼티노 디자인 패키지 임포트하기 (0) | 2021.04.26 |
[FLUTTER] SliverAppBar/SliverFillRemaining 클래스 사용하기 (0) | 2021.04.26 |
[FLUTTER] AnimatedContainer 클래스 사용하기 (0) | 2021.04.25 |
[FLUTTER] Hero 클래스 사용하기 (0) | 2021.04.25 |
[FLUTTER] InkWell 클래스 사용하기 (0) | 2021.04.25 |
[FLUTTER] GestureDetector 클래스 사용하기 (0) | 2021.04.25 |