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.
182 lines
6.6 KiB
Dart
182 lines
6.6 KiB
Dart
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:rating_bar/rating_bar.dart';
|
|
|
|
import 'BookConfirm.dart';
|
|
import 'components/DocAvailableAppointments.dart';
|
|
import 'components/DocInfo.dart';
|
|
|
|
class DoctorProfile extends StatefulWidget {
|
|
@override
|
|
_DoctorProfileState createState() => _DoctorProfileState();
|
|
}
|
|
|
|
class _DoctorProfileState extends State<DoctorProfile>
|
|
with SingleTickerProviderStateMixin {
|
|
TabController _tabController;
|
|
bool showFooterButton = false;
|
|
|
|
@override
|
|
void initState() {
|
|
_tabController = new TabController(length: 2, vsync: this);
|
|
super.initState();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
title: Text(TranslationBase.of(context).bookAppo),
|
|
actions: <Widget>[
|
|
IconButton(
|
|
icon: Icon(
|
|
Icons.today,
|
|
color: Colors.white,
|
|
),
|
|
onPressed: () {
|
|
print('Login');
|
|
},
|
|
)
|
|
],
|
|
),
|
|
bottomSheet: showFooterButton
|
|
? Container(
|
|
width: MediaQuery.of(context).size.width,
|
|
height: 50.0,
|
|
margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
|
|
child: ButtonTheme(
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
),
|
|
minWidth: MediaQuery.of(context).size.width * 0.7,
|
|
height: 45.0,
|
|
child: RaisedButton(
|
|
color: new Color(0xFF60686b),
|
|
textColor: Colors.white,
|
|
disabledTextColor: Colors.white,
|
|
disabledColor: new Color(0xFFbcc2c4),
|
|
onPressed: () {
|
|
navigateToBookConfirm(context);
|
|
},
|
|
child:
|
|
Text(TranslationBase.of(context).bookNow, style: TextStyle(fontSize: 18.0)),
|
|
),
|
|
),
|
|
)
|
|
: null,
|
|
body: Container(
|
|
color: new Color(0xFFf6f6f6),
|
|
child: SingleChildScrollView(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
Container(
|
|
color: Colors.white,
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
Container(
|
|
margin: EdgeInsets.only(top: 20.0),
|
|
alignment: Alignment.center,
|
|
child: ClipRRect(
|
|
borderRadius: BorderRadius.circular(100.0),
|
|
child: Image.network(
|
|
"https://hmgwebservices.com/Images/MobileImages/OALAY/2477.png",
|
|
fit: BoxFit.fill,
|
|
height: 120.0,
|
|
width: 120.0),
|
|
),
|
|
),
|
|
Container(
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
alignment: Alignment.center,
|
|
child: Text("Dr. EYAD ISMAIL ABU-JAYAD",
|
|
style: TextStyle(
|
|
fontSize: 20.0,
|
|
color: Colors.grey[900],
|
|
letterSpacing: 1.0)),
|
|
),
|
|
Container(
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
alignment: Alignment.center,
|
|
child: Text("INTERNAL MEDICINE CLINIC",
|
|
style: TextStyle(
|
|
fontSize: 12.0,
|
|
color: Colors.grey[900],
|
|
letterSpacing: 1.0)),
|
|
),
|
|
Container(
|
|
margin: EdgeInsets.only(top: 5.0),
|
|
alignment: Alignment.center,
|
|
child: RatingBar.readOnly(
|
|
initialRating: 4.0,
|
|
size: 35.0,
|
|
filledColor: Colors.yellow[700],
|
|
emptyColor: Colors.grey[500],
|
|
isHalfAllowed: true,
|
|
halfFilledIcon: Icons.star_half,
|
|
filledIcon: Icons.star,
|
|
emptyIcon: Icons.star,
|
|
),
|
|
),
|
|
Container(
|
|
margin: EdgeInsets.only(top: 5.0),
|
|
alignment: Alignment.center,
|
|
child: Text("(2322 Reviews)",
|
|
style: TextStyle(
|
|
fontSize: 14.0,
|
|
color: Colors.blue[800],
|
|
letterSpacing: 1.0,
|
|
decoration: TextDecoration.underline,
|
|
)),
|
|
),
|
|
Container(
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
child: Divider(
|
|
color: Colors.grey[500],
|
|
),
|
|
),
|
|
TabBar(
|
|
onTap: (index) {
|
|
setState(() {
|
|
index == 1
|
|
? showFooterButton = true
|
|
: showFooterButton = false;
|
|
print(showFooterButton);
|
|
});
|
|
},
|
|
tabs: [
|
|
Tab(
|
|
child: Text(TranslationBase.of(context).docInfo,
|
|
style: TextStyle(color: Colors.black))),
|
|
Tab(
|
|
child: Text(TranslationBase.of(context).availableAppo,
|
|
style: TextStyle(color: Colors.black)),
|
|
)
|
|
],
|
|
controller: _tabController,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Container(
|
|
height: MediaQuery.of(context).size.height * 0.68,
|
|
child: TabBarView(
|
|
physics: NeverScrollableScrollPhysics(),
|
|
children: [DoctorInformation(), DocAvailableAppointments()],
|
|
controller: _tabController,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
Future navigateToBookConfirm(context) async {
|
|
Navigator.push(
|
|
context, MaterialPageRoute(builder: (context) => BookConfirm()));
|
|
}
|
|
}
|