Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- import 'package:flutter_svg/svg.dart';
- import 'package:hexcolor/hexcolor.dart';
- import 'package:sizer/sizer.dart';
- class FranceDataDesign extends StatelessWidget {
- final Map covidDataFranceAll;
- final String nameField;
- const FranceDataDesign({Key key, this.covidDataFranceAll, this.nameField})
- : super(key: key);
- @override
- Widget build(BuildContext context) {
- double width = MediaQuery.of(context).size.width;
- return Container(
- decoration: BoxDecoration(
- borderRadius: BorderRadius.all(
- Radius.circular(10),
- ),
- color: Colors.white,
- ),
- margin: EdgeInsets.all(5),
- // height: 100,
- width: width / 2,
- child: Padding(
- padding: const EdgeInsets.all(8.0),
- child: Expanded(
- child: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- children: <Widget>[
- Row(
- children: [
- SvgPicture.asset(
- 'assets/icons/confirmed.svg',
- height: 2.0.h,
- ),
- SizedBox(
- width: 2.0.h,
- ),
- Text(
- nameField,
- style: TextStyle(
- fontWeight: FontWeight.bold,
- fontSize: 16,
- color: HexColor('a9abaf'),
- ),
- ),
- ],
- ),
- SizedBox(
- height: 2.0.h,
- ),
- Text(
- covidDataFranceAll['cases'].toString(),
- style: TextStyle(
- fontSize: 14,
- fontWeight: FontWeight.bold,
- ),
- ),
- RichText(
- text: TextSpan(
- style: TextStyle(color: Colors.black),
- children: [
- TextSpan(
- text: "\nPersonnes",
- style: TextStyle(
- fontSize: 13,
- fontWeight: FontWeight.bold,
- color: Colors.black.withOpacity(0.5),
- letterSpacing: 2.0,
- height: 1, //distance separant du 1 ere text et du 2em
- ),
- ),
- ],
- ),
- ),
- ],
- ),
- ), //exepanded
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement