import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Dice game',
home: LogIn(),
);
}
}
class LogIn extends StatefulWidget {
@override
State<LogIn> createState() => _LogInState();
}
class _LogInState extends State<LogIn> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Log in'),
backgroundColor: Colors.redAccent,
centerTitle: true,
leading: IconButton(
icon: Icon(Icons.menu),
onPressed: (){}
),
actions: <Widget>[
IconButton(
icon: Icon(Icons.search),
onPressed: (){}
)
],
),
body: SingleChildScrollView(
child: Column(
children: [
Padding(padding: (EdgeInsets.only(top: 50)),
),
Center(
child: Image(
image: AssetImage('image/mypic.jpg'),
width: 170,
height: 190,
),
),
Form(child: Theme(
data: ThemeData(
primaryColor: Colors.teal,
inputDecorationTheme: InputDecorationTheme(
labelStyle: TextStyle(
color: Colors.teal,
fontSize: 15.0
)
),
),
child: Container(
padding: EdgeInsets.all(40.0),
child: Column(
children: [
TextField(
decoration: InputDecoration(
labelText: 'Enter "ID"'
),
keyboardType: TextInputType.emailAddress,
),
TextField(
decoration: InputDecoration(
labelText: 'Enter "Password"'
),
keyboardType: TextInputType.text,
obscureText: true,
),
SizedBox(
height: 40.0,
),
ButtonTheme(
minWidth: 100.0 ,
height: 50.0,
child: RaisedButton(
color: Colors.orangeAccent,
child: Icon(
Icons.arrow_forward,
color: Colors.white,
size: 35.0,
),
onPressed: (){})
)
],
),
),),
),
],
),
),
);
}
}
'인공지능 공부 > Flutter' 카테고리의 다른 글
플러터 다트(dart) - Statefull Widget (0) | 2022.04.29 |
---|---|
플러터 다트(dart) 네비게이터(Navigator) 와 푸시네임드 메소드(pushNamed method)(2022.04.28) (0) | 2022.04.28 |
플러터 다트(dart) Navigator(네비게이터)(2022.04.28) (0) | 2022.04.28 |
플러터 다트(dart) Toast (2022.04.28) (0) | 2022.04.28 |
플러터 다트(dart) 빌더(Builder widget)위젯 없이 스낵바(Snack bar)(2022.04.28) (0) | 2022.04.28 |