Created with <3 with dartpad.dev.
Created
September 7, 2022 02:47
-
-
Save hongsw/652ca88ec83466d4c5f715ffecc018c1 to your computer and use it in GitHub Desktop.
Counter example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo', | |
debugShowCheckedModeBanner: false, | |
theme: ThemeData( | |
primarySwatch: Colors.blue, | |
), | |
home: const MyHomePage(title: '내폰내툰'), | |
); | |
} | |
} | |
class MyHomePage extends StatefulWidget { | |
final String title; | |
const MyHomePage({ | |
Key? key, | |
required this.title, | |
}) : super(key: key); | |
@override | |
State<MyHomePage> createState() => _MyHomePageState(); | |
} | |
class _MyHomePageState extends State<MyHomePage> { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
toolbarHeight: 80, | |
title: Text(widget.title, style: TextStyle( | |
fontWeight: FontWeight.w600, | |
fontSize: 36.0, | |
color: Colors.black | |
)), | |
centerTitle: true, | |
flexibleSpace: Container( | |
decoration: BoxDecoration( | |
gradient: LinearGradient( | |
begin: Alignment.topLeft, | |
end: Alignment.bottomRight, | |
colors: <Color>[ | |
Colors.blueAccent, | |
Colors.yellowAccent | |
] | |
) | |
) | |
) | |
), | |
body: Center( | |
child: Column( | |
children: <Widget>[ | |
Row( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children:<Widget>[ | |
Padding( | |
padding: const EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 5.0), | |
child: | |
Column( | |
children: <Widget>[ | |
Image.network('https://ccdn.lezhin.com/v2/comics/260/images/wide.webp?updated=1626417228107&width=277'), | |
Text('#1 만화 : 레바툰'), | |
Text('월요일') | |
]) | |
), | |
Padding( | |
padding: const EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 5.0), | |
child: | |
Column( | |
children: <Widget>[ | |
Image.network('https://ccdn.lezhin.com/v2/comics/260/images/wide.webp?updated=1626417228107&width=277'), | |
Text('#1 만화 : 레바툰'), | |
Text('월요일') | |
]) | |
), | |
] | |
), | |
Row( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children:<Widget>[ | |
Padding( | |
padding: const EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 5.0), | |
child: | |
Column( | |
children: <Widget>[ | |
Image.network('https://ccdn.lezhin.com/v2/comics/260/images/wide.webp?updated=1626417228107&width=277'), | |
Text('#1 만화 : 레바툰'), | |
Text('월요일') | |
]) | |
), | |
Padding( | |
padding: const EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 5.0), | |
child: | |
Column( | |
children: <Widget>[ | |
Image.network('https://ccdn.lezhin.com/v2/comics/260/images/wide.webp?updated=1626417228107&width=277'), | |
Text('#1 만화 : 레바툰'), | |
Text('월요일') | |
]) | |
), | |
] | |
), | |
Row( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children:<Widget>[ | |
Padding( | |
padding: const EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 5.0), | |
child: | |
Column( | |
children: <Widget>[ | |
Image.network('https://ccdn.lezhin.com/v2/comics/260/images/wide.webp?updated=1626417228107&width=277'), | |
Text('#1 만화 : 레바툰'), | |
Text('월요일') | |
]) | |
), | |
Padding( | |
padding: const EdgeInsets.fromLTRB(15.0, 5.0, 15.0, 5.0), | |
child: | |
Column( | |
children: <Widget>[ | |
Image.network('https://ccdn.lezhin.com/v2/comics/260/images/wide.webp?updated=1626417228107&width=277'), | |
Text('#1 만화 : 레바툰'), | |
Text('월요일') | |
]) | |
), | |
] | |
), | |
] | |
), | |
) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment