There was a problem fetching linked pipelines.
Commit e1cffda6 authored by Henrique Cardoso Zanette's avatar Henrique Cardoso Zanette
Browse files

Merge branch 'feature/card-noticias' into 'develop'

Feature/card noticias

See merge request !66
parents 2f4dce70 d4b25dc4
Pipeline #5439 failed with stages
in 5 minutes and 59 seconds
Showing with 119 additions and 0 deletions
+119 -0
......@@ -35,4 +35,5 @@ class AppStrings {
static const String description = 'Descrição';
static const String name = 'Nome';
static const String open = 'Abrir';
static const String readMore = 'Ler Mais';
}
import 'package:flutter/material.dart';
import 'package:idoso_mais/views/design_tokens/custom_colors.dart';
import 'package:idoso_mais/views/design_tokens/custom_text_styles.dart';
import 'package:idoso_mais/views/design_tokens/app_strings.dart';
class IMButtonReadMore extends StatelessWidget {
final void Function()? onPressed;
const IMButtonReadMore({
Key? key,
required this.onPressed,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return ConstrainedBox(
constraints: const BoxConstraints.tightFor(height: 42, width: 279),
child: ElevatedButton(
onPressed: onPressed,
style: ElevatedButton.styleFrom(
backgroundColor: CustomColors.primary,
elevation: 2,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(22),
bottomRight: Radius.circular(22),
),
),
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 24),
child: Text(style: CustomTextStyles.subtitle_2, AppStrings.readMore),
),
),
);
}
}
import 'package:flutter/material.dart';
import 'package:idoso_mais/views/design_tokens/custom_colors.dart';
import 'package:idoso_mais/views/design_tokens/custom_text_styles.dart';
import 'package:idoso_mais/views/widgets/im_button_read_more.dart';
class IMNewsCard extends StatelessWidget {
final String title;
final String imageUrl;
final void Function()? onPressed;
const IMNewsCard({
Key? key,
required this.title,
required this.imageUrl,
required this.onPressed,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
height: 287,
width: 279,
decoration: BoxDecoration(
color: CustomColors.background,
border: Border.all(
color: CustomColors.black,
),
borderRadius: const BorderRadius.all(Radius.circular(22)),
),
child: Column(children: <Widget>[
Expanded(
child: Container(
decoration: BoxDecoration(
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(22),
topRight: Radius.circular(22),
),
image: DecorationImage(
image: NetworkImage(imageUrl),
fit: BoxFit.fill,
),
),
child: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: <Color>[
CustomColors.black.withOpacity(0),
CustomColors.black.withOpacity(0.1),
CustomColors.black.withOpacity(1),
],
),
),
child: SizedBox(
height: 245,
width: 279,
child: Padding(
padding:
const EdgeInsets.only(left: 10, right: 10, bottom: 3),
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
Text(
title,
style: CustomTextStylesBuilder()
.withColor(CustomColors.background)
.body2(),
),
],
),
),
),
),
),
),
IMButtonReadMore(onPressed: onPressed)
]),
);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment