Skip to content

Commit 6097a36

Browse files
committed
fix: resolve 5 linter issues from CI
- main.dart: add const MyApp({super.key}) (use_key_in_widget_constructors) - main.dart: runApp(const MyApp()) and home: const StatusAlertScreen() (prefer_const_constructors) - main.dart: replace deprecated primarySwatch with colorScheme.fromSeed - status_alert_base_widget.dart: use const Tween<double>(...) (prefer_const_constructors) - status_alert_manager.dart: remove unused onComplete parameter https://claude.ai/code/session_017nS5t2oQz1X4o359oZiRVS
1 parent 710cb75 commit 6097a36

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

example/lib/main.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
import 'package:example/screens/status_alert_screen.dart';
22
import 'package:flutter/material.dart';
33

4-
void main() => runApp(MyApp());
4+
void main() => runApp(const MyApp());
55

66
class MyApp extends StatelessWidget {
7+
const MyApp({super.key});
8+
79
@override
810
Widget build(BuildContext context) {
911
return MaterialApp(
1012
debugShowCheckedModeBanner: false,
1113
title: 'Flutter Demo',
1214
theme: ThemeData(
13-
primarySwatch: Colors.deepPurple,
15+
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
1416
brightness: Brightness.light,
1517
),
1618
darkTheme: ThemeData(brightness: Brightness.dark),
17-
home: StatusAlertScreen(),
19+
home: const StatusAlertScreen(),
1820
);
1921
}
2022
}

lib/src/status_alert.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ class StatusAlert {
4444
StatusAlertManager.createView(
4545
context: context,
4646
dismissOnBackgroundTap: dismissOnBackgroundTap,
47-
onComplete: onComplete,
4847
child: StatusAlertBaseWidget(
4948
title: title,
5049
margin: margin,

lib/src/utils/status_alert_manager.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ class StatusAlertManager {
1010
required BuildContext context,
1111
required Widget child,
1212
bool dismissOnBackgroundTap = false,
13-
VoidCallback? onComplete,
1413
}) {
1514
if (isVisible) return;
1615

lib/src/widgets/status_alert_base_widget.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ class _StatusAlertBaseWidgetState extends State<StatusAlertBaseWidget>
5050
late final Animation<double> _scaleAnimation;
5151
late final Animation<double> _fadeAnimation;
5252

53-
final Tween<double> _scaleTween = Tween<double>(begin: 0.9, end: 1.0);
54-
final Tween<double> _fadeTween = Tween<double>(begin: 0.0, end: 1.0);
53+
final Tween<double> _scaleTween = const Tween<double>(begin: 0.9, end: 1.0);
54+
final Tween<double> _fadeTween = const Tween<double>(begin: 0.0, end: 1.0);
5555

5656
@override
5757
void initState() {

0 commit comments

Comments
 (0)