import 'dart:ui'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/pharmaciesLivechat_page.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/cupertino.dart'; import 'package:flutter/material.dart'; import 'hospitalsLivechat_page.dart'; class LiveChatPage extends StatefulWidget { @override _LiveChatPageState createState() => _LiveChatPageState(); } class _LiveChatPageState extends State with SingleTickerProviderStateMixin { TabController _tabController; List imagesInfo = List(); @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')); _tabController = TabController(length: 2, vsync: this); } @override void dispose() { super.dispose(); _tabController.dispose(); } @override Widget build(BuildContext context) { return AppScaffold( isShowAppBar: true, imagesInfo: imagesInfo, title: TranslationBase.of(context).liveChat, description: TranslationBase.of(context).infoChat, appBarTitle: TranslationBase.of(context).liveChat, showNewAppBar: true, showNewAppBarTitle: true, backgroundColor: CustomColors.appBackgroudGrey2Color, 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( 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)], ), Expanded( child: TabBarView( physics: BouncingScrollPhysics(), controller: _tabController, children: [ HospitalsLiveChatPage(), //SendFeedbackPage(), PharmaciesLiveChatPage() //StatusFeedbackPage() ], ), ) ], ), ); } }