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.
82 lines
2.5 KiB
Dart
82 lines
2.5 KiB
Dart
//import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
|
|
import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
import '../AmbulanceReq.dart';
|
|
import '../NearestEr.dart';
|
|
|
|
class CardCommonEr extends StatelessWidget {
|
|
final image;
|
|
final text;
|
|
final subText;
|
|
final bool locked;
|
|
|
|
final Function onTap;
|
|
const CardCommonEr(
|
|
{
|
|
this.locked = false,
|
|
@required this.image,
|
|
@required this.text,
|
|
@required this.subText,
|
|
@required this.onTap,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return GestureDetector(
|
|
onTap: locked ? null : onTap,
|
|
child: Opacity(
|
|
opacity: locked ? 0.25 : 1.0,
|
|
child: Stack(
|
|
children: [
|
|
Container(
|
|
margin: EdgeInsets.fromLTRB(9.0, 9.0, 9.0, 9.0),
|
|
decoration: BoxDecoration(boxShadow: [
|
|
BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)
|
|
], borderRadius: BorderRadius.circular(10), color: Colors.white),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
Container(
|
|
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
|
|
child: Text(this.text,
|
|
overflow: TextOverflow.clip,
|
|
style: TextStyle(
|
|
color: new Color(0xFFc5272d),
|
|
letterSpacing: 1.0,
|
|
fontSize: 20.0)),
|
|
),
|
|
Container(
|
|
margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0),
|
|
child: Text(this.subText,
|
|
overflow: TextOverflow.clip,
|
|
style: TextStyle(
|
|
color: Colors.black, letterSpacing: 1.0, fontSize: 15.0)),
|
|
),
|
|
Spacer(),
|
|
Container(
|
|
alignment: Alignment.bottomRight,
|
|
margin: EdgeInsets.fromLTRB(0.0, 0.0, 10.0, 8.0),
|
|
child: Image.asset(this.image, width: 60.0, height: 60.0),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
if(locked)
|
|
Align(
|
|
alignment: Alignment.center,
|
|
child: lock()
|
|
)
|
|
] ,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget lock(){
|
|
return Container(child: Icon(Icons.lock_rounded, size: 80),);
|
|
}
|
|
|
|
}
|