merge-update-with-lab-changes
parent
e909c16b80
commit
e254261ef9
@ -0,0 +1,83 @@
|
|||||||
|
//import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../NearestEr.dart';
|
||||||
|
|
||||||
|
class CardPosition extends StatelessWidget {
|
||||||
|
final image;
|
||||||
|
final text;
|
||||||
|
final subText;
|
||||||
|
final type;
|
||||||
|
const CardPosition(
|
||||||
|
{
|
||||||
|
@required this.image,
|
||||||
|
@required this.text,
|
||||||
|
@required this.subText,
|
||||||
|
@required this.type});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
navigateToSearch(context, this.type);
|
||||||
|
print("=============this.type============="+this.type);
|
||||||
|
},
|
||||||
|
child: 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.center,
|
||||||
|
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(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
margin: EdgeInsets.fromLTRB(0.0, 0.0, 10.0, 8.0),
|
||||||
|
child: Image.asset(this.image, width: 60.0, height: 60.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)),
|
||||||
|
),
|
||||||
|
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future navigateToSearch(context, type) async {
|
||||||
|
//===Switch case===
|
||||||
|
if(type==0)
|
||||||
|
{print("========Ambalunce=========");}
|
||||||
|
else{
|
||||||
|
print("=========Nearest ER===========");
|
||||||
|
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) => NearestEr(isAppbar: true,)));
|
||||||
|
|
||||||
|
}
|
||||||
|
// Navigator.push(
|
||||||
|
// context,
|
||||||
|
// MaterialPageRoute(
|
||||||
|
// builder: (context) => Search(
|
||||||
|
// type: type,
|
||||||
|
// )));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Reference in New Issue