-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SelectedCategoryPage Error #20
Comments
dont know why keep error .. |
the same problem here! =( |
hey @thyagosouza @MarioCastle what's the precise error you're getting so I can help? thanks |
hey master... the problem for this question I found in the other topic .. it was just adding the SubCategory at the end of the code. As is in the image. |
import 'package:boss111/models/category.dart';
import 'package:boss111/pages/detailspage.dart';
import 'package:boss111/widgets/categoryicon.dart';
import 'package:flutter/material.dart';
import '../../../widgets/mainappbar.dart';
class SelectedCategoryPage extends StatelessWidget {
Category? selectedCategory;
SelectedCategoryPage({this.selectedCategory});
@OverRide
Widget build(BuildContext context) {
return Scaffold(
appBar: MainAppBar(),
body: Container(
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
CategoryIcon(
color: this.selectedCategory!.color!,
iconName: this.selectedCategory!.icon!),
SizedBox(width: 10),
Text(
this.selectedCategory!.name!,
style: TextStyle(
color: this.selectedCategory!.color!, fontSize: 20),
),
],
),
SizedBox(height: 30),
Expanded(
child: GridView.count(
crossAxisCount: 2,
children: List.generate(
this.selectedCategory!.subCategories!.length,
(index) {
return GestureDetector(
onTap: () {
// NAVIGATE to the details page
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => DetailsPage(
}
}
The text was updated successfully, but these errors were encountered: