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.
diplomatic-quarter/lib/pages/ContactUs/findus/findus_page.dart

131 lines
4.5 KiB
Dart

4 years ago
import 'dart:ui';
4 years ago
import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart';
4 years ago
import 'package:diplomaticquarterapp/pages/ContactUs/findus/hospitrals_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/findus/pharmacies_page.dart';
4 years ago
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
4 years ago
4 years ago
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class FindUsPage extends StatefulWidget {
@override
_FindUsPageState createState() => _FindUsPageState();
}
4 years ago
class _FindUsPageState extends State<FindUsPage>
with SingleTickerProviderStateMixin {
4 years ago
TabController _tabController;
@override
void initState() {
super.initState();
_tabController = TabController(length: 2, vsync: this);
}
@override
void dispose() {
super.dispose();
_tabController.dispose();
}
4 years ago
4 years ago
@override
@override
Widget build(BuildContext context) {
4 years ago
return BaseView<FindusViewModel>(
4 years ago
allowAny: true,
4 years ago
onModelReady: (model) => model.getFindUsRequestOrders(), //model.getCOC(),
4 years ago
builder: (_, model, w) => AppScaffold(
4 years ago
isShowAppBar: true,
4 years ago
isShowDecPage: false,
4 years ago
appBarTitle: 'Locations',
4 years ago
baseViewModel: model,
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(
preferredSize: Size.fromHeight(65.0),
child: Stack(
children: <Widget>[
Positioned(
bottom: 1,
left: 0,
right: 0,
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
child: Container(
color: Theme.of(context)
.scaffoldBackgroundColor
.withOpacity(0.8),
height: 70.0,
),
4 years ago
),
),
4 years ago
Center(
child: Container(
height: 60.0,
margin: EdgeInsets.only(top: 10.0),
4 years ago
width: MediaQuery.of(context).size.width * 0.92, // 0.9,
4 years ago
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Theme.of(context).dividerColor,
4 years ago
width: 0.9), //width: 0.7
4 years ago
),
color: Colors.white),
child: Center(
child: TabBar(
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Theme.of(context).primaryColor,
labelPadding:
4 years ago
EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
4 years ago
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
4 years ago
child: Texts(' Hospitals '),
4 years ago
),
4 years ago
),
4 years ago
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
4 years ago
child: Texts(' Pharmacies '),
4 years ago
),
4 years ago
),
4 years ago
],
),
4 years ago
),
),
),
4 years ago
],
),
),
body: Column(
children: <Widget>[
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
4 years ago
HospitalsPage(
findusHospitalModelList: model.FindusHospitalModelList,
), //SendFeedbackPage(),
PharmaciesPage(
findusPharmaciesModelList:
model.FindusPharmaciesModelList,
) //StatusFeedbackPage()
4 years ago
],
),
)
4 years ago
],
),
),
),
);
}
}