feat(client_coverage): add client coverage feature with user session data use case and dashboard widgets
- Created `client_coverage` feature with necessary dependencies in `pubspec.yaml`. - Implemented `GetUserSessionDataUseCase` for retrieving user session data. - Developed `ClientHomeEditBanner` for edit mode instructions and reset functionality. - Added `ClientHomeHeader` to display user information and action buttons. - Built `DashboardWidgetBuilder` to render various dashboard widgets based on state. - Introduced `DraggableWidgetWrapper` for managing widget visibility and drag handles in edit mode. - Created `HeaderIconButton` for interactive header actions with optional badge support.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:billing/billing.dart';
|
||||
import 'package:client_home/client_home.dart';
|
||||
import 'package:client_coverage/client_coverage.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_modular/flutter_modular.dart';
|
||||
import 'package:view_orders/view_orders.dart';
|
||||
@@ -21,12 +22,7 @@ class ClientMainModule extends Module {
|
||||
child: (BuildContext context) => const ClientMainPage(),
|
||||
children: <ParallelRoute<dynamic>>[
|
||||
ModuleRoute<dynamic>('/home', module: ClientHomeModule()),
|
||||
// Placeholders for other tabs
|
||||
ChildRoute<dynamic>(
|
||||
'/coverage',
|
||||
child: (BuildContext context) =>
|
||||
const PlaceholderPage(title: 'Coverage'),
|
||||
),
|
||||
ModuleRoute<dynamic>('/coverage', module: CoverageModule()),
|
||||
ModuleRoute<dynamic>('/billing', module: BillingModule()),
|
||||
ModuleRoute<dynamic>('/orders', module: ViewOrdersModule()),
|
||||
ChildRoute<dynamic>(
|
||||
|
||||
@@ -23,6 +23,8 @@ dependencies:
|
||||
path: ../../../core_localization
|
||||
client_home:
|
||||
path: ../home
|
||||
client_coverage:
|
||||
path: ../client_coverage
|
||||
view_orders:
|
||||
path: ../view_orders
|
||||
billing:
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'package:bloc_test/bloc_test.dart';
|
||||
import 'package:client_main/src/presentation/blocs/client_main_cubit.dart';
|
||||
import 'package:client_main/src/presentation/blocs/client_main_state.dart';
|
||||
import 'package:flutter_modular/flutter_modular.dart';
|
||||
@@ -27,7 +26,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('initial state is correct', () {
|
||||
final cubit = ClientMainCubit();
|
||||
final ClientMainCubit cubit = ClientMainCubit();
|
||||
expect(cubit.state, const ClientMainState(currentIndex: 2));
|
||||
cubit.close();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user