flutter로 my card만들기 네~ 만들어 드렸습니다.(랄로)
2022. 5. 22. 19:26ㆍ플러터
728x90
https://www.youtube.com/watch?v=D16Ilhnzbcc
main.dart
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
backgroundColor: Colors.black,
body: SafeArea(
child: Column(
mainAxisAlignment: MainAxisAlignment.center ,
children: <Widget>[
CircleAvatar(
radius: 80.0,
backgroundImage: AssetImage('images/ralo.jpg'),
),
Text(
'GreenDay-2400',
style: TextStyle(
fontSize: 40.0,
fontFamily: 'Pacifico',
color: Colors.white,
fontWeight: FontWeight.bold,
),
),
Text(
'Season 2',
style: TextStyle(
fontFamily: 'Source Sans Pro',
color: Colors.teal.shade100,
fontSize: 20.0,
letterSpacing: 2.5,
fontWeight: FontWeight.bold,
),
),
SizedBox(
height: 20.0,
width: 150.0,
child: Divider(
color: Colors.teal.shade100 ,
),),
Card(
color: Colors.white,
margin:
EdgeInsets.symmetric(vertical: 10.0, horizontal: 25.0),
child: ListTile(
leading: Icon(
Icons.phone,
color: Colors.teal.shade900,
),
title: Text(
'+ 010 4830 672*',
style: TextStyle(
fontSize: 20.0,
color: Colors.teal.shade900,
fontFamily: 'Source Sans Pro'),
),
)),
Card(
color: Colors.white,
margin:
EdgeInsets.symmetric(vertical: 10.0, horizontal: 25.0),
child: ListTile(
leading: Icon(
Icons.email,
size: 20.0,
color: Colors.teal.shade900,
),
title: Text(
'lsls011031@gmail.com',
style: TextStyle(
color: Colors.teal.shade900,
fontFamily: 'Source Sans Pro',
fontSize: 20.0,
),
),
)),
],
))),
);
}
}
pubspec.yaml 파일
name: mi_card
description: A new Flutter application.
version: 1.0.0+1
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.2
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets:
- images/
fonts:
- family: Pacifico
fonts:
- asset: fonts/
- family: Source Sans Pro
fonts:
- asset: fonts/
728x90
'플러터' 카테고리의 다른 글
[플러터] SDK 설치와 환경변수 설정하기 (0) | 2022.07.08 |
---|---|
github에서 url 로 프로젝트 불러오는 방법(안드로이드 스튜디오 새로운버전) (0) | 2022.05.22 |
버전이 다른 안드로이드 스튜디오에서 setting 찾기 /안드로이드 스튜디오 SDK오류 / 실제 기기에서 실행 안됨 에러 해결 (0) | 2022.05.04 |