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.
RSGDoctorApp/lib/screens/patients/profile/referral/patient_referral_screen.dart

105 lines
3.8 KiB
Dart

import 'dart:ui';
import 'package:doctor_app_flutter/screens/doctor/my_referral_patient_screen.dart';
import 'package:doctor_app_flutter/screens/doctor/my_referred_patient_screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/referral/my-referral-patient-screen.dart';
import 'package:doctor_app_flutter/screens/patients/profile/referral/referred-patient-screen.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class PatientReferralScreen extends StatefulWidget {
@override
_PatientReferralScreen createState() => _PatientReferralScreen();
}
class _PatientReferralScreen extends State<PatientReferralScreen>
with SingleTickerProviderStateMixin {
TabController _tabController;
@override
void initState() {
super.initState();
_tabController = TabController(length: 2, vsync: this);
}
@override
void dispose() {
super.dispose();
_tabController.dispose();
}
@override
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).patientsreferral,
body: Scaffold(
extendBodyBehindAppBar: true,
// backgroundColor: Colors.white,
appBar: PreferredSize(
preferredSize: Size.fromHeight(60.0),
child: Center(
child: Container(
height: 60.0,
// margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width * 1, // 0.92,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Theme.of(context).dividerColor,
width: 1), //width: 0.7
),
color: Colors.white),
child: Center(
child: TabBar(
isScrollable: true,
controller: _tabController,
indicatorColor: Colors.red[800],
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child:
AppText(TranslationBase.of(context).referral),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child: AppText(
TranslationBase.of(context).myReferredPatient),
),
),
],
),
),
),
),
),
body: Column(
children: <Widget>[
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
MyReferralPatientScreen(),
ReferredPatientScreen(),
// MyReferredPatient(),
],
),
)
],
),
));
}
}