Skip to content

Commit c1c17d5

Browse files
authored
Merge pull request #165 from akaMrNagar/dev
Dev
2 parents c78a94f + 5231c8e commit c1c17d5

File tree

11 files changed

+21
-19
lines changed

11 files changed

+21
-19
lines changed

analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ linter:
2323
rules:
2424
# avoid_print: false # Uncomment to disable the `avoid_print` rule
2525
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26-
26+
unintended_html_in_doc_comment: false
2727
# Additional information about this file can be found at
2828
# https://dart.dev/guides/language/analysis-options

lib/config/app_themes.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ class AppTheme {
1616
static const _kSeedColor = Colors.indigo;
1717

1818
static final _kShimmerEffect = ShimmerEffect(
19-
highlightColor: Colors.white.withOpacity(0.6),
20-
baseColor: Colors.grey.withOpacity(0.3),
19+
highlightColor: Colors.white.withValues(alpha: 0.6),
20+
baseColor: Colors.grey.withValues(alpha: 0.3),
2121
);
2222

2323
/// Custom transition for page routes
@@ -47,7 +47,8 @@ class AppTheme {
4747
'Yellow': Colors.yellow,
4848
};
4949

50-
static ThemeData darkTheme({Color? seedColor, required bool isAmoled}) => ThemeData.from(
50+
static ThemeData darkTheme({Color? seedColor, required bool isAmoled}) =>
51+
ThemeData.from(
5152
useMaterial3: true,
5253
colorScheme: ColorScheme.fromSeed(
5354
seedColor: seedColor ?? _kSeedColor,

lib/core/database/daos/dynamic_records_dao.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ part 'dynamic_records_dao.g.dart';
4343
)
4444
class DynamicRecordsDao extends DatabaseAccessor<AppDatabase>
4545
with _$DynamicRecordsDaoMixin {
46-
DynamicRecordsDao(AppDatabase db) : super(db);
46+
DynamicRecordsDao(super.db);
4747

4848
// ==================================================================================================================
4949
// ===================================== APP USAGE =======================================================

lib/core/database/daos/unique_records_dao.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ part 'unique_records_dao.g.dart';
3535
)
3636
class UniqueRecordsDao extends DatabaseAccessor<AppDatabase>
3737
with _$UniqueRecordsDaoMixin {
38-
UniqueRecordsDao(AppDatabase db) : super(db);
38+
UniqueRecordsDao(super.db);
3939

4040
/// Saves a single [SharedUniqueData] object to the database.
4141
Future<void> saveSharedData(SharedUniqueData data) async =>

lib/ui/common/default_bar_chart.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ class DefaultBarChart extends StatelessWidget {
132132
},
133133
),
134134
),
135-
swapAnimationCurve: Curves.fastEaseInToSlowEaseOut,
136-
swapAnimationDuration: AppConstants.defaultAnimDuration * 2,
135+
curve: Curves.fastEaseInToSlowEaseOut,
136+
duration: AppConstants.defaultAnimDuration * 2,
137137
),
138138
),
139139
);

lib/ui/common/sliver_distracting_apps_list.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ class _SliverDistractingAppsListState
4949
UsageFilterModel _filter = UsageFilterModel.constant();
5050
bool _isSelectedAll = false;
5151

52-
_onFilterChanged(UsageFilterModel filter) {
52+
void _onFilterChanged(UsageFilterModel filter) {
5353
if (!mounted) return;
5454
setState(() => _filter = filter);
5555
}
5656

57-
_onSelectDeselectAll(
57+
void _onSelectDeselectAll(
5858
bool select,
5959
Iterable<String> selected,
6060
Iterable<String> unselected,

lib/ui/common/status_label.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class StatusLabel extends StatelessWidget {
2525
vertical: 4,
2626
horizontal: 8,
2727
),
28-
color: accentColor.withOpacity(0.15),
28+
color: accentColor.withValues(alpha: 0.15),
2929
child: Row(
3030
crossAxisAlignment: CrossAxisAlignment.center,
3131
children: [

lib/ui/screens/active_session/sine_wave.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ class _SineWaveState extends State<SineWave> {
9191
dotData: const FlDotData(show: false),
9292
gradient: LinearGradient(
9393
colors: [
94-
color.withOpacity(0),
94+
color.withValues(alpha: 0),
9595
color,
9696
color,
97-
color.withOpacity(0),
97+
color.withValues(alpha: 0),
9898
],
9999
stops: const [
100100
0.05,

lib/ui/screens/active_session/timer_progress_clock.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class TimerProgressClock extends StatelessWidget {
2828
size: Size.square(dimension),
2929
painter: _TimerClockPainter(
3030
progress: progress,
31-
bgColor: Theme.of(context).colorScheme.primary.withOpacity(0.05),
31+
bgColor: Theme.of(context).colorScheme.primary.withValues(alpha: 0.05),
3232
fillColor: Theme.of(context).colorScheme.primary,
3333
notchColor: Theme.of(context).colorScheme.primary,
3434
needleColor: Theme.of(context).colorScheme.error,
@@ -63,7 +63,7 @@ class _TimerClockPainter extends CustomPainter {
6363

6464
// Draw the notches around the timer
6565
Paint smallNotchPaint = Paint()
66-
..color = notchColor.withOpacity(0.4)
66+
..color = notchColor.withValues(alpha: 0.4)
6767
..style = PaintingStyle.stroke
6868
..strokeCap = StrokeCap.round
6969
..strokeWidth = 2;
@@ -133,7 +133,7 @@ class _TimerClockPainter extends CustomPainter {
133133
radius * 0.2,
134134
Paint()
135135
..maskFilter = const MaskFilter.blur(BlurStyle.normal, 20)
136-
..color = Colors.black.withOpacity(0.2),
136+
..color = Colors.black.withValues(alpha: 0.2),
137137
);
138138

139139
/// Draw needle holder foreground cap circle

lib/ui/screens/focus/focus_mode/focus_distracting_apps_list.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@ class FocusDistractingAppsList extends ConsumerWidget {
1919
super.key,
2020
});
2121

22-
_onDistractingAppsChanged(
22+
void _onDistractingAppsChanged(
2323
BuildContext context,
2424
WidgetRef ref,
2525
String package,
2626
bool isSelected,
2727
) async {
2828
// User want to remove app from list and session is active
29-
if (!isSelected && ref.read(focusModeProvider).activeSession.value != null) {
29+
if (!isSelected &&
30+
ref.read(focusModeProvider).activeSession.value != null) {
3031
context.showSnackAlert(
3132
context.locale.focus_distracting_apps_removal_snack_alert,
3233
);

0 commit comments

Comments
 (0)