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/LiveChat/livechat_page.dart

89 lines
3.2 KiB
Dart

4 years ago
import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
4 years ago
import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
4 years ago
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'hospitalsLivechat_page.dart';
class LiveChatPage extends StatefulWidget {
@override
_LiveChatPageState createState() => _LiveChatPageState();
}
class _LiveChatPageState extends State<LiveChatPage> with SingleTickerProviderStateMixin {
4 years ago
TabController _tabController;
List<ImagesInfo> imagesInfo = List();
4 years ago
@override
void initState() {
super.initState();
imagesInfo
.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/0.png'));
imagesInfo
.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/1.png'));
imagesInfo
.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/2.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/2.png'));
4 years ago
_tabController = TabController(length: 2, vsync: this);
}
@override
void dispose() {
super.dispose();
_tabController.dispose();
}
4 years ago
4 years ago
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
imagesInfo: imagesInfo,
title: TranslationBase.of(context).liveChat,
description: TranslationBase.of(context).infoChat,
3 years ago
appBarTitle: TranslationBase.of(context).liveChat,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGrey2Color,
body: Column(
children: <Widget>[
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(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
unselectedLabelStyle: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
tabs: [Text(TranslationBase.of(context).hospitals), Text(TranslationBase.of(context).pharmacies)],
4 years ago
),
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
HospitalsLiveChatPage(), //SendFeedbackPage(),
PharmaciesLiveChatPage()
//StatusFeedbackPage()
],
),
)
],
4 years ago
),
);
}
}