Skip to content

Commit

Permalink
fix(warnings): removed unnecessary comments and warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sambrus committed Dec 4, 2024
1 parent aa9e78e commit f849f41
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 28 deletions.
4 changes: 2 additions & 2 deletions client_mobile/lib/features/auth/login.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// import 'dart:io';
import 'package:client_mobile/services/microsoft/MicrosoftAuthService.dart';
import 'package:client_mobile/services/microsoft/microsoft_auth_service.dart';
import 'package:client_mobile/widgets/button.dart';
import 'package:client_mobile/widgets/clickable_text.dart';
import 'package:client_mobile/widgets/form_field.dart';
Expand All @@ -20,7 +20,7 @@ class _LoginPageState extends State<LoginPage> {
String get spotifyRedirectUrlMobile => '$callbackUrlScheme://callback';

final String clientId = dotenv.env["VITE_SPOTIFY_CLIENT_ID"] ?? "";
final appAuth = FlutterAppAuth();
final appAuth = const FlutterAppAuth();

@override
Widget build(BuildContext context) {
Expand Down
5 changes: 2 additions & 3 deletions client_mobile/lib/features/auth/register.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// import 'dart:io';
import 'package:client_mobile/services/microsoft/MicrosoftAuthService.dart';
import 'package:client_mobile/services/microsoft/microsoft_auth_service.dart';
import 'package:client_mobile/widgets/button.dart';
import 'package:client_mobile/widgets/clickable_text.dart';
import 'package:client_mobile/widgets/form_field.dart';
Expand All @@ -8,7 +8,6 @@ import 'package:client_mobile/widgets/simple_text.dart';
import 'package:flutter/material.dart';
import 'package:flutter_appauth/flutter_appauth.dart';
import 'package:go_router/go_router.dart';
import 'package:oauth2/oauth2.dart' as oauth2;
import 'package:flutter_dotenv/flutter_dotenv.dart';

class RegisterPage extends StatefulWidget {
Expand All @@ -21,7 +20,7 @@ class _RegisterPageState extends State<RegisterPage> {
String get spotifyRedirectUrlMobile => '$callbackUrlScheme://callback';

final String clientId = dotenv.env["VITE_SPOTIFY_CLIENT_ID"] ?? "";
final appAuth = FlutterAppAuth();
final appAuth = const FlutterAppAuth();

@override
Widget build(BuildContext context) {
Expand Down
3 changes: 1 addition & 2 deletions client_mobile/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:go_router/go_router.dart';

final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>(); // Clé globale

final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
Future<void> main() async {
await dotenv.load(fileName: ".env");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// import 'package:aad_oauth/model/config.dart';
import 'package:aad_oauth/model/config.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
Expand All @@ -8,10 +7,10 @@ import '../../main.dart';

class MicrosoftAuthService {
static final String clientId = dotenv.env["VITE_MICROSOFT_CLIENT_ID"] ?? "";
static final String redirectUri =
static const String redirectUri =
"msauth://my.area.app/lvGC0B4SWYU8tNPHg%2FbdMjQinZQ%3D";
static final String authority = "https://login.microsoftonline.com/common";
static final FlutterSecureStorage secureStorage = FlutterSecureStorage();
static const String authority = "https://login.microsoftonline.com/common";
static const FlutterSecureStorage secureStorage = FlutterSecureStorage();

static Future<void> auth(BuildContext context) async {
final Config config = Config(
Expand Down
2 changes: 0 additions & 2 deletions client_mobile/lib/widgets/button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ class AreaButton extends StatelessWidget {
fontSize: 24,
color: Colors.white,
)),
// const Spacer(),
// if (icon != null) FaIcon(size: 25, icon!),
),
);
}
Expand Down
5 changes: 2 additions & 3 deletions client_mobile/lib/widgets/form_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,12 @@ class AreaFormField extends StatelessWidget {
color: Theme.of(context).colorScheme.onSurface,
),
decoration: InputDecoration(
// fillColor: Theme.of(context).colorScheme.,
labelText: label, // Placeholder text
border: const OutlineInputBorder(),
enabledBorder: const OutlineInputBorder(
borderSide: BorderSide(
color: Color.fromARGB(255, 221, 228, 222), // Couleur de la bordure lorsque le champ est actif
width: 2.0, // Largeur de la bordure
color: Color.fromARGB(255, 221, 228, 222),
width: 2.0,
),
),
suffixIcon: suffixIcon,
Expand Down
21 changes: 10 additions & 11 deletions client_mobile/lib/widgets/sign_in_button.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';

class SignInButton extends StatelessWidget {
const SignInButton(
Expand All @@ -22,9 +21,8 @@ class SignInButton extends StatelessWidget {
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6.0),
side: const BorderSide(
color: Color.fromARGB(255, 221, 228,
222), // Couleur de la bordure lorsque le champ est actif
width: 2.0, // Largeur de la bordure
color: Color.fromARGB(255, 221, 228, 222),
width: 2.0,
),
),
),
Expand All @@ -36,13 +34,14 @@ class SignInButton extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.start,
children: [
if (image != null) image!,
// const SizedBox(width: 5),
Text(label,
style: const TextStyle(
fontFamily: "CoolveticaCondensed",
fontSize: 12,
color: Colors.black,
)),
Text(
label,
style: const TextStyle(
fontFamily: "CoolveticaCondensed",
fontSize: 12,
color: Colors.black,
),
),
],
),
),
Expand Down
1 change: 0 additions & 1 deletion client_mobile/lib/widgets/simple_text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class SimpleText extends StatelessWidget {
text,
textAlign: textAlign,
style: TextStyle(
// fontFamily: HodFonts.coolvetica,
fontWeight: bold ? FontWeight.bold : null,
fontSize: textSize,
color: color,
Expand Down

0 comments on commit f849f41

Please sign in to comment.