You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
88 lines
2.5 KiB
Dart
88 lines
2.5 KiB
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
class RRTLogPage extends StatefulWidget{
|
|
|
|
@override
|
|
State<StatefulWidget> createState() => RRTLogPageState();
|
|
|
|
}
|
|
class RRTLogPageState extends State<RRTLogPage>{
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Center(
|
|
child: ListView.builder(
|
|
itemCount: 10,
|
|
itemBuilder: (ctx, idx) => RRTLogListItem()
|
|
)
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------
|
|
// List Item Widget
|
|
// ------------------------
|
|
|
|
|
|
final _item_content_seperator = Container(height: 0.25, padding: EdgeInsets.all(10), color: Colors.grey.withOpacity(0.5));
|
|
|
|
class RRTLogListItem extends StatelessWidget{
|
|
BuildContext _context;
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
_context = context;
|
|
|
|
return Container(
|
|
padding: EdgeInsets.all(15), margin: EdgeInsets.symmetric(horizontal: 15, vertical: 10),
|
|
decoration: BoxDecoration(
|
|
color: Colors.white,
|
|
borderRadius: BorderRadius.circular(15),
|
|
boxShadow: [BoxShadow(color: Colors.grey.withOpacity(0.25), spreadRadius: 1, blurRadius: 3)]
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
children: [
|
|
_contentItem(label: "Request ID", value: "2318"),
|
|
_item_content_seperator,
|
|
_contentItem(label: "Status", value: "2318"),
|
|
_item_content_seperator,
|
|
_contentItem(label: "Pickup Date", value: "2318"),
|
|
_item_content_seperator,
|
|
_contentItem(label: "Location", value: "2318"),
|
|
_item_content_seperator,
|
|
SizedBox(height: 10),
|
|
FractionallySizedBox(child: cancelButton())
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget _contentItem({@required String label, String value}){
|
|
return Container(
|
|
padding: EdgeInsets.symmetric(vertical: 10),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(label, style: TextStyle(color: Theme.of(_context).appBarTheme.color, fontSize: 9, letterSpacing: 1),),
|
|
SizedBox(height: 5,),
|
|
Text(value, style: TextStyle(color: Theme.of(_context).appBarTheme.color,fontWeight: FontWeight.bold, fontSize: 14),),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget cancelButton()=> MaterialButton(
|
|
height: 45,
|
|
color: Color(0xFFc5272d),
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10) ),
|
|
onPressed: () { },
|
|
child: Text("CANCEL", style: TextStyle(color: Colors.white, fontSize: 13),),
|
|
|
|
);
|
|
}
|
|
|