diff --git a/assets/policy_and_terms/privacy_policy.html b/assets/policy_and_terms/privacy_policy.html index 5bd2868..8e2cbfc 100644 --- a/assets/policy_and_terms/privacy_policy.html +++ b/assets/policy_and_terms/privacy_policy.html @@ -11,7 +11,7 @@ Privacy policy - +

Privacy Policy

Last updated: November 24, 2022

This Privacy Policy describes Our policies and procedures on the collection, use and disclosure of Your information diff --git a/assets/policy_and_terms/terms_and_conditions.html b/assets/policy_and_terms/terms_and_conditions.html index b6be1cf..da320c1 100644 --- a/assets/policy_and_terms/terms_and_conditions.html +++ b/assets/policy_and_terms/terms_and_conditions.html @@ -11,7 +11,7 @@ Terms and Conditions - +

Terms and Conditions

Last updated: December 28, 2022

Please read these terms and conditions carefully before using Our Service.

diff --git a/lib/ui/common/my_back_button.dart b/lib/ui/common/my_back_button.dart new file mode 100644 index 0000000..2ba04ef --- /dev/null +++ b/lib/ui/common/my_back_button.dart @@ -0,0 +1,27 @@ +import 'dart:math'; + +import 'package:auto_route/auto_route.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:fluttips/ui/common/context_extensions.dart'; +import 'package:fluttips/ui/theme/app_theme.dart'; + +class MyBackButton extends StatelessWidget { + const MyBackButton({ + super.key, + }); + + @override + Widget build(BuildContext context) => MaterialButton( + onPressed: () => context.router.navigateBack(), + color: context.theme.colors.primary, + padding: EdgeInsets.all(max(10, kIsWeb ? 12 : 8.w)), + shape: const CircleBorder(), + child: Icon( + Icons.chevron_left_outlined, + color: context.theme.colors.primary.shade100, + size: max(30, min(26, 26.w)), + ), + ); +} diff --git a/lib/ui/favourites_tip_details/favourites_tip_details_screen.dart b/lib/ui/favourites_tip_details/favourites_tip_details_screen.dart index 22ac341..a4f5320 100644 --- a/lib/ui/favourites_tip_details/favourites_tip_details_screen.dart +++ b/lib/ui/favourites_tip_details/favourites_tip_details_screen.dart @@ -1,11 +1,10 @@ -import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:fluttips/ui/common/context_extensions.dart'; import 'package:fluttips/ui/theme/app_theme.dart'; import 'package:fluttips/core/model/tip.dart'; import 'package:fluttips/ui/image_tip_details/image_tip_details_screen.dart'; import 'package:fluttips/ui/image_tip_details/show_image_tip_details_type.dart'; +import 'package:fluttips/ui/common/my_back_button.dart'; class FavouritesTipDetailsScreen extends StatelessWidget { final ShowImageTipDetailsType showTipType; @@ -18,9 +17,9 @@ class FavouritesTipDetailsScreen extends StatelessWidget { }) : super(key: key); @override - Widget build(BuildContext context) => Container( - color: context.theme.colors.background, - child: SafeArea( + Widget build(BuildContext context) => Scaffold( + backgroundColor: context.theme.colors.background, + body: SafeArea( child: Stack( children: [ ImageTipDetailsScreen( @@ -29,25 +28,7 @@ class FavouritesTipDetailsScreen extends StatelessWidget { ), Container( margin: const EdgeInsets.only(left: 20, top: 10), - child: TextButton( - onPressed: context.router.navigateBack, - style: TextButton.styleFrom( - padding: EdgeInsets.only( - top: 5.h, - left: 13.w, - right: 5.w, - bottom: 5.h, - ), - shape: const CircleBorder(), - backgroundColor: context.theme.colors.primary, - alignment: Alignment.center, - ), - child: Icon( - Icons.arrow_back_ios, - size: 20, - color: context.theme.colors.primary.shade100, - ), - ), + child: const MyBackButton(), ), ], ), diff --git a/lib/ui/webView/webview_screen.dart b/lib/ui/webView/webview_screen.dart index e30ec03..5e51047 100644 --- a/lib/ui/webView/webview_screen.dart +++ b/lib/ui/webView/webview_screen.dart @@ -1,10 +1,10 @@ -import 'package:auto_route/auto_route.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:fluttips/ui/common/context_extensions.dart'; import 'package:fluttips/ui/theme/app_theme.dart'; import 'package:webview_flutter/webview_flutter.dart'; +import 'package:fluttips/ui/common/my_back_button.dart'; class WebViewScreen extends StatefulWidget { const WebViewScreen(this.path, {Key? key}) : super(key: key); @@ -16,13 +16,12 @@ class WebViewScreen extends StatefulWidget { } class _WebViewScreenState extends State { - late final WebViewController _webViewController; + final WebViewController _webViewController = WebViewController(); _WebViewScreenState(); @override void initState() { - _webViewController = WebViewController(); DefaultAssetBundle.of(context) .loadString(widget.path) .then((value) => _webViewController.loadHtmlString(value)); @@ -35,25 +34,21 @@ class _WebViewScreenState extends State { _webViewController.setBackgroundColor(context.theme.colors.background); } final colors = context.theme.colors; - _webViewController.setBackgroundColor(colors.background); return Scaffold( backgroundColor: colors.background, - body: Container( - margin: EdgeInsets.only(left: 80.w, top: 10.h), - alignment: Alignment.centerLeft, - child: Column( - children: [ - Row( - children: [ - IconButton( - onPressed: () => context.router.navigateBack(), - color: colors.surface, - icon: const Icon(Icons.arrow_back_ios), - ), - ], - ), - Expanded(child: WebViewWidget(controller: _webViewController)), - ], + body: SafeArea( + child: Container( + margin: EdgeInsets.only(left: 20.w, top: 10.h, right: 40.w), + alignment: Alignment.centerLeft, + child: Row( + children: [ + Container( + alignment: Alignment.topLeft, + child: const MyBackButton(), + ), + Expanded(child: WebViewWidget(controller: _webViewController)), + ], + ), ), ), );