Line data Source code
1 : import 'package:flutter/material.dart';
2 : import 'package:redfire/actions.dart';
3 :
4 : import '../../../utils/build_context_extensions.dart';
5 : import '../../models/project_model.dart';
6 : import '../../pages/project_detail_page.dart';
7 :
8 : class ProjectsGridItemView extends StatelessWidget {
9 0 : const ProjectsGridItemView(this.project, {Key? key}) : super(key: key);
10 :
11 : final ProjectModel project;
12 :
13 0 : @override
14 : Widget build(BuildContext context) {
15 0 : return Padding(
16 : padding: const EdgeInsets.all(25.0),
17 0 : child: Card(
18 : elevation: 0.5,
19 0 : shape: RoundedRectangleBorder(
20 0 : side: BorderSide(color: Colors.blue[100]!, width: 2),
21 0 : borderRadius: BorderRadius.circular(10),
22 : ),
23 0 : child: InkWell(
24 0 : splashColor: Colors.blue.withAlpha(30),
25 0 : onTap: () =>
26 0 : context.dispatch(const PushPageAction(ProjectDetailPageData())),
27 0 : child: Center(
28 0 : child: Text(project.name,
29 0 : style: Theme.of(context).textTheme.headline5)),
30 : ),
31 : ),
32 : );
33 : }
34 : }
|