trphoenix
2018-10-30 f2dafcc61407aef960ee17b576794b1260e84a08
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
import 'package:flutter/material.dart';
 
class SearchErrorWidget extends StatelessWidget {
  final bool hasError;
 
  SearchErrorWidget(this.hasError);
 
  @override
  Widget build(BuildContext context) {
    return new AnimatedOpacity(
      duration: new Duration(milliseconds: 300),
      opacity: hasError ? 1.0 : 0.0,
      child: new Container(
        alignment: FractionalOffset.center,
        child: new Column(
          mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: <Widget>[
            new Icon(Icons.error_outline, color: Colors.red[300], size: 80.0),
            new Container(
              padding: new EdgeInsets.only(top: 16.0),
              child: new Text(
                "Rate limit exceeded",
                style: new TextStyle(
                  color: Colors.red[300],
                ),
              ),
            )
          ],
        ),
      ),
    );
  }
}