File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1
1
class Problem {
2
2
final String title;
3
3
final String contestId;
4
+ final String contestName;
4
5
final String statement;
5
6
final String constraints;
6
7
final String inputFormat;
@@ -11,6 +12,7 @@ class Problem {
11
12
Problem ({
12
13
required this .title,
13
14
required this .contestId,
15
+ required this .contestName,
14
16
required this .statement,
15
17
required this .constraints,
16
18
required this .inputFormat,
Original file line number Diff line number Diff line change @@ -290,6 +290,17 @@ class _ProblemDetailScreenState extends State<ProblemDetailScreen> {
290
290
child: Column (
291
291
crossAxisAlignment: CrossAxisAlignment .start,
292
292
children: [
293
+ if (problem.contestName.isNotEmpty && problem.contestName != 'コンテスト名が見つかりません' )
294
+ Padding (
295
+ padding: const EdgeInsets .only (bottom: 8.0 ),
296
+ child: Text (
297
+ problem.contestName,
298
+ style: TextStyle (
299
+ fontSize: 14 ,
300
+ color: Theme .of (context).colorScheme.onSurfaceVariant,
301
+ ),
302
+ ),
303
+ ),
293
304
TexWidget (
294
305
content: problem.title,
295
306
textStyle: const TextStyle (
Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ class AtCoderService {
28
28
// コンテストIDの取得
29
29
final contestId = _extractContestId (url);
30
30
31
+ // コンテスト名の取得
32
+ final contestTitleElement = document.querySelector ('.contest-title' );
33
+ final contestName = contestTitleElement? .text.trim () ?? 'コンテスト名が見つかりません' ;
34
+
31
35
// デバッグ: HTMLの構造を調査
32
36
developer.log ("HTML構造の分析を開始..." );
33
37
_analyzeHtmlStructure (document);
@@ -86,6 +90,7 @@ class AtCoderService {
86
90
return Problem (
87
91
title: title,
88
92
contestId: contestId,
93
+ contestName: contestName,
89
94
statement: statement,
90
95
constraints: constraints,
91
96
inputFormat: inputFormat,
You can’t perform that action at this time.
0 commit comments