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.
68 lines
2.1 KiB
Dart
68 lines
2.1 KiB
Dart
import 'package:diplomaticquarterapp/config/config.dart';
|
|
import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByClinic.dart';
|
|
import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByDoctor.dart';
|
|
import 'package:diplomaticquarterapp/theme/colors.dart';
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'components/SearchByClinic.dart';
|
|
|
|
class Search extends StatefulWidget {
|
|
final int type;
|
|
final List clnicIds;
|
|
|
|
Search({this.type = 0, this.clnicIds});
|
|
|
|
@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;
|
|
return AppScaffold(
|
|
isShowAppBar: false,
|
|
isShowDecPage: false,
|
|
appBarTitle: TranslationBase.of(context).bookAppo,
|
|
backgroundColor: Color(0xFFF7F7F7),
|
|
body: Container(
|
|
child: Column(
|
|
children: [
|
|
TabBar(
|
|
tabs: [
|
|
Tab(child: Text(TranslationBase.of(context).clinicName, style: TextStyle(color: Colors.black))),
|
|
Tab(
|
|
child: Text(TranslationBase.of(context).doctorName, style: TextStyle(color: Colors.black)),
|
|
)
|
|
],
|
|
controller: _tabController,
|
|
),
|
|
Expanded(
|
|
child: new TabBarView(
|
|
physics: NeverScrollableScrollPhysics(),
|
|
children: [
|
|
SearchByClinic(
|
|
clnicIds: widget.clnicIds,
|
|
),
|
|
SearchByDoctor()
|
|
],
|
|
controller: _tabController,
|
|
),
|
|
)
|
|
],
|
|
),
|
|
));
|
|
}
|
|
}
|