Skip to content

Commit

Permalink
settingsfunctional-redis3-bugsfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ARYPROGRAMMER committed Oct 10, 2024
1 parent efafb0f commit 04c1349
Show file tree
Hide file tree
Showing 5 changed files with 148 additions and 30 deletions.
12 changes: 12 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,17 @@
<action android:name="android.intent.action.PROCESS_TEXT" />
<data android:mimeType="text/plain" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="sms" />
</intent>
<!-- If your app checks for call support -->
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" />
</intent>
<intent>
<action android:name="android.support.customtabs.action.CustomTabsService" />
</intent>
</queries>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,12 @@ class _MeditationPageState extends State<MeditationPage> {

@override
void dispose() {
dataSources!.clear();
__chartData!.clear();
_annotationSources!.clear();
try {
dataSources!.clear();
__chartData!.clear();
_annotationSources!.clear();
}catch(error){}

super.dispose();
}

Expand Down
92 changes: 65 additions & 27 deletions lib/features/meditation/presentation/pages/settingscreen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,41 @@ import 'package:mental_health/core/theme.dart';
import 'package:mental_health/features/auth/domain/entities/auth/googleapisignin.dart';
import 'package:mental_health/features/meditation/presentation/pages/generalSettings/fieldUpdates.dart';
import 'package:mental_health/presentation/onboarding/onboarding.dart';
import 'package:url_launcher/url_launcher.dart';

class SettingScreen extends StatelessWidget {
class SettingScreen extends StatefulWidget {
const SettingScreen({super.key});

@override
State<SettingScreen> createState() => _SettingScreenState();
}

class _SettingScreenState extends State<SettingScreen> {

Future<void>? _launched;

@override
void initState() {
super.initState();
}

Future<void> _launchInAppWithBrowserOptions(Uri url) async {
if (!await launchUrl(
url,
mode: LaunchMode.inAppBrowserView,
browserConfiguration: const BrowserConfiguration(showTitle: true),
)) {
throw Exception('Could not launch $url');
}
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: DefaultColors.white,
elevation: 10,
shadowColor: Colors.black,
// leading: Container(
// decoration: const BoxDecoration(
// image: DecorationImage(
// image: AssetImage('assets/essentials/back.png'),
// ),
// ),
// ),
title: Padding(
padding: const EdgeInsets.all(20.0),
child: Row(
Expand Down Expand Up @@ -148,15 +165,26 @@ class SettingScreen extends StatelessWidget {
const SizedBox(
width: 10,
),
const SizedBox(
width: 200,
child: Text(
'Data Storage',
style: TextStyle(
color: Colors.black,
fontSize: 20,
fontFamily: 'Inter',
height: 0,
GestureDetector(
onTap: (){

final Uri toLaunch =
Uri(scheme: 'https', host: 'www.postgresql.org',path: '/');
setState(() {
_launched = _launchInAppWithBrowserOptions(toLaunch);
});
},

child: const SizedBox(
width: 200,
child: Text(
'Data Storage',
style: TextStyle(
color: Colors.black,
fontSize: 20,
fontFamily: 'Inter',
height: 0,
),
),
),
),
Expand All @@ -181,15 +209,25 @@ class SettingScreen extends StatelessWidget {
const SizedBox(
width: 10,
),
const SizedBox(
width: 200,
child: Text(
'API Integrations',
style: TextStyle(
color: Colors.black,
fontSize: 20,
fontFamily: 'Inter',
height: 0,
GestureDetector(
onTap: (){

final Uri toLaunch =
Uri(scheme: 'https', host: 'docs.llama-api.com',path: '/essentials/chat');
setState(() {
_launched = _launchInAppWithBrowserOptions(toLaunch);
});
},
child: const SizedBox(
width: 200,
child: Text(
'API Integrations',
style: TextStyle(
color: Colors.black,
fontSize: 20,
fontFamily: 'Inter',
height: 0,
),
),
),
),
Expand Down Expand Up @@ -482,7 +520,7 @@ class SettingScreen extends StatelessWidget {
const SizedBox(
width: 200,
child: Text(
'Clear Logs',
'Clear Cache',
style: TextStyle(
color: Colors.black,
fontSize: 20,
Expand Down
64 changes: 64 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1186,6 +1186,70 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.2"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603"
url: "https://pub.dev"
source: hosted
version: "6.3.1"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
sha256: "8fc3bae0b68c02c47c5c86fa8bfa74471d42687b0eded01b78de87872db745e2"
url: "https://pub.dev"
source: hosted
version: "6.3.12"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
sha256: e43b677296fadce447e987a2f519dcf5f6d1e527dc35d01ffab4fff5b8a7063e
url: "https://pub.dev"
source: hosted
version: "6.3.1"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
sha256: e2b9622b4007f97f504cd64c0128309dfb978ae66adbe944125ed9e1750f06af
url: "https://pub.dev"
source: hosted
version: "3.2.0"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
sha256: "769549c999acdb42b8bcfa7c43d72bf79a382ca7441ab18a808e101149daf672"
url: "https://pub.dev"
source: hosted
version: "3.2.1"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e"
url: "https://pub.dev"
source: hosted
version: "2.3.3"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185"
url: "https://pub.dev"
source: hosted
version: "3.1.2"
uuid:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ dependencies:
hive:
hive_flutter:
syncfusion_flutter_charts:
url_launcher:
dev_dependencies:
flutter_test:
sdk: flutter
Expand Down

0 comments on commit 04c1349

Please sign in to comment.