Skip to content

Instantly share code, notes, and snippets.

@koboolean
Created June 3, 2022 07:45
Show Gist options
  • Save koboolean/d00c8b249cf9673434f28441457d628d to your computer and use it in GitHub Desktop.
Save koboolean/d00c8b249cf9673434f28441457d628d to your computer and use it in GitHub Desktop.
Flutter Login Page
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
// Scafford - app bar, body, bottomNavigationBar, floatingActionButton 등의 요소가 담기는 틀
home: Scaffold(
// 화면에 보이는 영역입니다.
appBar: AppBar(centerTitle: true,
title: Text("Hello Flutter",
style: TextStyle(fontSize: 20),),),
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
children: [
Image.network( "https://i.ibb.co/CwzHq4z/trans-logo-512.png",width: 81,),
TextField(decoration: InputDecoration(labelText: "이메일"),), // Text 입력란
TextField(decoration: InputDecoration(labelText: "비밀번호"),obscureText: true), // Text 입력란(비밀번호)
Container(
width: double.infinity,
margin: EdgeInsets.only(top: 24), // margin을 주나, 오직 위에만 24만큼 margin을 준다.
child: ElevatedButton(onPressed: (){print('Hello');}, child: Text("로그인"),
),
)
],
),
),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment