Unverified Commit 3b7718c2 authored by redsolver's avatar redsolver Committed by GitHub

AdoptAWidget: Table (#69488) (#69588)

* Added Dartpad sample for Table widget

* Changed template to stateless_widget_scaffold

* Removed trailing character
parent a82c786d
......@@ -81,6 +81,70 @@ class _TableElementRow {
///
/// {@youtube 560 315 https://www.youtube.com/watch?v=_lbE0wsVZSw}
///
/// {@tool dartpad --template=stateless_widget_scaffold}
///
/// This sample shows a `Table` with borders, multiple types of column widths and different vertical cell alignments.
///
/// ```dart
/// Widget build(BuildContext context) {
/// return Table(
/// border: TableBorder.all(),
/// columnWidths: {
/// 0: IntrinsicColumnWidth(),
/// 1: FlexColumnWidth(),
/// 2: FixedColumnWidth(64),
/// },
/// defaultVerticalAlignment: TableCellVerticalAlignment.middle,
/// children: [
/// TableRow(
/// children: [
/// Container(
/// height: 32,
/// color: Colors.green,
/// ),
/// TableCell(
/// verticalAlignment: TableCellVerticalAlignment.top,
/// child: Container(
/// height: 32,
/// width: 32,
/// color: Colors.red,
/// ),
/// ),
/// Container(
/// height: 64,
/// color: Colors.blue,
/// ),
/// ],
/// ),
/// TableRow(
/// decoration: BoxDecoration(
/// color: Colors.grey,
/// ),
/// children: [
/// Container(
/// height: 64,
/// width: 128,
/// color: Colors.purple,
/// ),
/// Container(
/// height: 32,
/// color: Colors.yellow,
/// ),
/// Center(
/// child: Container(
/// height: 32,
/// width: 32,
/// color: Colors.orange,
/// ),
/// ),
/// ],
/// ),
/// ],
/// );
/// }
/// ```
/// {@end-tool}
///
/// If you only have one row, the [Row] widget is more appropriate. If you only
/// have one column, the [SliverList] or [Column] widgets will be more
/// appropriate.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment