개발/플루터(flutter)

커플게임 앱 - 2

----___<<<<< 2020. 4. 9. 17:35

 

 

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or simply save your changes to "hot reload" in a Flutter IDE).
        // Notice that the counter didn't reset back to zero; the application
        // is not restarted.
        primarySwatch: Colors.blue,
      ),
      home: Hello(),
    );
  }
}

class Hello extends StatefulWidget {
  @override
  _HelloState createState() => _HelloState();
}

class _HelloState extends State<Hello> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      floatingActionButton: FloatingActionButton(
        child: Text("눌러 boy", textAlign: TextAlign.center,),
        onPressed: () => print("가즈앙"),
      ),
      appBar: AppBar(
        title: Text('커플게임 가즈앙'),
      ),
      body: Center(
        child: Text('커플 텍스트를 알려줍니다~'),
      ),
    );
  }
}

'개발 > 플루터(flutter)' 카테고리의 다른 글

bottom tabBar  (0) 2020.04.12
커플게임 앱 - 3  (0) 2020.04.09
커플게임 앱 - 1  (0) 2020.04.09
플루터 Stateful Stateless  (0) 2020.04.01
Flutter에서 위젯을 확인해볼 수 있습니다.  (0) 2020.04.01