trphoenix
2018-11-08 f7ef09a40718e8df93a407ca2b3da2c508d69e85
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import 'package:flutter/material.dart';
 
class EmptyResultWidget extends StatelessWidget {
  final bool isEmpty;
 
  EmptyResultWidget(this.isEmpty);
 
  @override
  Widget build(BuildContext context) {
    return new AnimatedOpacity(
      duration: new Duration(milliseconds: 300),
      opacity: isEmpty ? 1.0 : 0.0,
      child: new Container(
        alignment: FractionalOffset.center,
        child: new Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            new Icon(
              Icons.warning,
              color: Colors.yellow[200],
              size: 80.0,
            ),
            new Container(
              padding: new EdgeInsets.only(top: 16.0),
              child: new Text(
                "No results",
                style: new TextStyle(color: Colors.yellow[100]),
              ),
            )
          ],
        ),
      ),
    );
  }
}