Skip to content

Commit e2ea23c

Browse files
committed
feat: Movie Selection Screen #1
1 parent aee94ca commit e2ea23c

File tree

9 files changed

+693
-112
lines changed

9 files changed

+693
-112
lines changed

movie_selection_screen/lib/main.dart

+2-112
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'package:flutter/material.dart';
2+
import 'package:movie_selection_screen/presentation/movie_display/movie_display.dart';
23

34
void main() {
45
runApp(const MyApp());
@@ -7,119 +8,8 @@ void main() {
78
class MyApp extends StatelessWidget {
89
const MyApp({super.key});
910

10-
// This widget is the root of your application.
1111
@override
1212
Widget build(BuildContext context) {
13-
return MaterialApp(
14-
title: 'Flutter Demo',
15-
theme: ThemeData(
16-
// This is the theme of your application.
17-
//
18-
// TRY THIS: Try running your application with "flutter run". You'll see
19-
// the application has a purple toolbar. Then, without quitting the app,
20-
// try changing the seedColor in the colorScheme below to Colors.green
21-
// and then invoke "hot reload" (save your changes or press the "hot
22-
// reload" button in a Flutter-supported IDE, or press "r" if you used
23-
// the command line to start the app).
24-
//
25-
// Notice that the counter didn't reset back to zero; the application
26-
// state is not lost during the reload. To reset the state, use hot
27-
// restart instead.
28-
//
29-
// This works for code too, not just values: Most code changes can be
30-
// tested with just a hot reload.
31-
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
32-
useMaterial3: true,
33-
),
34-
home: const MyHomePage(title: 'Flutter Demo Home Page'),
35-
);
36-
}
37-
}
38-
39-
class MyHomePage extends StatefulWidget {
40-
const MyHomePage({super.key, required this.title});
41-
42-
// This widget is the home page of your application. It is stateful, meaning
43-
// that it has a State object (defined below) that contains fields that affect
44-
// how it looks.
45-
46-
// This class is the configuration for the state. It holds the values (in this
47-
// case the title) provided by the parent (in this case the App widget) and
48-
// used by the build method of the State. Fields in a Widget subclass are
49-
// always marked "final".
50-
51-
final String title;
52-
53-
@override
54-
State<MyHomePage> createState() => _MyHomePageState();
55-
}
56-
57-
class _MyHomePageState extends State<MyHomePage> {
58-
int _counter = 0;
59-
60-
void _incrementCounter() {
61-
setState(() {
62-
// This call to setState tells the Flutter framework that something has
63-
// changed in this State, which causes it to rerun the build method below
64-
// so that the display can reflect the updated values. If we changed
65-
// _counter without calling setState(), then the build method would not be
66-
// called again, and so nothing would appear to happen.
67-
_counter++;
68-
});
69-
}
70-
71-
@override
72-
Widget build(BuildContext context) {
73-
// This method is rerun every time setState is called, for instance as done
74-
// by the _incrementCounter method above.
75-
//
76-
// The Flutter framework has been optimized to make rerunning build methods
77-
// fast, so that you can just rebuild anything that needs updating rather
78-
// than having to individually change instances of widgets.
79-
return Scaffold(
80-
appBar: AppBar(
81-
// TRY THIS: Try changing the color here to a specific color (to
82-
// Colors.amber, perhaps?) and trigger a hot reload to see the AppBar
83-
// change color while the other colors stay the same.
84-
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
85-
// Here we take the value from the MyHomePage object that was created by
86-
// the App.build method, and use it to set our appbar title.
87-
title: Text(widget.title),
88-
),
89-
body: Center(
90-
// Center is a layout widget. It takes a single child and positions it
91-
// in the middle of the parent.
92-
child: Column(
93-
// Column is also a layout widget. It takes a list of children and
94-
// arranges them vertically. By default, it sizes itself to fit its
95-
// children horizontally, and tries to be as tall as its parent.
96-
//
97-
// Column has various properties to control how it sizes itself and
98-
// how it positions its children. Here we use mainAxisAlignment to
99-
// center the children vertically; the main axis here is the vertical
100-
// axis because Columns are vertical (the cross axis would be
101-
// horizontal).
102-
//
103-
// TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint"
104-
// action in the IDE, or press "p" in the console), to see the
105-
// wireframe for each widget.
106-
mainAxisAlignment: MainAxisAlignment.center,
107-
children: <Widget>[
108-
const Text(
109-
'You have pushed the button this many times:',
110-
),
111-
Text(
112-
'$_counter',
113-
style: Theme.of(context).textTheme.headlineMedium,
114-
),
115-
],
116-
),
117-
),
118-
floatingActionButton: FloatingActionButton(
119-
onPressed: _incrementCounter,
120-
tooltip: 'Increment',
121-
child: const Icon(Icons.add),
122-
), // This trailing comma makes auto-formatting nicer for build methods.
123-
);
13+
return const MaterialApp(home: MovieDisplay());
12414
}
12515
}

movie_selection_screen/lib/model.dart

+135
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
class Movie {
2+
String title;
3+
String image;
4+
String director;
5+
String rating;
6+
String duration;
7+
String price;
8+
String genre;
9+
String releaseDate;
10+
String ageRestriction;
11+
String cast;
12+
String description;
13+
14+
Movie({
15+
required this.title,
16+
required this.image,
17+
required this.director,
18+
required this.rating,
19+
required this.duration,
20+
required this.price,
21+
required this.genre,
22+
required this.releaseDate,
23+
required this.ageRestriction,
24+
required this.cast,
25+
required this.description,
26+
});
27+
}
28+
29+
final List<Movie> movieItems = [
30+
Movie(
31+
title: 'Công Tử Bạc Liêu',
32+
image:
33+
'https://cdn-media.sforum.vn/storage/app/media/quynh/phim-viet-nam-chieu-rap-1.jpg',
34+
director: 'Direct by Lý Minh Thắng',
35+
rating: '4.7',
36+
duration: '1h:46m',
37+
price: '180',
38+
genre: 'Hài, gia đình',
39+
releaseDate: '20/12/2024',
40+
ageRestriction: '16+',
41+
cast: 'Song Luân, Thiên Ân, Công Dương',
42+
description:
43+
'Đây là tựa phim Việt Nam chiếu rạp đáng mong đợi trong dịp cuối năm 2024. Phim quay về những năm 1930, xoay quanh câu chuyện về Công tử Bạc Liêu với lối sống hưởng thụ và thích ăn chơi.\n\nCậu là người có tư tưởng khá hiện đại, thích làm ngược lại những quy định mà cậu cho là cổ hủ. Phim cho khán giả thấy lại được những giai thoại, sự kiện nổi tiếng gắn liền với Công tử Bạc Liêu.',
44+
),
45+
Movie(
46+
title: 'Linh Miêu: Quỷ Nhập Tràng',
47+
image:
48+
'https://cdn-media.sforum.vn/storage/app/media/quynh/phim-viet-nam-chieu-rap-2.jpg',
49+
director: 'Direct by Lưu Thành Luân',
50+
rating: '4.5',
51+
duration: '1h:49m',
52+
price: '200',
53+
genre: 'Kinh dị',
54+
releaseDate: '22/11/2024',
55+
ageRestriction: '18+',
56+
cast: 'Hồng Đào, Nguyễn Thúc Thùy Tiên, Samuel An',
57+
description:
58+
'Linh Miêu là phim chiếu rạp Việt Nam kể về câu chuyện của một gia đình sống tại Huế vào những năm 90. Với chủ đề liên quan đến quỷ nhập tràng, phim sẽ mang đến nội dung với nhiều chi tiết kinh dị.\n\nPhim còn đề cập đến việc phân biệt giới tính, cho người xem thấy được những lề lối xưa và cả những bất hạnh của từng người trong gia đình.',
59+
),
60+
Movie(
61+
title: 'Ngày Xưa Có Một Chuyện Tình',
62+
image:
63+
'https://cdn-media.sforum.vn/storage/app/media/quynh/phim-viet-nam-chieu-rap-3.jpg',
64+
director: 'Direct by Trịnh Đình Lê Minh',
65+
rating: '4.8',
66+
duration: '2h:03m',
67+
price: '190',
68+
genre: 'Lãng mạn',
69+
releaseDate: '01/11/2024',
70+
ageRestriction: '16+',
71+
cast: 'Ngọc Xuân, Nhật Hoàng, Alvin Lu',
72+
description:
73+
'Ngày Xưa Có Một Chuyện Tình là phim Việt chiếu rạp kể về câu chuyện tình bạn và tình yêu của 3 bạn trẻ. Vinh thầm thương Miền từ thời thơ ấu nhưng lại không thể thổ lộ.\n\nCòn Miền và Vinh thì lại chẳng thể bên cạnh nhau do một gặp phải biến cố. Câu chuyện của 3 người trẻ từ lúc nhỏ đến khi lớn khiến người xem cực kỳ đồng cảm.',
74+
),
75+
Movie(
76+
title: 'Cám',
77+
image:
78+
'https://cdn-media.sforum.vn/storage/app/media/quynh/phim-viet-nam-chieu-rap-4.jpg',
79+
director: 'Direct by Trần Hữu Tấn',
80+
rating: '4.6',
81+
duration: '2h:02m',
82+
price: '170',
83+
genre: 'Kinh dị',
84+
releaseDate: '20/09/2024',
85+
ageRestriction: '18+',
86+
cast: 'Lâm Thanh My, Rima Thanh Vy, Thúy Diễm, Quốc Cường',
87+
description:
88+
'Cám là tựa phim Việt Nam chiếu rạp đề tài kinh dị với cốt truyện dân gian đầy sự ghê rợn. Phim cho khán giả thấy được những hủ tục đáng sợ cùng những bi kịch cứ tiếp diễn trong cuộc đời của nhân vật.\n\nTạo hình nhân vật trong phim cũng cực kỳ ấn tượng, tạo được cảm giác ghê sợ cho người xem.',
89+
),
90+
Movie(
91+
title: 'Cô Dâu Hào Môn',
92+
image:
93+
'https://cdn-media.sforum.vn/storage/app/media/quynh/phim-viet-nam-chieu-rap-5.jpg',
94+
director: 'Direct by Vũ Ngọc Đãng',
95+
rating: '4.7',
96+
duration: '1h:54m',
97+
price: '190',
98+
genre: 'Tâm lý, hài, gia đình',
99+
releaseDate: '18/10/2024',
100+
ageRestriction: '18+',
101+
cast: 'Uyển Ân, Kiều Minh Tuấn, Thu Trang, Lê Giang, Samuel An',
102+
description:
103+
'Cô Dâu Hào Môn là phim chiếu rạp Việt Nam lấy chủ đề tâm lý gia đình và pha lẫn vào đó là những chi tiết hài hước.\n\nPhim khai thác nội dung về môn đăng hộ đối trong hôn nhân, tình yêu sẽ không thể gắn kết nếu cả hai gia đình có gia cảnh và tư duy quá khác biệt. Phim cho người xem cảm nhận được nỗi khổ của cả người nghèo lẫn người giàu trong xã hội.',
104+
),
105+
Movie(
106+
title: 'Hai Muối',
107+
image:
108+
'https://cdn-media.sforum.vn/storage/app/media/quynh/phim-viet-nam-chieu-rap-6.jpg',
109+
director: 'Direct by NSƯT Vũ Thành Vinh',
110+
rating: '4.6',
111+
duration: '2h:03m',
112+
price: '180',
113+
genre: 'Gia đình, chính kịch',
114+
releaseDate: '30/08/2024',
115+
ageRestriction: '13+',
116+
cast: 'Quyền Linh, Kim Hải, Hồng Vân, Việt Anh',
117+
description:
118+
'Hai Muối cũng là tựa phim Việt Nam chiếu rạp được khá nhiều khán giả yêu thích trong năm 2024 này. Phim kể về câu chuyện của một cô gái mất mẹ từ rất sớm và sống trong vòng tay của cha tại đảo Thiềng Liềng.\n\nNhững chuyển biến hấp dẫn diễn ra khi Muối quyết định rời quê để đến vùng đất mới, tìm việc để phụ ba.',
119+
),
120+
Movie(
121+
title: 'Lật Mặt 7: Một Điều Ước',
122+
image:
123+
'https://cdn-media.sforum.vn/storage/app/media/quynh/phim-viet-nam-chieu-rap-8.jpg',
124+
director: 'Direct by Lý Hải',
125+
rating: '4.9',
126+
duration: '2h:40m',
127+
price: '200',
128+
genre: 'Gia đình, tình cảm, hài',
129+
releaseDate: '26/04/2024',
130+
ageRestriction: 'Mọi độ tuổi, dưới 13 tuổi phải có người lớn đi cùng',
131+
cast: 'Thanh Hiền, Đinh Y Nhung, Trương Minh Cường, Quách Ngọc Tuyên',
132+
description:
133+
'Lật Mặt 7: Một Điều Ước là tựa phim Việt Nam chiếu rạp với chủ đề tình thân đưa người xem vào những tình huống hài hước lẫn những chi tiết đẫm nước mắt.\n\nKể về gia đình bà Hai cùng 5 người con đã khôn lớn, mỗi người đều có cuộc sống riêng. Đến khi biến cố xuất hiện, khán giả sẽ thấy được trái tim người mẹ dành cho con là vô cùng lớn.',
134+
),
135+
];

0 commit comments

Comments
 (0)