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/pharmaciesLivechat_page.dart

91 lines
3.1 KiB
Dart

4 years ago
import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/contactus/livechat_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
4 years ago
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
4 years ago
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
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';
import 'package:provider/provider.dart';
4 years ago
import 'package:url_launcher/url_launcher.dart';
class PhamaciesLiveChatPage extends StatefulWidget {
@override
_PhamaciesLiveChatPageState createState() => _PhamaciesLiveChatPageState();
}
class _PhamaciesLiveChatPageState extends State<PhamaciesLiveChatPage> {
int tappedIndex;
String chat;
@override
4 years ago
void initState() {
4 years ago
super.initState();
4 years ago
tappedIndex = -1;
chat = "";
4 years ago
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
4 years ago
return BaseView<LiveChatViewModel>(
builder: (_, model, widget) => AppScaffold(
baseViewModel: model,
isShowDecPage: false,
4 years ago
body: SingleChildScrollView(
child: Container(
4 years ago
margin: EdgeInsets.only(left: 15, right: 15),
4 years ago
child: Column(
children: [
4 years ago
SizedBox(
height: 20,
),
4 years ago
Container(
width: double.infinity,
height: 200,
4 years ago
child: Texts(
TranslationBase.of(context).instructionsPharmacies,
4 years ago
color: Colors.black,
textAlign: TextAlign.center,
4 years ago
),
),
///////////
4 years ago
SizedBox(
height: 100,
),
4 years ago
],
),
),
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.11,
4 years ago
width: double.infinity,
padding: EdgeInsets.all(8.0),
child: Center(
child: Container(
height: MediaQuery.of(context).size.height * 0.7,
4 years ago
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
label: TranslationBase.of(context).start,
4 years ago
loading: model.state == ViewState.BusyLocal,
onTap: () {
4 years ago
print("chat=" + chat);
chat =
"http://chat.dshmg.com:7788/EPharmacyChat/EIndex.aspx?CustomerID=undefined&Name=${model.user.firstName}&MobileNo=${model.user.mobileNumber}&Language=${projectViewModel.isArabic? 1:2}";
4 years ago
launch(chat);
},
),
),
),
),
),
);
}
}