import 'package:onlineschool/staff/labulabu/commonwidget/TopPromoSlider.dart'; import…
- User
import 'package:onlineschool/staff/labulabu/common_widget/TopPromoSlider.dart'; import 'package:onlineschool/cusomer/labulabu/screens/Details.dart'; import 'package:onlineschool/staff/labulabu/utils/Utils.dart'; import 'package:onlineschool/cusomer/signin/googleSigin.dart'; import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:intl/intl.dart'; import 'package:smooth_star_rating/smooth_star_rating.dart';
class GridTilesCategory extends StatelessWidget { String username; String mediaUrl; String mediaUrlTitle; String description; String category; String ownerId; String postId; String poster; String title; String language; String price; String pdfurl; double rating;
// writecontent String defaultFontFamily = 'Roboto-Light.ttf'; double defaultFontSize = 14; double defaultIconSize = 17;
GridTilesCategory({ Key key, @required this.username, @required this.mediaUrl, @required this.mediaUrlTitle, @required this.description, @required this.category, @required this.ownerId, @required this.postId, @required this.title, @required this.poster, @required this.price, @required this.language, @required this.pdfurl, @required this.rating, }) : super(key: key); TextStyle boldStyle = TextStyle( color: Colors.black, fontWeight: FontWeight.bold, );
@override Widget build(BuildContext context) { String formatPrice = new NumberFormat("#,##0", "en_US").format(int.parse(price)); double width = (MediaQuery.of(context).size.width); return InkWell( onTap: () {
codeNavigator.push( context, MaterialPageRoute( builder: (context) => Details( username:username, mediaUrl:mediaUrl, mediaUrlTitle:mediaUrlTitle, description:description, category:category, ownerId:ownerId, postId:postId, poster:poster, title:title, rating: rating, language:language, price:price, pdfurl: pdfurl )), ); }, child: Card( color: Colors.white, elevation: 0, child: Column( mainAxisSize: MainAxisSize.min, children: <Widget>[// buildPostHeader(title: username) , buildLikeableImage(image: mediaUrlTitle,postId: postId+"staffcategory"), // writeContent(Icons.monetization_on, " "+formatPrice+" "+Utils.crrmark, 0xFFFF0000,Utils.price), writeContent(Icons.title, title, 0xFF666666,Utils.title), // writeContent(Icons.language, language, 0xFF666666, Utils.language), Row( mainAxisAlignment: MainAxisAlignment.start, children: [ // Padding(padding: const EdgeInsets.only(left: 20.0, top: 40.0)), Expanded(child: SmoothStarRating( rating: rating, isReadOnly: true, size: width/50, color: Colors.blue, filledIconData: Icons.star, // halfFilledIconData: Icons.star_half, defaultIconData: Icons.star_border,
- Assistant
- User
dont have AutoSizeText
- Assistant
- User
dont have width
- Assistant