maxsim-flutter 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maxsim-flutter",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "AI-powered Flutter app scaffolding with Clean Architecture, Riverpod, and autonomous development via Ralph",
5
5
  "type": "module",
6
6
  "bin": {
@@ -2,13 +2,26 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
2
2
  import 'package:go_router/go_router.dart';
3
3
  import 'package:riverpod_annotation/riverpod_annotation.dart';
4
4
  import '../../features/home/presentation/pages/home_page.dart';
5
+ {{#if modules.analytics}}
6
+ import '../../features/analytics/presentation/providers/analytics_provider.dart';
7
+ {{/if}}
8
+ {{#if modules.deepLinking}}
9
+ import '../../features/deep_linking/presentation/providers/deep_link_provider.dart';
10
+ {{/if}}
5
11
 
6
12
  part 'app_router.g.dart';
7
13
 
8
14
  @riverpod
9
15
  GoRouter router(Ref ref) {
16
+ {{#if modules.deepLinking}}
17
+ // Activate deep link handler — listens for incoming links and navigates via go_router
18
+ ref.watch(deepLinkHandlerProvider);
19
+ {{/if}}
10
20
  return GoRouter(
11
21
  initialLocation: '/',
22
+ {{#if modules.analytics}}
23
+ observers: [ref.watch(analyticsRouteObserverProvider)],
24
+ {{/if}}
12
25
  routes: [
13
26
  GoRoute(
14
27
  path: '/',
@@ -0,0 +1,13 @@
1
+ import '../repositories/push_repository.dart';
2
+
3
+ /// Use case for handling incoming push notification messages.
4
+ /// Exposes a stream of foreground [PushMessage]s to presentation layer.
5
+ class HandleNotificationUseCase {
6
+ final PushRepository _repository;
7
+
8
+ const HandleNotificationUseCase(this._repository);
9
+
10
+ Stream<PushMessage> call() {
11
+ return _repository.onMessage;
12
+ }
13
+ }
@@ -0,0 +1,12 @@
1
+ import '../repositories/push_repository.dart';
2
+
3
+ /// Use case for requesting push notification permission from the user.
4
+ class RequestPermissionUseCase {
5
+ final PushRepository _repository;
6
+
7
+ const RequestPermissionUseCase(this._repository);
8
+
9
+ Future<bool> call() {
10
+ return _repository.requestPermission();
11
+ }
12
+ }