2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

React100本ノックをFlutterでやってみた #01 Hello World

Last updated at Posted at 2023-12-01

はじめに

@Sicut_study(Watanabe Jin)さんが公開しているReact100本ノックを見かけたので、Flutterでも可能な範囲で、同じものを作っていきたいと思います。

元記事の方では

React, TypeScriptを使う

というルールがありますが、こちらを無視する形となりますが、ご容赦ください🙇‍♂️

実装

完成品

Simulator Screenshot - iPhone 15 Pro Max - 2023-12-02 at 04.12.34.png

実装

以下のように実装を行いました。

hello_world.dart
import 'package:flutter/material.dart';

class HelloWorld extends StatelessWidget {
  const HelloWorld({super.key});

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Text(
        'Hello World',
        style: TextStyle(
          fontSize: 48,
          color: Colors.pink[200],
          fontWeight: FontWeight.bold,
        ),
      ),
    );
  }
}

Textウィジェットで文字の表示と装飾を行い、Centerウィジェットで中心に配置しています。

さいごに

flutterで実装できる範囲(でかつ、自分の能力でできる範囲)で、react100本ノックに追従していこうと思うのでよろしくお願いします!

コードや記事の内容について、何かご指摘やアドバイス等ありましたら、コメントや編集リクエスト等で教えて下さい!

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?