Skip to content

Commit 9e6f232

Browse files
authored
chore: updated to flutter_it 2.0.0 dart fix does not find anything to fix (#3)
* updated to flutter_it 2.0.0 dart fix does not find anything to fix * updated to flutter_it 2.0.0
1 parent 0c220f4 commit 9e6f232

7 files changed

Lines changed: 27 additions & 16 deletions

File tree

lib/podcasts/podcast_manager.dart

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ import '../extensions/country_x.dart';
66
import '../player/data/episode_media.dart';
77
import 'podcast_service.dart';
88

9+
/// Manages podcast search and episode fetching.
10+
///
11+
/// Note: This manager is registered as a singleton in get_it and lives for the
12+
/// entire app lifetime. Commands and subscriptions don't need explicit disposal
13+
/// as they're automatically cleaned up when the app process terminates.
914
class PodcastManager {
1015
PodcastManager({required PodcastService podcastService})
1116
: _podcastService = podcastService {
@@ -22,15 +27,16 @@ class PodcastManager {
2227
);
2328
textChangedCommand = Command.createSync((s) => s, initialValue: '');
2429

30+
// Subscription doesn't need disposal - manager lives for app lifetime
2531
textChangedCommand
2632
.debounce(const Duration(milliseconds: 500))
27-
.listen((filterText, sub) => updateSearchCommand.execute(filterText));
33+
.listen((filterText, sub) => updateSearchCommand.run(filterText));
2834

2935
fetchEpisodeMediaCommand = Command.createAsync<Item, List<EpisodeMedia>>(
3036
(podcast) => _podcastService.findEpisodes(item: podcast),
3137
initialValue: [],
3238
);
33-
updateSearchCommand.execute(null);
39+
updateSearchCommand.run(null);
3440
}
3541

3642
final PodcastService _podcastService;

lib/podcasts/view/podcast_page_episode_list.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class PodcastPageEpisodeList extends StatelessWidget with WatchItMixin {
3333
hasScrollBody: false,
3434
child: Center(child: Text('Error loading episodes: $error')),
3535
),
36-
whileExecuting: (res, query) => const SliverFillRemaining(
36+
whileRunning: (res, query) => const SliverFillRemaining(
3737
hasScrollBody: false,
3838
child: Center(child: CircularProgressIndicator.adaptive()),
3939
),

lib/podcasts/view/podcast_search_view.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class PodcastSearchViewNew extends StatelessWidget with WatchItMixin {
3232
),
3333
onError: (error, lastResult, param) =>
3434
NoSearchResultPage(message: Text(error.toString())),
35-
whileExecuting: (res, query) =>
35+
whileRunning: (res, query) =>
3636
const Center(child: CircularProgressIndicator.adaptive()),
3737
),
3838
),
@@ -70,7 +70,7 @@ class _PodcastSearchViewHeaderState extends State<PodcastSearchViewHeader> {
7070
).copyWith(top: kBigPadding, bottom: kSmallPadding),
7171
child: TextField(
7272
controller: _controller,
73-
onChanged: di<PodcastManager>().textChangedCommand.execute,
73+
onChanged: di<PodcastManager>().textChangedCommand.run,
7474
decoration: InputDecoration(
7575
prefixIcon: const Icon(Icons.search),
7676
label: Text(context.l10n.search),
@@ -79,7 +79,7 @@ class _PodcastSearchViewHeaderState extends State<PodcastSearchViewHeader> {
7979
icon: const Icon(Icons.clear),
8080
onPressed: () {
8181
_controller.clear();
82-
di<PodcastManager>().textChangedCommand.execute('');
82+
di<PodcastManager>().textChangedCommand.run('');
8383
},
8484
),
8585
),

lib/settings/settings_manager.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ import '../common/extenal_path_service.dart';
44
import '../extensions/shared_preferences_x.dart';
55
import 'settings_service.dart';
66

7+
/// Manages application settings.
8+
///
9+
/// Note: This manager is registered as a singleton in get_it and lives for the
10+
/// entire app lifetime. Commands don't need explicit disposal as they're
11+
/// automatically cleaned up when the app process terminates.
712
class SettingsManager {
813
SettingsManager({
914
required SettingsService service,

lib/settings/view/settings_dialog.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class SettingsDialog extends StatelessWidget with WatchItMixin {
1515
children: [
1616
ListTile(
1717
trailing: ElevatedButton(
18-
onPressed: di<SettingsManager>().downloadsDirCommand.execute,
18+
onPressed: di<SettingsManager>().downloadsDirCommand.run,
1919
child: Text(context.l10n.open),
2020
),
2121
title: Text(context.l10n.downloadsDirectory),
@@ -33,7 +33,7 @@ class SettingsDialog extends StatelessWidget with WatchItMixin {
3333
(SettingsManager m) => m.downloadsDirCommand.results,
3434
).toWidget(
3535
onData: (dir, param) => Text(dir ?? ''),
36-
whileExecuting: (_, _) => const SizedBox(
36+
whileRunning: (_, _) => const SizedBox(
3737
width: 16,
3838
height: 16,
3939
child: CircularProgressIndicator(strokeWidth: 2),

pubspec.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,13 @@ packages:
187187
source: hosted
188188
version: "1.19.1"
189189
command_it:
190-
dependency: transitive
190+
dependency: "direct main"
191191
description:
192192
name: command_it
193-
sha256: c2a658f52219bb082e283b4177870e8875bf056aaeb8d2737e20e285647fcf21
193+
sha256: "6198e223b5a4d0e23281fd9514a67d264fb9239eeb3c1372176f49367aa2b198"
194194
url: "https://pub.dev"
195195
source: hosted
196-
version: "8.0.0"
196+
version: "9.0.2"
197197
convert:
198198
dependency: transitive
199199
description:
@@ -387,10 +387,10 @@ packages:
387387
dependency: "direct main"
388388
description:
389389
name: flutter_it
390-
sha256: "6afd345b1db30209a80e29e9e7fb0e58fffe3f46a5c04329d84e0f97323c98d7"
390+
sha256: "81fe23d007abd87f26a3dec0b52ad2772ecd3b6d3c8f7e6e1daa24c04c9b1a2d"
391391
url: "https://pub.dev"
392392
source: hosted
393-
version: "1.0.2"
393+
version: "2.0.0"
394394
flutter_launcher_icons:
395395
dependency: "direct dev"
396396
description:
@@ -1307,10 +1307,10 @@ packages:
13071307
dependency: transitive
13081308
description:
13091309
name: watch_it
1310-
sha256: f2b5e05736640b07f6c5a8bd5421d71504439a6c547c67da9172f910999a249f
1310+
sha256: "98e091d39aab70c57c6d38883ad83b9a22a0e12683e0222391d20d61cda4d250"
13111311
url: "https://pub.dev"
13121312
source: hosted
1313-
version: "2.0.1"
1313+
version: "2.1.1"
13141314
web:
13151315
dependency: transitive
13161316
description:

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies:
2424
flutter:
2525
sdk: flutter
2626
flutter_cache_manager: ^3.4.1
27-
flutter_it: ^1.0.2
27+
flutter_it: ^2.0.0
2828
flutter_localizations:
2929
sdk: flutter
3030
flutter_widget_from_html_core: ^0.17.0

0 commit comments

Comments
 (0)