import 'package:flutter/material.dart';

class NoData extends StatelessWidget {
  const NoData({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Expanded(
        child: Center(
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Image.asset(
            'assets/images/no_data.png',
            width: 200,
          ),
          const SizedBox(
            height: 20,
          ),
          const Text(
            '暂无数据...',
            style: TextStyle(color: Colors.grey),
          ),
        ],
      ),
    ));
  }
}

/// 父节点非 flex 节点
class EmptyData extends StatelessWidget {
  const EmptyData({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Image.asset(
            'assets/images/no_data.png',
            width: 200,
          ),
          const SizedBox(
            height: 20,
          ),
          const Text(
            '暂无数据...',
            style: TextStyle(color: Colors.grey),
          ),
        ],
      ),
    );
  }
}
