import 'package:flutter/material.dart'; import 'package:universal_io/io.dart'; import '../../utils/util_web.dart' if (dart.library.io) '../../utils/util_io.dart'; class DownloadItem extends StatefulWidget { final dynamic desc; final double width; const DownloadItem(this.desc, {Key key, this.width}) : super(key: key); @override State createState() { return DownloadItemState(); } } class DownloadItemState extends State { @override Widget build(BuildContext context) { return Container( padding: EdgeInsets.only(top: 10.0, bottom: 10.0, left: 10.0, right: 10.0), child: Column( children: [ Container( child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Container( child: Row( children: [ Container( child: Util.showImage( 'https:${widget.desc['app_icon']}', width: 32.0, height: 32.0, fit: BoxFit.fill, ), ), Container( child: Column( children: [ Text( '${widget.desc['name']}', style: TextStyle( fontWeight: FontWeight.bold, fontSize: 15.0, color: Colors.black87, ), ), Text( '${widget.desc['version']}', style: TextStyle( fontSize: 12.0, color: Colors.black38, ), ), ], ), ), ], ), ), Container( child: getDownloadButton(), ), ], ), ), Container( child: Text( '${widget.desc['description']}', style: TextStyle( color: Colors.black54, ), overflow: TextOverflow.ellipsis, ), ), ], ), ); } Widget getDownloadButton() { return null; } }