@@ -2,7 +2,7 @@ import 'package:code_juge/l10n/app_localizations.dart';
22import 'package:code_juge/main.dart' ;
33import 'package:flutter/material.dart' ;
44import 'package:provider/provider.dart' ;
5- // import 'package:orderty_customer/l10n/app_localizations .dart';
5+ import 'package:url_launcher/url_launcher .dart' ;
66
77class SettingsPage extends StatelessWidget {
88 const SettingsPage ({super .key});
@@ -23,11 +23,11 @@ class SettingsPage extends StatelessWidget {
2323 title: Text (appLocalizations.settings), // Settings
2424 backgroundColor: theme.colorScheme.primaryContainer,
2525 ), //Title: Settings
26- body: Padding (
27- padding : const EdgeInsets . all ( 16.0 ),
28- child : Column (
29- children : [
30- ListTile (
26+ body: Column (
27+ children : [
28+ Padding (
29+ padding : const EdgeInsets . only (left : 16 , top : 16 , right : 16 ),
30+ child : ListTile (
3131 title: Text (appLocalizations.themeMode), // Theme Mode:
3232 trailing: SizedBox (
3333 width: 86 ,
@@ -57,7 +57,10 @@ class SettingsPage extends StatelessWidget {
5757 ),
5858 ),
5959 ),
60- ListTile (
60+ ),
61+ Padding (
62+ padding: const EdgeInsets .only (left: 16 , right: 16 ),
63+ child: ListTile (
6164 title: Text (appLocalizations.localisationMode), // Language:
6265 trailing: SizedBox (
6366 width: 86 ,
@@ -91,8 +94,91 @@ class SettingsPage extends StatelessWidget {
9194 ),
9295 ),
9396 ),
94- ],
95- ),
97+ ),
98+ const Spacer (),
99+ Divider (thickness: 1 , height: 1 ),
100+ Container (
101+ padding: const EdgeInsets .all (12 ),
102+ color: theme.colorScheme.surfaceContainerHigh,
103+ child: Row (
104+ mainAxisAlignment: MainAxisAlignment .spaceBetween,
105+ children: [
106+ TextButton (
107+ child: Text (appLocalizations.aboutThisButton), // About this project
108+ onPressed: () async {
109+ final url = Uri .parse ("https://github.com/naibaf-1/CodeJudge" );
110+
111+ if (await canLaunchUrl (url)) {
112+ await launchUrl (url, mode: LaunchMode .externalApplication);
113+ } else {
114+ throw "Could not launch $url " ;
115+ }
116+ },
117+ ),
118+ TextButton (
119+ child: Text (appLocalizations.seeLicenseButton), // See the license
120+ onPressed: () async {
121+ final url = Uri .parse ("https://github.com/naibaf-1/CodeJudge?tab=License-1-ov-file" );
122+
123+ if (await canLaunchUrl (url)) {
124+ await launchUrl (url, mode: LaunchMode .externalApplication);
125+ } else {
126+ throw "Could not launch $url " ;
127+ }
128+ },
129+ ),
130+ TextButton (
131+ child: Text (appLocalizations.reportABugButton), // Report a bug
132+ onPressed: () async {
133+ final url = Uri .parse ("https://github.com/naibaf-1/CodeJudge/issues/new?template=bug-report-for-code-judge.md" );
134+
135+ if (await canLaunchUrl (url)) {
136+ await launchUrl (url, mode: LaunchMode .externalApplication);
137+ } else {
138+ throw "Could not launch $url " ;
139+ }
140+ },
141+ ),
142+ TextButton (
143+ child: Text (appLocalizations.requestAFeatureButton), // Request a feature
144+ onPressed: () async {
145+ final url = Uri .parse ("https://github.com/naibaf-1/CodeJudge/issues/new?template=feature-request-for-code-judge.md" );
146+
147+ if (await canLaunchUrl (url)) {
148+ await launchUrl (url, mode: LaunchMode .externalApplication);
149+ } else {
150+ throw "Could not launch $url " ;
151+ }
152+ },
153+ ),
154+ TextButton (
155+ child: Text (appLocalizations.seeReleasesButton), // See all releases
156+ onPressed: () async {
157+ final url = Uri .parse ("https://github.com/naibaf-1/CodeJudge/releases" );
158+
159+ if (await canLaunchUrl (url)) {
160+ await launchUrl (url, mode: LaunchMode .externalApplication);
161+ } else {
162+ throw "Could not launch $url " ;
163+ }
164+ },
165+ ),
166+ TextButton (
167+ child: Text (appLocalizations.aboutMeButton), // About the developer
168+ onPressed: () async {
169+ final url = Uri .parse ("https://github.com/naibaf-1" );
170+
171+ if (await canLaunchUrl (url)) {
172+ await launchUrl (url, mode: LaunchMode .externalApplication);
173+ } else {
174+ throw "Could not launch $url " ;
175+ }
176+ },
177+ ),
178+ ],
179+ )
180+ )
181+ ],
96182 ),
97183 );
98184 }
0 commit comments