fixed project problems (warnings)

This commit is contained in:
Kima
2024-03-11 23:29:20 +01:00
parent 9ea0085ddb
commit 917d6d01db
34 changed files with 602 additions and 552 deletions

View File

@@ -14,7 +14,7 @@ class ErrorReportScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Color(0xFFE3EBFB),
backgroundColor: const Color(0xFFE3EBFB),
body: SafeArea(
child: Padding(
padding: const EdgeInsets.all(12.0),
@@ -28,7 +28,7 @@ class ErrorReportScreen extends StatelessWidget {
child: Text(
"ekretaYou".i18n,
style: TextStyle(
color: Color(0xFF011234).withOpacity(0.7),
color: const Color(0xFF011234).withOpacity(0.7),
fontSize: 24.0,
fontWeight: FontWeight.w700,
),
@@ -120,7 +120,7 @@ class ErrorReportScreen extends StatelessWidget {
const EdgeInsets.symmetric(vertical: 14.0),
),
backgroundColor: MaterialStateProperty.all(
Color(0xFFF3F7FE),
const Color(0xFFF3F7FE),
),
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
@@ -128,7 +128,7 @@ class ErrorReportScreen extends StatelessWidget {
),
),
side: MaterialStateProperty.all(
BorderSide(width: 1.0, color: Color(0xFFC7D3EB)),
const BorderSide(width: 1.0, color: Color(0xFFC7D3EB)),
),
),
child: Text(
@@ -244,7 +244,7 @@ class ErrorDetail extends StatelessWidget {
const EdgeInsets.symmetric(horizontal: 6.5, vertical: 4.0),
margin: const EdgeInsets.only(top: 4.0),
decoration: BoxDecoration(
color: Color.fromARGB(255, 218, 218, 218),
color: const Color.fromARGB(255, 218, 218, 218),
borderRadius: BorderRadius.circular(4.0)),
child: Text(
content,

View File

@@ -18,8 +18,9 @@ List<School> searchSchools(List<School> all, String pattern) {
if (contains == pattern.split(" ").length) results.add(item);
if (item.instituteCode.toLowerCase().specialChars().contains(pattern))
if (item.instituteCode.toLowerCase().specialChars().contains(pattern)) {
results.add(item);
}
}
results.sort((a, b) => a.name.compareTo(b.name));

View File

@@ -1,3 +1,5 @@
// ignore_for_file: deprecated_member_use
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
import 'package:flutter_svg/svg.dart';
import 'package:refilc/api/providers/update_provider.dart';
@@ -201,9 +203,7 @@ class NavigationScreenState extends State<NavigationScreen>
@override
void didChangePlatformBrightness() {
if (settings.theme == ThemeMode.system) {
// ignore: deprecated_member_use
Brightness? brightness =
// ignore: deprecated_member_use
WidgetsBinding.instance.window.platformBrightness;
Provider.of<ThemeModeObserver>(context, listen: false).changeTheme(
brightness == Brightness.light ? ThemeMode.light : ThemeMode.dark);
@@ -242,7 +242,6 @@ class NavigationScreenState extends State<NavigationScreen>
// SvgTheme navIcTheme =
// SvgTheme(currentColor: Theme.of(context).colorScheme.primary);
// ignore: deprecated_member_use
return WillPopScope(
onWillPop: () async {
if (_navigatorState.currentState?.canPop() ?? false) {

View File

@@ -1016,7 +1016,7 @@ class SettingsScreenState extends State<SettingsScreen>
);
showErrorScreen(context, fakeErrorDetails);
},
child: Text('hiba_tesztelese'),
child: const Text('hiba_tesztelese'),
),
// developer options