Advertisement
Guest User

Untitled

a guest
Jan 28th, 2020
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.11 KB | None | 0 0
  1. import 'package:flutter/cupertino.dart';
  2. import 'package:flutter/material.dart';
  3.  
  4. class BODView extends StatefulWidget {
  5. @override
  6. _BODViewState createState() => _BODViewState();
  7. }
  8.  
  9. class _BODViewState extends State<BODView> {
  10. int _current = 0;
  11.  
  12. @override
  13. Widget build(BuildContext context) {
  14. return Container(
  15. height: 300,
  16. child: ListView.builder(
  17. shrinkWrap: true,
  18. itemCount: 3,
  19. scrollDirection: Axis.horizontal,
  20. itemBuilder: (BuildContext context, int index) => Container(
  21. color: Colors.red,
  22. child: Container(
  23. width: 250,
  24. margin: EdgeInsets.only(right: 20),
  25. padding: EdgeInsets.all(10),
  26. decoration: BoxDecoration(
  27. color: Colors.white,
  28. borderRadius: BorderRadius.all(Radius.circular(50))
  29. ),
  30. child: Column(
  31. crossAxisAlignment: CrossAxisAlignment.start,
  32. children: <Widget>[
  33. Row(
  34. children: <Widget>[
  35. Container(
  36. child: Column(
  37. children: <Widget>[
  38. CircleAvatar(
  39. radius: 30,
  40. backgroundColor: Colors.white,
  41. child: ClipOval(
  42. child: Image.asset("assets/images/user2.png", fit: BoxFit.contain,),
  43. ),
  44. )
  45. ],
  46. ),
  47. ),
  48. SizedBox(width: 20,),
  49. Column(
  50. crossAxisAlignment: CrossAxisAlignment.start,
  51. children: <Widget>[
  52. Container(
  53. width: 150,
  54. child: Text(
  55. "Kresno Budoyo",
  56. style: TextStyle(
  57. fontSize: 18,
  58. fontWeight: FontWeight.bold
  59. ),
  60. maxLines: 1,
  61. overflow: TextOverflow.ellipsis,
  62. ),
  63. ),
  64. Container(
  65. width: 150,
  66. child: Text(
  67. '"Lorem ipsum sit dolor amlet"',
  68. style: TextStyle(
  69. fontSize: 18,
  70. ),
  71. maxLines: 2,
  72. overflow: TextOverflow.ellipsis,
  73. ),
  74. )
  75. ],
  76. ),
  77. ],
  78. ),
  79. ]
  80. ),
  81. ),
  82. )
  83. )
  84. );
  85. }
  86. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement