-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRequestCard.dart
72 lines (68 loc) · 2.64 KB
/
RequestCard.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
64
65
66
67
68
69
70
71
72
import 'package:flutter/material.dart';
import 'package:course_swap/CourseDropDown.dart';
class RequestCard extends StatefulWidget {
const RequestCard({Key? key}) : super(key: key);
@override
_RequestCardState createState() => _RequestCardState();
}
class _RequestCardState extends State<RequestCard> {
List<String> courses = ['EEE F111', 'CS F111', 'PHY F111', 'CHEM F111'];
String? value;
int? selectedVal = 0;
@override
Widget build(BuildContext context) {
return Card(
color: Colors.blueGrey.shade900,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
margin: EdgeInsets.all(12),
child: Container(
child: Padding(
padding: EdgeInsets.all(8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
RadioListTile<int>(
value: 0,
title: Text('Swap Only'),
subtitle: Text(
'You get the option to only swap course with someone else'),
groupValue: selectedVal,
onChanged: (value) =>
setState(() => selectedVal = value)),
RadioListTile<int>(
value: 1,
title: Text('Drop Course'),
subtitle: Text('Put a request to drop a course'),
groupValue: selectedVal,
onChanged: (value) =>
setState(() => selectedVal = value)),
RadioListTile<int>(
value: 2,
title: Text('Want Course'),
subtitle: Text('Put a request to take a course'),
groupValue: selectedVal,
onChanged: (value) =>
setState(() => selectedVal = value)),
CourseDropDown(DropDescription: 'Courses', courses: courses,value: null),
CourseDropDown(DropDescription: 'Courses', courses: courses,value: null),
Center(
child: ElevatedButton(
style: ElevatedButton.styleFrom(primary: Colors.green),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'Request',
style: TextStyle(fontSize: 20),
),
),
onPressed: () {},
),
)
],
)),
),
);
}
}