sosfiw
sosfiw
发布于 1周前

Flutter 垂直居中

import 'package:flutter/material.dart';

class CenterPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Material(
      child: Container(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[Text('我是一个垂直居中的文本')],
        )
      )
    );
  }
}