-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathlesson_finished.dart
62 lines (58 loc) · 1.77 KB
/
lesson_finished.dart
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class LessonFinishedWidget extends StatelessWidget {
const LessonFinishedWidget({super.key});
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("👋🏼 Great Job !",
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w700)),
Text(
"You can invite your friends to learn a thing about Air Pollution",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 18, fontWeight: FontWeight.w500)),
SizedBox(height: 64),
SmallRoundedButton(
label: "Share",
imagePath: "assets/images/shared/share_icon.svg",
),
SizedBox(height: 16),
SmallRoundedButton(
label: "Rate the App",
imagePath: "assets/images/shared/bookmark_icon.svg",
),
],
),
);
}
}
class SmallRoundedButton extends StatelessWidget {
final String label;
final String imagePath;
const SmallRoundedButton(
{super.key, required this.label, required this.imagePath});
@override
Widget build(BuildContext context) {
return Container(
height: 49,
width: 144,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(200),
color: Theme.of(context).highlightColor),
child: Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset(imagePath),
SizedBox(width: 4),
Text(label),
],
),
),
);
}
}