Advertisement
toshels

Untitled

Jul 12th, 2020
1,541
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 2.32 KB | None | 0 0
  1.     return Card(
  2.       child: SingleChildScrollView(
  3.         scrollDirection: Axis.horizontal,
  4.         child: Row(
  5.  
  6.  
  7.            mainAxisAlignment: MainAxisAlignment.start,
  8.           children: <Widget>[
  9.            Padding(
  10.              padding: const EdgeInsets.all(10.0),
  11.              child: this.image!=null ? CachedNetworkImage(
  12.                imageUrl: this.image,
  13.                imageBuilder: (context, imageProvider) => Container(
  14.                  width: 60.0,
  15.                  height: 60.0,
  16.                  decoration: BoxDecoration(
  17.                    shape: BoxShape.circle,
  18.                    image: DecorationImage(
  19.                        image: imageProvider, fit: BoxFit.cover),
  20.                  ),
  21.                ),
  22.                placeholder: (context, url) => CircularProgressIndicator(),
  23.                errorWidget: (context, url, error) => Icon(Icons.error),
  24.              )
  25.                  :
  26.              CachedNetworkImage(
  27.                imageUrl: 'https://www.adler-colorshop.com/media/image/a2/5d/c2/farbtoene-ferrocolor-weiss.jpg',
  28.                imageBuilder: (context, imageProvider) => Container(
  29.                  width: 60.0,
  30.                  height: 60.0,
  31.                  decoration: BoxDecoration(
  32.                    shape: BoxShape.circle,
  33.                    image: DecorationImage(
  34.                        image: imageProvider, fit: BoxFit.cover),
  35.                  ),
  36.                ),
  37.                placeholder: (context, url) => CircularProgressIndicator(),
  38.                errorWidget: (context, url, error) => Icon(Icons.error),
  39.              )
  40.  
  41.            ),
  42.             Column(
  43.               children: <Widget>[
  44.                 Column(
  45.  
  46.                   crossAxisAlignment: CrossAxisAlignment.start,
  47.                   children: <Widget>[
  48.                     Text(gasStationName),
  49.                     SizedBox(height: 10,),
  50.                     Text(location,
  51.                           style: TextStyle(
  52.                               color: Colors.grey,
  53.                               ),
  54.                     ),
  55.                   ],
  56.                 ),
  57.  
  58.               ],
  59.             ),
  60.             Spacer(),
  61.              Padding(
  62.                  padding: EdgeInsets.fromLTRB(50, 0, 0, 0),
  63.                  child: Row(children:gasPrices)),
  64.           ],
  65.         ),
  66.       ),
  67.     );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement