import 'package:fcs/pages/contact/contact_page.dart';
import 'package:fcs/pages/term/term_page.dart';
import 'package:fcs/pages/widgets/bottom_up_page_route.dart';
import 'package:fcs/pages/widgets/local_text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_icons/flutter_icons.dart';

class BottomWidgets extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Row(
      mainAxisAlignment: MainAxisAlignment.spaceEvenly,
      children: <Widget>[
        InkWell(
          onTap: () {
            Navigator.of(context).push(BottomUpPageRoute(ContactPage()));
          },
          child: _buildSmallButton(
              context, "contact.btn", SimpleLineIcons.support),
        ),
        InkWell(
          onTap: () {
            Navigator.of(context).push(BottomUpPageRoute(TermPage()));
          },
          child: _buildSmallButton(context, "term.btn", Icons.info_outline),
        ),
      ],
    );
  }

  Widget _buildSmallButton(
      BuildContext context, String textKey, IconData iconData) {
    return Padding(
      padding: const EdgeInsets.all(18.0),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
          Padding(
            padding: const EdgeInsets.only(right: 5),
            child: Icon(iconData, color: Colors.white70, size: 20),
          ),
          LocalText(context, textKey, color: Colors.white70)
        ],
      ),
    );
  }
}
