하단 광고 추가
This commit is contained in:
@@ -6,7 +6,6 @@ import 'package:intl/intl.dart';
|
|||||||
import 'package:csp2/common/widgets/upcoming_class_card.dart';
|
import 'package:csp2/common/widgets/upcoming_class_card.dart';
|
||||||
import 'package:csp2/common/widgets/course_card.dart';
|
import 'package:csp2/common/widgets/course_card.dart';
|
||||||
import 'package:csp2/course.dart'; // Course 클래스 import
|
import 'package:csp2/course.dart'; // Course 클래스 import
|
||||||
// import 'package:flutter_native_timezone/flutter_native_timezone.dart'; // 주석 처리된 상태 유지
|
|
||||||
import '../plan_page.dart'; // PlanPage import
|
import '../plan_page.dart'; // PlanPage import
|
||||||
|
|
||||||
// CaseStudyPlan 클래스 (변경 없음)
|
// CaseStudyPlan 클래스 (변경 없음)
|
||||||
@@ -309,8 +308,8 @@ class _HomePageState extends State<HomePage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildHomeContent() {
|
Widget _buildHomeContent() {
|
||||||
return Column(
|
return SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Padding(
|
Padding(
|
||||||
@@ -379,7 +378,7 @@ class _HomePageState extends State<HomePage> {
|
|||||||
child: Text('Find Your New Course', style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
|
child: Text('Find Your New Course', style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 175, // 가로 리스트의 높이
|
height: 180,
|
||||||
child: FutureBuilder<List<Course>>(
|
child: FutureBuilder<List<Course>>(
|
||||||
future: _newCoursesFuture,
|
future: _newCoursesFuture,
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
@@ -400,7 +399,7 @@ class _HomePageState extends State<HomePage> {
|
|||||||
itemCount: courses.length,
|
itemCount: courses.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final course = courses[index];
|
final course = courses[index];
|
||||||
return CourseCard(course: course,);
|
return CourseCard(course: course);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -409,10 +408,10 @@ class _HomePageState extends State<HomePage> {
|
|||||||
),
|
),
|
||||||
// --- ▲▲▲ Find Your New Course 섹션 끝 ▲▲▲ ---
|
// --- ▲▲▲ Find Your New Course 섹션 끝 ▲▲▲ ---
|
||||||
// --- ▼▼▼ 추천 클래스 섹션 호출 ▼▼▼ ---
|
// --- ▼▼▼ 추천 클래스 섹션 호출 ▼▼▼ ---
|
||||||
// _buildRecommendSection(),
|
_buildRecommendSection(),
|
||||||
// --- ▲▲▲ 추천 클래스 섹션 호출 끝 ▲▲▲ ---
|
// --- ▲▲▲ 추천 클래스 섹션 호출 끝 ▲▲▲ ---
|
||||||
|
|
||||||
],
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -474,8 +473,8 @@ class _HomePageState extends State<HomePage> {
|
|||||||
final currentPlan = _recommendPlans[_currentRecommendIndex];
|
final currentPlan = _recommendPlans[_currentRecommendIndex];
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
margin: const EdgeInsets.fromLTRB(16.0, 12.0, 16.0, 16.0), // 하단 마진 추가
|
margin: const EdgeInsets.fromLTRB(0.0, 12.0, 0.0, 0.0), // 하단 마진 추가
|
||||||
padding: const EdgeInsets.all(12.0),
|
// padding: const EdgeInsets.all(12.0),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).cardColor, // 카드 색상 사용
|
color: Theme.of(context).cardColor, // 카드 색상 사용
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
@@ -491,26 +490,9 @@ class _HomePageState extends State<HomePage> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
|
||||||
'✨ Recommend Classes', // 이모지 추가
|
|
||||||
style: Theme.of(context).textTheme.titleLarge?.copyWith(fontWeight: FontWeight.bold),
|
|
||||||
),
|
|
||||||
|
|
||||||
const SizedBox(height: 12.0),
|
|
||||||
|
|
||||||
Text(
|
|
||||||
currentPlan.planName,
|
|
||||||
style: Theme.of(context).textTheme.titleMedium?.copyWith(fontWeight: FontWeight.w500),
|
|
||||||
maxLines: 2,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
),
|
|
||||||
// Test: Plan ID 표시 (디버깅용)
|
|
||||||
// Text('ID: ${currentPlan.planId}', style: TextStyle(fontSize: 10, color: Colors.grey)),
|
|
||||||
|
|
||||||
AspectRatio(
|
AspectRatio(
|
||||||
aspectRatio: 16 / 9,
|
aspectRatio: 6 / 1,
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
child: currentPlan.thumbnail.isNotEmpty
|
child: currentPlan.thumbnail.isNotEmpty
|
||||||
? Image.network(
|
? Image.network(
|
||||||
currentPlan.thumbnail,
|
currentPlan.thumbnail,
|
||||||
|
|||||||
Reference in New Issue
Block a user