import 'dart:ui'; import 'package:hmg_patient_app/core/viewModels/feedback/feedback_view_model.dart'; import 'package:hmg_patient_app/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:hmg_patient_app/pages/feedback/send_feedback_page.dart'; import 'package:hmg_patient_app/theme/colors.dart'; import 'package:hmg_patient_app/uitl/translations_delegate_base.dart'; import 'package:hmg_patient_app/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'status_feedback_page.dart'; class FeedbackHomePage extends StatefulWidget { final AppoitmentAllHistoryResultList? appointment; final MessageType messageType; const FeedbackHomePage({Key? key, this.appointment, this.messageType = MessageType.NON}) : super(key: key); @override _FeedbackHomePageState createState() => _FeedbackHomePageState(); } class _FeedbackHomePageState extends State with SingleTickerProviderStateMixin { late TabController _tabController; @override void initState() { super.initState(); _tabController = TabController(length: 2, vsync: this); } @override void dispose() { super.dispose(); _tabController.dispose(); } @override Widget build(BuildContext context) { return AppScaffold( isShowAppBar: true, isBottomBar: false, isShowDecPage: false, appBarTitle: TranslationBase.of(context).feedbackTitle, 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).send), Text(TranslationBase.of(context).status)], ), Expanded( child: TabBarView( physics: BouncingScrollPhysics(), controller: _tabController, children: [ SendFeedbackPage( appointment: widget.appointment, messageType: widget.messageType, ), StatusFeedbackPage() ], ), ) ], ), ); } }