Advertisement
AnoTest

FranceDataDesign

Feb 8th, 2021
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. //FranceDataDesign
  2. import 'package:flutter/material.dart';
  3. import 'package:flutter_svg/svg.dart';
  4. import 'package:hexcolor/hexcolor.dart';
  5. import 'package:sizer/sizer.dart';
  6.  
  7. class FranceDataDesign extends StatelessWidget {
  8. final Map covidDataFranceAll;
  9. final String nameField;
  10. const FranceDataDesign({Key key, this.covidDataFranceAll, this.nameField})
  11. : super(key: key);
  12.  
  13. @override
  14. Widget build(BuildContext context) {
  15. double width = MediaQuery.of(context).size.width;
  16.  
  17. return Container(
  18. decoration: BoxDecoration(
  19. borderRadius: BorderRadius.all(
  20. Radius.circular(10),
  21. ),
  22. color: Colors.red,
  23. ),
  24. margin: EdgeInsets.all(5),
  25. // height: 100,
  26. //width: width / 2,
  27. child: Padding(
  28. padding: const EdgeInsets.all(8.0),
  29. child: Expanded(
  30. child: Column(
  31. mainAxisAlignment: MainAxisAlignment.center,
  32. children: <Widget>[
  33. Row(
  34. children: [
  35. SvgPicture.asset(
  36. 'assets/icons/confirmed.svg',
  37. height: 2.0.h,
  38. ),
  39. SizedBox(
  40. width: 2.0.h,
  41. ),
  42. Text(
  43. nameField,
  44. style: TextStyle(
  45. fontWeight: FontWeight.bold,
  46. fontSize: 16,
  47. color: HexColor('a9abaf'),
  48. ),
  49. ),
  50. ],
  51. ),
  52. SizedBox(
  53. height: 2.0.h,
  54. ),
  55. Text(
  56. covidDataFranceAll['cases'].toString(),
  57. style: TextStyle(
  58. fontSize: 14,
  59. fontWeight: FontWeight.bold,
  60. ),
  61. ),
  62. RichText(
  63. text: TextSpan(
  64. style: TextStyle(color: Colors.black),
  65. children: [
  66. TextSpan(
  67. text: "\nPersonnes",
  68. style: TextStyle(
  69. fontSize: 13,
  70. fontWeight: FontWeight.bold,
  71. color: Colors.black.withOpacity(0.5),
  72. letterSpacing: 2.0,
  73. height: 1, //distance separant du 1 ere text et du 2em
  74. ),
  75. ),
  76. ],
  77. ),
  78. ),
  79. ],
  80. ),
  81. ), //exepanded
  82. ),
  83. );
  84. }
  85. }
  86.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement