69 lines
2.6 KiB
Dart
69 lines
2.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter/src/widgets/framework.dart';
|
|
import 'package:flutter/src/widgets/placeholder.dart';
|
|
import 'package:unit2/model/profile/eligibility.dart';
|
|
import 'package:unit2/theme-data.dart/colors.dart';
|
|
import 'package:unit2/utils/global.dart';
|
|
|
|
class EligibiltyScreen extends StatefulWidget {
|
|
final List<EligibityCert> eligibilities;
|
|
const EligibiltyScreen({super.key, required this.eligibilities});
|
|
|
|
@override
|
|
State<EligibiltyScreen> createState() => _EligibiltyScreenState();
|
|
}
|
|
|
|
class _EligibiltyScreenState extends State<EligibiltyScreen> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
title: const Text("Eligibility"),
|
|
centerTitle: true,
|
|
backgroundColor: primary,
|
|
),
|
|
body: ListView.builder(
|
|
itemCount: widget.eligibilities.length,
|
|
itemBuilder: (BuildContext context, int index) {
|
|
return Column(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Container(
|
|
width: screenWidth,
|
|
padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8),
|
|
decoration: BoxDecoration(
|
|
color: Colors.grey[200],
|
|
borderRadius:
|
|
const BorderRadius.all(Radius.circular(12))),
|
|
child: Row(
|
|
children: [
|
|
Expanded(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Text(widget.eligibilities[index].eligibility!.title!,
|
|
style: Theme.of(context)
|
|
.textTheme
|
|
.titleMedium!
|
|
.copyWith(fontWeight: FontWeight.bold)),
|
|
Text(
|
|
"License number: ${widget.eligibilities[index].licenseNumber==null?'N/A':widget.eligibilities[index].licenseNumber.toString()}"),
|
|
Text("Rating: ${widget.eligibilities[index].rating}.")
|
|
]),
|
|
|
|
),
|
|
IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert))
|
|
],
|
|
),
|
|
)
|
|
],
|
|
);
|
|
}),
|
|
);
|
|
}
|
|
}
|