启动:flutter run --no-sound-null-safety
打包:flutter build apk --no-sound-null-safety
生成页面:
import ‘package:flutter/material.dart’;
statefulw快捷键
头部:
appBar: new AppBar(
backgroundColor: const Color(0xFF1F2025),
centerTitle: true,
title: new Text(‘购买’),
),
backgroundColor: Color.fromRGBO(31, 32, 37, 1),
占位高度:
SizedBox(height: 12),
横线:
Divider( height: 1.0,color: Color(0xFF535458), ),
Container内容居中:
alignment: Alignment.center,
Container内外间距:
padding: EdgeInsets.only( top: 20),
Container圆角和颜色:
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(15)),
color: Color.fromRGBO(42, 43, 48, 1),
),
Row两端对齐:
mainAxisAlignment: MainAxisAlignment.spaceBetween,
Column靠左对齐:
crossAxisAlignment: CrossAxisAlignment.start,
Text文本样式:
Text( “合计”, style: const TextStyle( fontSize: 12.0, color: Color(0xFFC5C5C6)), ),