123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396 |
- import 'package:dotted_line/dotted_line.dart';
- import 'package:flutter/material.dart';
- import 'package:date_format/date_format.dart';
- import 'package:timeline_tile/timeline_tile.dart';
- var date = formatDate(DateTime.now(), [HH, ':', nn]);
- class DetailPage extends StatelessWidget {
- final Map<String, dynamic> items;
- DetailPage({super.key, required this.items});
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- appBar: AppBar(
- backgroundColor: Colors.white,
- automaticallyImplyLeading: false,
- elevation: 0,
- toolbarHeight: 44,
- title: Text(
- date,
- style: TextStyle(color: Color(0xff303336), fontSize: 15),
- ),
- actions: [
- Icon(
- Icons.signal_cellular_alt,
- color: Color(0xff303336),
- ),
- Icon(
- Icons.wifi,
- color: Color(0xff303336),
- ),
- RotatedBox(
- quarterTurns: -3,
- child: Icon(
- Icons.battery_std,
- color: Color(0xff303336),
- ),
- )
- ],
- ),
- body: SingleChildScrollView(
- child: Column(
- children: [
- Row(
- children: [
- BackButton(),
- Text(
- 'Detail',
- style: TextStyle(fontWeight: FontWeight.bold, fontSize: 17),
- ),
- Spacer(),
- ElevatedButton(
- onPressed: () {},
- style: ElevatedButton.styleFrom(
- backgroundColor: Color(0xff078C84).withOpacity(0.1),
- side: BorderSide(color: Color(0xff078C84)),
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(35))),
- child: Row(
- children: [
- Text(
- 'Forum',
- style:
- TextStyle(color: Color(0xff078C84), fontSize: 15),
- ),
- SizedBox(
- width: 5,
- ),
- Icon(
- Icons.message_outlined,
- color: Color(0xff078C84),
- )
- ],
- ),
- )
- ],
- ),
- Divider(),
- Container(
- height: 44,
- alignment: Alignment.centerLeft,
- padding: EdgeInsets.symmetric(horizontal: 10),
- child: Text(
- items['type'],
- style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14),
- ),
- ),
- Row(
- children: [
- Container(
- width: 400,
- margin: EdgeInsets.symmetric(horizontal: 10),
- decoration: BoxDecoration(
- border: Border.all(color: Colors.black.withOpacity(0.1)),
- shape: BoxShape.rectangle,
- borderRadius: BorderRadius.circular(12)),
- child: Row(
- children: [
- SizedBox(
- width: 100,
- height: 79.17,
- child: gambar(items),
- ),
- Container(
- width: 5,
- ),
- Column(
- children: [
- Container(
- margin: EdgeInsets.all(5),
- child: Text(
- items['smallText'],
- overflow: TextOverflow.clip,
- style: TextStyle(
- fontWeight: FontWeight.w400,
- color: Color(0xff292D32),
- fontSize: 14),
- ),
- ),
- DottedLine(
- lineLength: 272,
- ),
- Container(
- margin: EdgeInsets.all(5),
- width: 272,
- child: Text(
- items['longText'],
- overflow: TextOverflow.clip,
- style: TextStyle(
- fontWeight: FontWeight.w300,
- color: Color(0xff292D32),
- fontSize: 13),
- ),
- )
- ],
- )
- ],
- ),
- ),
- ],
- ),
- Container(
- height: 10,
- ),
- Container(
- padding: EdgeInsets.symmetric(horizontal: 10),
- child: Row(
- children: [
- Text(
- 'Ticket Number',
- style: TextStyle(color: Color(0xff292D32), fontSize: 14),
- ),
- Spacer(),
- Text(
- '202209270254',
- style: TextStyle(color: Color(0xff292D32), fontSize: 14),
- )
- ],
- ),
- ),
- Container(
- height: 10,
- ),
- Container(
- padding: EdgeInsets.symmetric(horizontal: 10),
- child: Row(
- children: [
- Text(
- 'Location',
- style: TextStyle(color: Color(0xff292D32), fontSize: 14),
- ),
- Spacer(),
- Text(
- 'Room 331',
- style: TextStyle(color: Color(0xff292D32), fontSize: 14),
- )
- ],
- ),
- ),
- Container(
- margin: EdgeInsets.all(10),
- height: 1,
- color: Color(0xff292D32).withOpacity(0.5),
- ),
- Container(
- alignment: Alignment.centerLeft,
- padding: EdgeInsets.symmetric(horizontal: 10),
- child: Text(
- 'Image',
- style: TextStyle(fontWeight: FontWeight.w400, fontSize: 14),
- ),
- ),
- Container(
- height: 5,
- ),
- Container(
- alignment: Alignment.centerLeft,
- padding: EdgeInsets.symmetric(horizontal: 10),
- child: Text(
- 'No image attached.',
- style: TextStyle(
- fontWeight: FontWeight.w400,
- fontSize: 12,
- color: Color(0xff292D32).withOpacity(0.85)),
- ),
- ),
- Container(
- height: 10,
- ),
- Container(
- alignment: Alignment.centerLeft,
- padding: EdgeInsets.symmetric(horizontal: 10),
- child: Text(
- 'Note',
- style: TextStyle(fontWeight: FontWeight.w400, fontSize: 14),
- ),
- ),
- Container(
- height: 5,
- ),
- Container(
- alignment: Alignment.centerLeft,
- padding: EdgeInsets.symmetric(horizontal: 10),
- child: Text(
- '-',
- style: TextStyle(
- fontWeight: FontWeight.w400,
- fontSize: 12,
- color: Color(0xff292D32).withOpacity(0.85)),
- ),
- ),
- Divider(
- thickness: 8,
- ),
- Container(
- height: 10,
- ),
- Container(
- alignment: Alignment.centerLeft,
- padding: EdgeInsets.symmetric(horizontal: 10),
- child: Text(
- 'Activity',
- style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14),
- ),
- ),
- Container(
- height: 10,
- ),
- Container(
- padding: EdgeInsets.symmetric(horizontal: 10),
- child: Row(
- children: [
- Text(
- 'Servant',
- style: TextStyle(color: Color(0xff292D32), fontSize: 14),
- ),
- Spacer(),
- Text(
- 'Rendra WS',
- style: TextStyle(color: Color(0xff292D32), fontSize: 14),
- )
- ],
- ),
- ),
- Container(
- margin: EdgeInsets.all(10),
- height: 1,
- color: Color(0xff292D32).withOpacity(0.5),
- ),
- Container(
- alignment: Alignment.centerLeft,
- padding: EdgeInsets.symmetric(horizontal: 10),
- child: Text(
- 'Timeline',
- style: TextStyle(fontWeight: FontWeight.w400, fontSize: 14),
- ),
- ),
- Container(
- margin: EdgeInsets.all(10),
- child: Column(
- children: [
- SizedBox(
- child: TimelineTile(
- isFirst: true,
- endChild: Container(
- margin:
- EdgeInsets.only(bottom: 10, top: 10, left: 10),
- child: Row(
- children: [
- Text('Requested'),
- Spacer(),
- Text('31 Jan 12:43')
- ],
- ),
- ))),
- SizedBox(
- child: TimelineTile(
- endChild: Container(
- margin: EdgeInsets.only(bottom: 10, top: 10, left: 10),
- child: Row(
- children: [
- Text('On Process'),
- Spacer(),
- Text('31 Jan 14:43')
- ],
- ),
- ))),
- SizedBox(
- child: TimelineTile(
- indicatorStyle:
- IndicatorStyle(color: Color(0xff078C84), width: 25),
- isLast: true,
- endChild: Container(
- margin: EdgeInsets.only(bottom: 10, top: 10, left: 10),
- child: Row(
- children: [
- Text('Finish'),
- Spacer(),
- Text('31 Jan 15:43')
- ],
- ),
- ),
- )),
- ],
- ),
- ),
- Container(
- alignment: Alignment.centerRight,
- padding: EdgeInsets.symmetric(horizontal: 10),
- child: Text(
- 'tamu minta dibungkus untuk dibawa keluar',
- style: TextStyle(
- fontWeight: FontWeight.w400,
- fontSize: 12,
- color: Color(0xff078C84),
- ),
- ),
- ),
- Container(
- height: 10,
- ),
- Container(
- margin: EdgeInsets.all(10),
- height: 1,
- color: Color(0xff292D32).withOpacity(0.5),
- ),
- Container(
- height: 10,
- ),
- Container(
- padding: EdgeInsets.symmetric(horizontal: 10),
- child: Row(
- children: [
- Container(
- width: 10,
- ),
- Text(
- 'Rate',
- style: TextStyle(color: Color(0xff292D32), fontSize: 14),
- ),
- Spacer(),
- Text(
- 'Really pleased',
- style: TextStyle(color: Color(0xff292D32), fontSize: 14),
- ),
- Container(
- width: 10,
- ),
- Icon(Icons.tag_faces)
- ],
- ),
- ),
- Divider(
- thickness: 8,
- ),
- ],
- ),
- ),
- );
- }
- Container gambar(items) {
- return Container(
- decoration: BoxDecoration(
- border: Border.all(color: items['color']),
- borderRadius: BorderRadius.all(Radius.circular(20)),
- color: items['color'].withOpacity(0.4)),
- padding: const EdgeInsets.all(5.0),
- child: Image.asset(
- items['image'],
- fit: BoxFit.cover,
- ),
- );
- }
- }
|