Skip to content

Instantly share code, notes, and snippets.

@albertusdev
Created March 20, 2019 12:56
Show Gist options
  • Save albertusdev/8600bd24a46b14644b93b8bfc61b9ae1 to your computer and use it in GitHub Desktop.
Save albertusdev/8600bd24a46b14644b93b8bfc61b9ae1 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
import 'package:learn_fazz/models/course_detail_result.dart';
const String courseName = 'Intro to English Grammar';
const String lecturerName = 'Jackson K.';
class CourseListCard extends StatelessWidget {
final CourseDetailResult course;
CourseListCard(this.course, {Key key});
@override
Widget build(BuildContext context) {
return InkWell(
child: Card(
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
ListTile(
leading: CircleAvatar(
child: Text('I', style: TextStyle(fontSize: 25.0, fontWeight: FontWeight.w300, color: Colors.white),),
radius: 24.0,
backgroundColor: Color(0xFF18BA62),
),
title: Text(course?.name, style: TextStyle(fontSize: 16.0),),
subtitle: Text(course?.teacher?.name, style: TextStyle(fontSize: 14.0, color: Color(0xFF18BA62)),),
trailing: InkWell(
child: Icon(Icons.keyboard_arrow_right, color: Color(0xFF666666),),
),
),
],
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment