-
Notifications
You must be signed in to change notification settings - Fork 0
/
infoPage.dart
63 lines (58 loc) · 1.76 KB
/
infoPage.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
63
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:interiit_prep/features/foodtech/doctorListPage.dart';
import 'package:interiit_prep/features/healthtech/components/inputField.dart';
import 'package:interiit_prep/shared/textWidgets.dart';
import '../../shared/appColors.dart';
class InfoPage extends StatefulWidget {
const InfoPage({
Key? key,
this.title,
required this.question,
required this.hint,
required this.controller,
required this.buttonText,
required this.func,
}) : super(key: key);
final String question, hint;
final TextEditingController controller;
final String buttonText;
final Function func;
final String? title;
@override
State<InfoPage> createState() => _InfoPageState();
}
class _InfoPageState extends State<InfoPage> {
@override
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TitleText(text: widget.title ?? ''),
SizedBox(height: 60,),
MediumText(text: widget.question),
const SizedBox(height: 14,),
InputField(controller: widget.controller, hint: widget.hint),
const SizedBox(height: 24,),
GestureDetector(
onTap: (){
widget.func();
},
child: Text(
widget.buttonText,
style: GoogleFonts.lato(
textStyle: const TextStyle(
fontSize: 18,
color: AppColors.greenColor,
fontWeight: FontWeight.w500,
decoration: TextDecoration.underline
)
),
),
),
// Spacer(),
],
);
}
}