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.
80 lines
2.7 KiB
Dart
80 lines
2.7 KiB
Dart
import 'package:diplomaticquarterapp/config/config.dart';
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByClinic.dart';
|
|
import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByDoctor.dart';
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
|
|
import 'components/SearchByClinic.dart';
|
|
|
|
class Search extends StatefulWidget {
|
|
final int type;
|
|
final List clnicIds;
|
|
Function onBackClick;
|
|
|
|
Search({this.type = 0, this.clnicIds,this.onBackClick});
|
|
|
|
@override
|
|
_SearchState createState() => _SearchState();
|
|
}
|
|
|
|
class _SearchState extends State<Search> with TickerProviderStateMixin {
|
|
TabController _tabController;
|
|
|
|
@override
|
|
void initState() {
|
|
_tabController = new TabController(length: 2, vsync: this, initialIndex: widget.type);
|
|
|
|
super.initState();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
AppGlobal.context = context;
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
return AppScaffold(
|
|
isShowAppBar: false,
|
|
isShowDecPage: false,
|
|
showNewAppBarTitle: true,
|
|
showNewAppBar: true,
|
|
appBarTitle: TranslationBase.of(context).bookAppo,
|
|
backgroundColor: Color(0xFFF7F7F7),
|
|
onTap: widget.onBackClick,
|
|
body: Column(
|
|
children: [
|
|
TabBar(
|
|
controller: _tabController,
|
|
indicatorWeight: 3.0,
|
|
indicatorSize: TabBarIndicatorSize.tab,
|
|
labelColor: Color(0xff2B353E),
|
|
unselectedLabelColor: Color(0xff575757),
|
|
labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
|
|
labelStyle: TextStyle(
|
|
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w600,
|
|
letterSpacing: -0.48,
|
|
),
|
|
unselectedLabelStyle: TextStyle(
|
|
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w600,
|
|
letterSpacing: -0.48,
|
|
),
|
|
tabs: [Text(TranslationBase.of(context).clinicName), Text(TranslationBase.of(context).doctorName)],
|
|
),
|
|
Expanded(
|
|
child: TabBarView(
|
|
physics: NeverScrollableScrollPhysics(),
|
|
children: [SearchByClinic(clnicIds: widget.clnicIds), SearchByDoctor()],
|
|
controller: _tabController,
|
|
),
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|