mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-09-25 23:54:31 +08:00
51 lines
1.4 KiB
Dart
51 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import '../../../../../common/widget-demo.dart';
|
|
|
|
class Demo extends StatefulWidget {
|
|
static const String routeName = '/element/Frame/Axis/Table';
|
|
_DemoState createState() => _DemoState();
|
|
}
|
|
|
|
class _DemoState extends State<Demo> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return WidgetDemo(
|
|
title: 'mainAxis',
|
|
child: Flex(
|
|
direction: Axis.vertical,
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
mainAxisSize: MainAxisSize.max,
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: <Widget>[
|
|
Container(
|
|
height: 20.0,
|
|
width: 20.0,
|
|
color: Colors.blueAccent,
|
|
margin: const EdgeInsets.all(10.0),
|
|
),
|
|
Container(
|
|
height: 20.0,
|
|
width: 20.0,
|
|
color: Colors.blueAccent,
|
|
margin: const EdgeInsets.all(10.0),
|
|
),
|
|
Container(
|
|
height: 20.0,
|
|
width: 20.0,
|
|
color: Colors.blueAccent,
|
|
margin: const EdgeInsets.all(10.0),
|
|
),
|
|
Container(
|
|
height: 20.0,
|
|
width: 20.0,
|
|
color: Colors.blueAccent,
|
|
margin: const EdgeInsets.all(10.0),
|
|
),
|
|
],
|
|
),
|
|
docUrl:
|
|
'https://docs.flutter.io/flutter/material/MergeableMaterial/mainAxis.html',
|
|
);
|
|
}
|
|
}
|