- Scaffold(
- backgroundColor: AppColors.light.mainBgColor,
- appBar: AppBar(
- backgroundColor: Theme.of(context).primaryColor,
- elevation: 0,
- title: Text(
- "Connection Report",
- style: Get.textTheme.titleLarge!.copyWith(
- color: Colors.white,
- ),
- ),
- iconTheme: const IconThemeData(color: Colors.white),
- ),
- body: Column(
- children: [
- Expanded(
- child: Stack(
- // fit: StackFit.expand,
- children: [
- SizedBox(
- height: Get.height,
- width: Get.width,
- child: Column(
- children: [
- Expanded(
- // flex: 1,
- child: Container(
- width: Get.width,
- color: Theme.of(context).primaryColor,
- // color: Colors.red,
- ),
- ),
- Expanded(
- flex: 5,
- child: Container(
- width: Get.width,
- // color: Colors.amber,
- ),
- )
- ],
- ),
- ),
- SingleChildScrollView(
- child: Container(
- // color: Colors.red,
- // height: Get.height,
- child: Column(
- mainAxisSize: MainAxisSize.min,
- children: [
- Container(
- alignment: Alignment.center,
- padding:
- const EdgeInsets.symmetric(horizontal: 20.0),
- margin: const EdgeInsets.only(
- top: 20.0, left: 24.0, right: 24.0),
- width: double.infinity,
- height: 140.0,
- decoration: BoxDecoration(
- color: Colors.white,
- borderRadius: BorderRadius.circular(10.0),
- image: const DecorationImage(
- image: AssetImage(
- "assets/world_map.png",
- ),
- opacity: 0.15,
- fit: BoxFit.cover,
- ),
- boxShadow: [
- BoxShadow(
- color: Colors.grey.withOpacity(0.2),
- spreadRadius: 1,
- blurRadius: 5,
- offset: const Offset(
- 0, 3), // changes position of shadow
- ),
- ],
- ),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- children: [
- Expanded(
- child: _ConnectionSumIcon(
- icon: AppAssets.light.icons.locationFill,
- title: controller.routeArguments.vpnConfig
- ?.location ??
- "Unknown",
- subtitle: controller
- .routeArguments.vpnConfig?.ip ??
- "Unknown",
- ),
- ),
- Expanded(
- child: _ConnectionSumIcon(
- icon: AppAssets.light.icons.clockFill,
- title: "Duration",
- subtitle: controller.showUsedTime,
- // "${DateTime.parse(controller.routeArguments.transferReport!.duration!).difference(DateTime.now()).inMinutes.abs().toString()} Minutes" ?? "Null",
- ),
- ),
- Expanded(
- child: _ConnectionSumIcon(
- icon: AppAssets.light.icons.dataFill,
- title: "Data Used",
- subtitle: controller.routeArguments
- .transferReport?.mbIn ??
- "--",
- ),
- ),
- ],
- ),
- ),
- const SizedBox(height: 5),
- if (Platform.isAndroid)
- RateUsBox(
- onRateUsTap: () {
- controller.rateUsToPlayStore();
- },
- ),
- const SizedBox(height: 5),
- Obx(() {
- // if (controller.isFeedbackSubmitted == false)
- print(controller.isFeedbackSubmitted);
- return Padding(
- padding:
- const EdgeInsets.symmetric(horizontal: 20.0),
- child: AnimatedCrossFade(
- duration: const Duration(milliseconds: 200),
- crossFadeState:
- !controller.isFeedbackSubmitted
- ? CrossFadeState.showFirst
- : CrossFadeState.showSecond,
- firstChild: Column(
- children: [
- Text("How was this experience?",
- style: Get.textTheme.titleSmall!
- .copyWith(
- color:
- Theme.of(context).primaryColor,
- fontSize: 16,
- fontWeight: FontWeight.bold,
- )),
- const SizedBox(height: 5),
- Text(
- "Leave us a thumbs up or thumbs down.",
- style:
- Get.textTheme.titleSmall!.copyWith(
- color: Theme.of(context).primaryColor,
- fontSize: 12,
- ),
- textAlign: TextAlign.center,
- ),
- const SizedBox(height: 5),
- Container(
- height: 30,
- child: Row(
- mainAxisAlignment:
- MainAxisAlignment.center,
- children: [
- AnimatedContainer(
- duration: const Duration(
- milliseconds: 200),
- width: controller
- .getSelectedFeedback ==
- "positive"
- ? 30
- : 22,
- // height: isExpanded ? 30 : 22,
- child: InkWell(
- onTap: () {
- controller.selectedFeedback
- .value = "positive";
- },
- borderRadius:
- BorderRadius.circular(20),
- child: Image.asset(
- "assets/graphics/light/icons/feedback_like.png",
- // width: 22,
- ),
- ),
- ),
- const SizedBox(width: 20),
- AnimatedContainer(
- duration: const Duration(
- milliseconds: 200),
- width: controller
- .getSelectedFeedback ==
- "negative"
- ? 30
- : 20,
- child: InkWell(
- onTap: () {
- controller.selectedFeedback
- .value = "negative";
- },
- radius: 20,
- child: Image.asset(
- "assets/graphics/light/icons/feedback_dislike.png",
- // width: 22,
- ),
- ),
- ),
- ],
- ),
- ),
- const SizedBox(height: 5),
- TextFormField(
- // controller: controller.feedbackController,
- onChanged: (value) {
- controller.feedbackText.value = value;
- },
- maxLines: 4,
- decoration: InputDecoration(
- hintText: "Leave a feedback",
- hintStyle: Get.textTheme.titleSmall!
- .copyWith(
- color: Colors.black54,
- fontSize: 12,
- ),
- border: OutlineInputBorder(
- borderRadius:
- BorderRadius.circular(10),
- ),
- ),
- ),
- const SizedBox(height: 5),
- ElevatedButton(
- onPressed: () {
- controller
- .submitUserFeedback(context);
- },
- style: ElevatedButton.styleFrom(
- elevation: 1,
- backgroundColor:
- Theme.of(context).primaryColor,
- shape: RoundedRectangleBorder(
- borderRadius:
- BorderRadius.circular(10),
- ),
- ),
- child: const Text("Send Feedback",
- style: TextStyle(
- color: Colors.white,
- fontSize: 12,
- )),
- ),
- ],
- ),
- secondChild: Column(
- // crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Container(
- height: 150,
- child: AnimatedContainer(
- duration: const Duration(
- milliseconds: 500),
- width:
- controller.isFeedbackSubmitted
- ? 100
- : 20,
- height:
- controller.isFeedbackSubmitted
- ? 100
- : 20,
- // Expanded width
- // height: 30,
- child: controller
- .getSelectedFeedback ==
- "positive"
- ? Image.asset(
- "assets/graphics/light/icons/feedback_like.png",
- // width: 30,
- )
- : Image.asset(
- "assets/graphics/light/icons/feedback_dislike.png",
- // width: 30,
- )),
- ),
- const SizedBox(height: 5),
- Text(
- controller.getFeedbackResponseText,
- textAlign: TextAlign.center,
- style:
- Get.textTheme.titleSmall!.copyWith(
- color: Theme.of(context).primaryColor,
- fontSize: 12,
- ),
- ),
- ],
- )),
- );
- }),
- // const Spacer(),
- // if (!controller.routeArguments.shouldShowAd)
- ],
- ),
- ),
- ),
- ],
- ),
- ),
- ],
- ),
- ),
[text] dihan
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Editor
You can edit this paste and save as new:
File Description
- dihan
- Paste Code
- 23 Apr-2024
- 16.2 Kb
You can Share it: