You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
986 B
40 lines
986 B
3 years ago
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
class EmptyWidget extends StatelessWidget {
|
||
|
final String? tip;
|
||
|
|
||
|
const EmptyWidget({Key? key, this.tip = '未找到相关学校或课程,请尝试其他类别'})
|
||
|
: super(key: key);
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return Center(
|
||
|
child: Container(
|
||
|
height: double.infinity,
|
||
|
child: Column(
|
||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||
|
children: <Widget>[
|
||
|
Expanded(
|
||
|
child: SizedBox(),
|
||
|
flex: 2,
|
||
|
),
|
||
|
SizedBox(
|
||
|
width: 100.0,
|
||
|
height: 100.0,
|
||
|
child: Image.asset('assets/images/nodata.png'),
|
||
|
),
|
||
|
Text(
|
||
|
tip!,
|
||
|
style: TextStyle(fontSize: 16.0, color: Colors.grey[400]),
|
||
|
),
|
||
|
Expanded(
|
||
|
child: SizedBox(),
|
||
|
flex: 3,
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
));
|
||
|
}
|
||
|
}
|