-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy patharticle_page.dart
More file actions
36 lines (33 loc) · 844 Bytes
/
article_page.dart
File metadata and controls
36 lines (33 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import 'package:flutter/material.dart';
import 'package:flutter_testing_tutorial/article.dart';
class ArticlePage extends StatelessWidget {
final Article article;
const ArticlePage({
required this.article,
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
final mq = MediaQuery.of(context);
return Scaffold(
body: SingleChildScrollView(
padding: EdgeInsets.only(
top: mq.padding.top,
bottom: mq.padding.bottom,
left: 8,
right: 8,
),
child: Column(
children: [
Text(
article.title,
style: Theme.of(context).textTheme.headlineSmall,
),
const SizedBox(height: 8),
Text(article.content),
],
),
),
);
}
}