feat: rapid order is removed fromm the client home page.
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
library client_home;
|
|
||||||
|
|
||||||
import 'package:flutter_modular/flutter_modular.dart';
|
import 'package:flutter_modular/flutter_modular.dart';
|
||||||
import 'package:krow_data_connect/krow_data_connect.dart';
|
import 'package:krow_data_connect/krow_data_connect.dart';
|
||||||
import 'src/data/repositories_impl/home_repository_impl.dart';
|
import 'src/data/repositories_impl/home_repository_impl.dart';
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ class ClientHomeBloc extends Bloc<ClientHomeEvent, ClientHomeState> {
|
|||||||
on<ClientHomeWidgetVisibilityToggled>(_onWidgetVisibilityToggled);
|
on<ClientHomeWidgetVisibilityToggled>(_onWidgetVisibilityToggled);
|
||||||
on<ClientHomeWidgetReordered>(_onWidgetReordered);
|
on<ClientHomeWidgetReordered>(_onWidgetReordered);
|
||||||
on<ClientHomeLayoutReset>(_onLayoutReset);
|
on<ClientHomeLayoutReset>(_onLayoutReset);
|
||||||
|
|
||||||
|
add(ClientHomeStarted());
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _onStarted(
|
Future<void> _onStarted(
|
||||||
|
|||||||
@@ -24,8 +24,7 @@ class ClientHomePage extends StatelessWidget {
|
|||||||
final TranslationsClientHomeEn i18n = t.client_home;
|
final TranslationsClientHomeEn i18n = t.client_home;
|
||||||
|
|
||||||
return BlocProvider<ClientHomeBloc>(
|
return BlocProvider<ClientHomeBloc>(
|
||||||
create: (BuildContext context) =>
|
create: (BuildContext context) => Modular.get<ClientHomeBloc>(),
|
||||||
Modular.get<ClientHomeBloc>()..add(ClientHomeStarted()),
|
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Column(
|
child: Column(
|
||||||
@@ -59,19 +58,15 @@ class ClientHomePage extends StatelessWidget {
|
|||||||
100,
|
100,
|
||||||
),
|
),
|
||||||
onReorder: (int oldIndex, int newIndex) {
|
onReorder: (int oldIndex, int newIndex) {
|
||||||
BlocProvider.of<ClientHomeBloc>(context).add(
|
BlocProvider.of<ClientHomeBloc>(
|
||||||
ClientHomeWidgetReordered(oldIndex, newIndex),
|
context,
|
||||||
);
|
).add(ClientHomeWidgetReordered(oldIndex, newIndex));
|
||||||
},
|
},
|
||||||
children: state.widgetOrder.map((String id) {
|
children: state.widgetOrder.map((String id) {
|
||||||
return Container(
|
return Container(
|
||||||
key: ValueKey(id),
|
key: ValueKey<String>(id),
|
||||||
margin: const EdgeInsets.only(bottom: UiConstants.space4),
|
margin: const EdgeInsets.only(bottom: UiConstants.space4),
|
||||||
child: DashboardWidgetBuilder(
|
child: DashboardWidgetBuilder(id: id, state: state, isEditMode: true),
|
||||||
id: id,
|
|
||||||
state: state,
|
|
||||||
isEditMode: true,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}).toList(),
|
}).toList(),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -24,21 +24,22 @@ class ActionsWidget extends StatelessWidget {
|
|||||||
|
|
||||||
return Row(
|
return Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
/// TODO: FEATURE_NOT_YET_IMPLEMENTED
|
||||||
child: _ActionCard(
|
// Expanded(
|
||||||
title: i18n.rapid,
|
// child: _ActionCard(
|
||||||
subtitle: i18n.rapid_subtitle,
|
// title: i18n.rapid,
|
||||||
icon: UiIcons.zap,
|
// subtitle: i18n.rapid_subtitle,
|
||||||
color: const Color(0xFFFEF2F2),
|
// icon: UiIcons.zap,
|
||||||
borderColor: const Color(0xFFFECACA),
|
// color: const Color(0xFFFEF2F2),
|
||||||
iconBgColor: const Color(0xFFFEE2E2),
|
// borderColor: const Color(0xFFFECACA),
|
||||||
iconColor: const Color(0xFFDC2626),
|
// iconBgColor: const Color(0xFFFEE2E2),
|
||||||
textColor: const Color(0xFF7F1D1D),
|
// iconColor: const Color(0xFFDC2626),
|
||||||
subtitleColor: const Color(0xFFB91C1C),
|
// textColor: const Color(0xFF7F1D1D),
|
||||||
onTap: onRapidPressed,
|
// subtitleColor: const Color(0xFFB91C1C),
|
||||||
),
|
// onTap: onRapidPressed,
|
||||||
),
|
// ),
|
||||||
const SizedBox(width: UiConstants.space2),
|
// ),
|
||||||
|
// const SizedBox(width: UiConstants.space2),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: _ActionCard(
|
child: _ActionCard(
|
||||||
title: i18n.create_order,
|
title: i18n.create_order,
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ dependencies:
|
|||||||
core_localization:
|
core_localization:
|
||||||
path: ../../../core_localization
|
path: ../../../core_localization
|
||||||
krow_domain: ^0.0.1
|
krow_domain: ^0.0.1
|
||||||
|
krow_data_connect: ^0.0.1
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
Reference in New Issue
Block a user