import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class MyFooter extends StatelessWidget {

  final mode;

  MyFooter(this.mode);

  @override
  Widget build(BuildContext context) {
    Widget body;
    if (mode == LoadStatus.idle) {
      body = Text(S.of(context).shanglajiazai);
    } else if (mode == LoadStatus.loading) {
      body = CupertinoActivityIndicator();
    } else if (mode == LoadStatus.failed) {
      body = Text(S.of(context).jiazaishibai);
    } else if (mode == LoadStatus.canLoading) {
      body = Text(S.of(context).shifangjiazaigengduo);
    } else {
      body = Text(S.of(context).meiyougengduoshujule);
    }
    return Container(
      height: 55.0.h,
      child: Center(child: body),
    );
  }



}