Help us understand the problem. What is going on with this article?

Flutter tips 丸みを帯びた四角

More than 1 year has passed since last update.

Flutter 丸みを帯びた四角

Flutterで丸みを帯びた四角系の簡単な方法を知っていますか。
FlutterではClipRRectを使用することで簡単に作成できます。

import 'package:flutter/material.dart';

class Sample extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
        body:Center(
          // 丸みを作るWidget
          child: ClipRRect(
          // 曲線の度合いを設定
            borderRadius: BorderRadius.only(
              topLeft: Radius.circular(50.0),
              bottomLeft: Radius.circular(50.0),
            ),
              child: Container(
                child: Center(child:Text("center")),
                height: 100,
                width: 100,
                color: Colors.blue[500],
              )
          ),
        )
    );
  }
}

下の画像のように丸みを帯びた四角が簡単に出来上がります。

スクリーンショット 2019-05-15 12.18.09.png

gosutesu
株式会社システムアイに勤めています。業務でJavaを扱っているので、それの情報をまとめてあげていきたいと思ってます。後、趣味でReactとTypeScriptをやっているので、それに関する勉強のまとめを中心に。
systemi
ランドマークタワーを拠点に活躍する独立系システム会社
http://www.systemi.co.jp/index.html
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした