59 lines
2.8 KiB
Dart
59 lines
2.8 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/references.dart';
|
|
import 'package:unit2/theme-data.dart/box_shadow.dart';
|
|
import 'package:unit2/theme-data.dart/colors.dart';
|
|
import 'package:unit2/utils/text_container.dart';
|
|
|
|
class ReferencesScreen extends StatefulWidget {
|
|
final List<PersonalReference> references;
|
|
const ReferencesScreen({super.key, required this.references});
|
|
|
|
@override
|
|
State<ReferencesScreen> createState() => _ReferencesScreenState();
|
|
}
|
|
|
|
class _ReferencesScreenState extends State<ReferencesScreen> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
appBar: AppBar(title: const Text(referencesScreenTitle),centerTitle: true,backgroundColor: primary,),
|
|
body: ListView.builder(
|
|
padding: const EdgeInsets.symmetric(vertical: 8,horizontal: 10),
|
|
itemCount: widget.references.length,
|
|
itemBuilder: (BuildContext context, int index){
|
|
String fullname = "${widget.references[index].firstName} ${widget.references[index].middleName} ${widget.references[index].lastName}";
|
|
String addres = "${widget.references[index].address!.cityMunicipality!.description}, ${widget.references[index].address!.cityMunicipality!.province!.description}, ${widget.references[0].address!.cityMunicipality!.province!.region!.description}";
|
|
String mobile = widget.references[index].contactNo.toString();
|
|
return Column(children: [
|
|
Container(
|
|
padding: const EdgeInsets.symmetric(horizontal: 12,vertical: 8),
|
|
decoration:box1(),
|
|
child: Row(
|
|
children: [
|
|
Expanded(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
|
|
Text(fullname,style: Theme.of(context).textTheme.titleMedium!.copyWith(fontWeight: FontWeight.w500)),
|
|
const Divider(),
|
|
const SizedBox(height: 5,),
|
|
Text(addres,style: Theme.of(context).textTheme.titleSmall!.copyWith(fontWeight: FontWeight.w500)),
|
|
const SizedBox(height: 8,),
|
|
Text("${mobileOrPhone.toUpperCase()} : $mobile",style: Theme.of(context).textTheme.labelMedium!),
|
|
],),
|
|
),
|
|
IconButton(onPressed: (){}, icon: const Icon(Icons.more_vert,color: Colors.grey,))
|
|
],
|
|
),
|
|
),
|
|
const SizedBox(height: 5,),
|
|
],);
|
|
}) ,
|
|
);
|
|
}
|
|
} |