import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/material.dart';

class ViewAllHomeWidget extends StatelessWidget {

  final String title;
  final Widget navigationWidget;


  ViewAllHomeWidget(this.title, this.navigationWidget);

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.fromLTRB(10, 10, 10, 10),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          Texts(
            title,
            bold: true,
          ),
          BorderedButton(
            TranslationBase.of(context).viewAll,
            hasBorder: true,
            borderColor: Colors.green,
            textColor: Colors.green,
            vPadding: 6,
            hPadding: 4,
            handler: () {
              Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (context) =>
                          navigationWidget));
            },
          ),
        ],
      ),
    );
  }
}
