]>
Commit | Line | Data |
---|---|---|
40d61f6e AL |
1 | import 'package:flutter/material.dart'; |
2 | import 'package:url_launcher/url_launcher.dart'; | |
9bb60c76 | 3 | import 'package:pve_flutter_frontend/utils/proxmox_colors.dart'; |
40d61f6e AL |
4 | |
5 | // goodbye | |
6 | class PveWelcomePageLast extends StatelessWidget { | |
59df1bb3 | 7 | const PveWelcomePageLast({super.key, this.onDone}); |
40d61f6e | 8 | |
598a93b4 | 9 | final VoidCallback? onDone; |
40d61f6e AL |
10 | |
11 | @override | |
12 | Widget build(BuildContext context) { | |
13 | return Container(child: LayoutBuilder( | |
14 | builder: (BuildContext context, BoxConstraints viewportConstraints) { | |
15 | return SingleChildScrollView( | |
16 | child: ConstrainedBox( | |
17 | constraints: BoxConstraints(minHeight: viewportConstraints.maxHeight), | |
18 | child: IntrinsicHeight( | |
19 | child: Padding( | |
20 | padding: const EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 0.0), | |
21 | child: Column( | |
22 | mainAxisAlignment: MainAxisAlignment.spaceBetween, | |
23 | children: [ | |
5d2e7931 | 24 | const Spacer(flex: 3), |
40d61f6e AL |
25 | Column( |
26 | mainAxisAlignment: MainAxisAlignment.center, | |
27 | children: [ | |
5d2e7931 TL |
28 | const Text("Enjoy the app"), |
29 | const Padding( | |
30 | padding: EdgeInsets.all(8.0), | |
40d61f6e AL |
31 | child: Icon( |
32 | Icons.emoji_people_rounded, | |
33 | color: Colors.white, | |
34 | size: 70, | |
35 | ), | |
36 | ), | |
37 | Padding( | |
38 | padding: const EdgeInsets.all(8.0), | |
95af6e03 | 39 | child: ElevatedButton( |
598a93b4 | 40 | onPressed: () => {onDone!()}, |
95af6e03 DC |
41 | style: ElevatedButton.styleFrom( |
42 | backgroundColor: ProxmoxColors.orange, | |
43 | foregroundColor: Colors.white, | |
44 | ), | |
5d2e7931 | 45 | child: const Text("Start"), |
40d61f6e AL |
46 | ), |
47 | ), | |
48 | ], | |
49 | ), | |
5d2e7931 | 50 | const Spacer(flex: 1), |
40d61f6e | 51 | ConstrainedBox( |
5d2e7931 | 52 | constraints: const BoxConstraints(maxWidth: 500), |
40d61f6e AL |
53 | child: Column( |
54 | children: [ | |
5d2e7931 | 55 | const Text( |
40d61f6e AL |
56 | 'If you have suggestions or experience any problems, please contact us via', |
57 | textAlign: TextAlign.center, | |
58 | ), | |
59 | Row( | |
60 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, | |
61 | children: [ | |
f57a88a5 | 62 | OutlinedButton( |
40d61f6e AL |
63 | onPressed: () => |
64 | {launch('https://forum.proxmox.com')}, | |
f57a88a5 | 65 | style: OutlinedButton.styleFrom( |
27a2bb4e | 66 | side: const BorderSide( |
d6b19533 | 67 | color: ProxmoxColors.supportGrey), |
f57a88a5 DC |
68 | foregroundColor: Colors.white, |
69 | ), | |
59df1bb3 | 70 | child: const Text('Forum'), |
40d61f6e | 71 | ), |
f57a88a5 | 72 | OutlinedButton( |
40d61f6e AL |
73 | onPressed: () => { |
74 | launch( | |
75 | 'https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-user') | |
76 | }, | |
f57a88a5 | 77 | style: OutlinedButton.styleFrom( |
27a2bb4e | 78 | side: const BorderSide( |
d6b19533 | 79 | color: ProxmoxColors.supportGrey), |
f57a88a5 DC |
80 | foregroundColor: Colors.white, |
81 | ), | |
59df1bb3 | 82 | child: const Text('User Mailing List'), |
40d61f6e AL |
83 | ), |
84 | ], | |
85 | ), | |
86 | ], | |
87 | ), | |
88 | ), | |
5d2e7931 | 89 | const Spacer( |
40d61f6e AL |
90 | flex: 2, |
91 | ) | |
92 | ], | |
93 | ), | |
94 | ), | |
95 | ), | |
96 | ), | |
97 | ); | |
98 | })); | |
99 | } | |
100 | } |