import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

/// 无状态组件
class LessGroupPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Stateless学习',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
        appBar: AppBar(
          centerTitle: true,
          title: Text("基础组件"),
          leading: GestureDetector(
            onTap: () {
              Navigator.pop(context);
            },
            child: Icon(Icons.arrow_back),
          ),
        ),
        body: Container(
          decoration: BoxDecoration(color: Colors.white),
          alignment: Alignment.center,
          child:

          Column(
            children: <Widget>[
              Text("text！！！！"),
              Icon(
                Icons.android,
                size: 50,
                color: Colors.blue,
              ),
              CloseButton(),
              BackButton(),
              Chip(
                avatar: Icon(Icons.people),
                label: Text("啊啊啊啊啊"),
              ),
              Divider(
                height: 10,
                indent: 10,
                color: Colors.red,
              ),
              Card(
                color: Colors.blue,
                elevation: 5,
                margin: EdgeInsets.all(10),
                child: Container(
                  padding: EdgeInsets.all(10),
                  child: Text(
                    "123123",
                  ),
                ),
              ),
              AlertDialog(
                title: Text('标题'),
                content: Text('这里是内容'),
              ),
              Expanded(child:  ListView.builder(
                padding: new EdgeInsets.all(5.0),
                itemCount: 50,
                itemExtent: 50,
                itemBuilder: (BuildContext context,int index){
                  return new Text("text $index");
                },
              ),)
            ],
          ),
        ),
      ),
    );
  }
}
