52 lines
1.5 KiB
Dart
52 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../../model/course.dart';
|
|
import 'components/course_card.dart';
|
|
import 'components/secondary_course_card.dart';
|
|
|
|
class HomePage extends StatelessWidget {
|
|
const HomePage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: SafeArea(
|
|
bottom: false,
|
|
child: SingleChildScrollView(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
const SizedBox(height: 40),
|
|
Padding(
|
|
padding: const EdgeInsets.all(20),
|
|
child: Text(
|
|
"TRADUTTORE ITALIANO DIALETTO MTTOLESE",
|
|
style: Theme.of(context).textTheme.headlineMedium!.copyWith(
|
|
color: Colors.black, fontWeight: FontWeight.bold),
|
|
),
|
|
),
|
|
SingleChildScrollView(
|
|
scrollDirection: Axis.horizontal,
|
|
child: Row(
|
|
children: courses
|
|
.map(
|
|
(course) => Padding(
|
|
padding: const EdgeInsets.only(left: 20),
|
|
child: CourseCard(
|
|
title: course.title,
|
|
iconSrc: course.iconSrc,
|
|
color: course.color,
|
|
),
|
|
),
|
|
)
|
|
.toList(),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|