Tutorial/Flutter with App
Flutter Example - Row Widget - Basic
독행소년
2019. 9. 24. 15:28
import 'package:flutter/material.dart';
class RowWidgetBasic extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("Basic Row Widget")),
// insert a Row widget in body
body: Row(
children: <Widget>[
// Add three sub-widget in the Row widget
boxWidget(),
boxWidget(),
boxWidget(),
],
),
);
}
boxWidget() {
return Container(
height: 50,
width: 50,
decoration: BoxDecoration(
color: Colors.blue[400],
border: Border.all(color: Colors.indigo, width: 0.5)),
child: Center(
child:
Text("Box", style: TextStyle(fontSize: 12, color: Colors.white))),
);
}
}
▶ Go to Table of Contents | 강의 목차로 이동
※ This example is also available in the Flutter Code Examples app. | 본 예제는 Flutter Code Examples 앱에서도 제공됩니다.
Flutter Code Examples - Google Play 앱
Are you a beginner at Flutter? Check out the various features of Flutter through the demo. Source code for all demos is also provided.
play.google.com