**이 페이지에서 알 수 있는 내용 このページからわかること

- Container
	- alignment
	- padding
	- margin
	- decoration: BoxDecoration()
		- boxShadow
			- Offset
		- gradient**

main.dart

...
...

@override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Container( // 1
          color: Colors.blue,
          child: Container( // 2
            width: 200,
            height: 200,
            color: Colors.red,
            child: Text('テスト'),
            alignment: Alignment.topRight,
            padding: EdgeInsets.all(10),
            margin: EdgeInsets.all(10),
          ),
        )
      ),
    );
  }
}

Untitled

alignment

padding

margin


main.dart

...
...

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Container(
          width: 200,
          height: 200,
          child: Text('テスト'),
          decoration: BoxDecoration(
            color: Colors.red,
            borderRadius: BorderRadius.only(topRight: Radius.circular(50)),
            boxShadow: [
              BoxShadow(
                color: Colors.black,
                spreadRadius: 10,
                blurRadius: 10,
                offset: Offset(10, 50), // 좌표값 입력
              )
            ],
            gradient: LinearGradient(
              begin: Alignment.topCenter,
              end: Alignment.bottomCenter,
              colors: [Colors.blue, Colors.red],
            ),
          ),
        ),
      ),
    );
  }
}

Untitled

decoration: BoxDecoration()

boxShadow