fail.dart 551 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

import 'package:flutter/material.dart';

class LimitDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text('LimitedBox test')
      ),
      body: new Block(
        children: <Widget>[
          new LimitedBox(
            maxWidth: 100.0,
            maxHeight: 100.0,
            child: new Container(
              decoration: new BoxDecoration(backgroundColor: const Color(0xFF00FF00))
            )
          )
        ]
      )
    );
  }
}